Topic
  • 3 replies
  • Latest Post - ‏2012-12-04T02:46:40Z by SystemAdmin
SystemAdmin
SystemAdmin
6772 Posts

Pinned topic Dynamically choosing a processing rule Vs. Dynamically choosing a MPG

‏2012-12-03T10:51:23Z |
Hi All

I have a situation where a request is coming from a single entry point, and later has to be transformed from one format to other format. Source can come as JSON or XML and Target can be JSON or SOAP. So we are passing the request to next MPG which will handle format transformation.

We can create multiple processing rule, each handling a different type of format transformation. for example, one processing rule does JSON to JSON and other do JSON to SOAP.

The other option is make different MPG handling different mediation logic. For example 2 separate MPG, one for JSON to JSON and other JSON to SOAP.

I am looking for suggestion which approach is better. Creating multiple processing rule and select one on the basis of request type or create multiple MPG and entry point forward the request to right one MPG.

Comparing solution with following parameters
1) Maintainability
2) Migration from DEV to TEST to PROD

Thanks
Rohit
Updated on 2012-12-04T02:46:40Z at 2012-12-04T02:46:40Z by SystemAdmin
  • kenhygh
    kenhygh
    1576 Posts

    Re: Dynamically choosing a processing rule Vs. Dynamically choosing a MPG

    ‏2012-12-03T11:02:37Z  
    Rohit,
    I tend to look at how these services are going to be managed to drive this decision.

    For instance, if you have different consumers for the JSON and XML inputs, you might want to upgrade one or the other separately. Likewise with the backends, and the JSON or SOAP providers may need to be updated at different times. For me, this would drive toward separate MPGs, with each handling the different data types.

    However if the services are identical except for the datatypes, and they'll always be updated together, you could go with a single MPG and multiple rules.

    Ken
    P.S. it's been a long time since we worked together, I hope you and yours are doing well.
  • SystemAdmin
    SystemAdmin
    6772 Posts

    Re: Dynamically choosing a processing rule Vs. Dynamically choosing a MPG

    ‏2012-12-03T21:30:28Z  
    • kenhygh
    • ‏2012-12-03T11:02:37Z
    Rohit,
    I tend to look at how these services are going to be managed to drive this decision.

    For instance, if you have different consumers for the JSON and XML inputs, you might want to upgrade one or the other separately. Likewise with the backends, and the JSON or SOAP providers may need to be updated at different times. For me, this would drive toward separate MPGs, with each handling the different data types.

    However if the services are identical except for the datatypes, and they'll always be updated together, you could go with a single MPG and multiple rules.

    Ken
    P.S. it's been a long time since we worked together, I hope you and yours are doing well.
    Hi Ken,

    Thanks for your feedback.

    We do have different consumers and different backends. It is quite possible that we will be upgrading one over another. We also planning to maintain versions which means if we move into production with one set of files/services/rules, until its a production bug, everything new (or changes) has to go as new version.
    Good to hear from you after long time. I am great. How are you?
    Rohit
  • SystemAdmin
    SystemAdmin
    6772 Posts

    Re: Dynamically choosing a processing rule Vs. Dynamically choosing a MPG

    ‏2012-12-04T02:46:40Z  
    Hi Ken,

    Thanks for your feedback.

    We do have different consumers and different backends. It is quite possible that we will be upgrading one over another. We also planning to maintain versions which means if we move into production with one set of files/services/rules, until its a production bug, everything new (or changes) has to go as new version.
    Good to hear from you after long time. I am great. How are you?
    Rohit
    I would assume that your transformation MPG is not exposed to end consumers but used by another MPG. If the transformation MPG is being used only by single consumer MPG it is only adding overhead and processing rules will make more sense. Any way you have to create rules either in consumer MPG or transformation MPG.