My Application is designed such a way that all the requests enter via one MPG (Primary MPG) and based on some other additional rule, it gets routed to other MPGs or WSPs (Lets call them Application MPGs/WSPs). However my Primary MPG can handle only XML Request Types. If I need to support other formats of Data, my plan was to make the Primary MPG a light weighted non-XML MPG and add NEW secondary MPGs to handle different request types (XML/Streaming/JSON etc) and then route them to their respective Application MPGs/WSPs. Will this cause a overhead to Datapower that I need to be concerned ? To avoid this additional layer/MPG, I could have created separate Master MPGs for each request type but we cannot do that for other reasons. So please advise if adding a new secondary MPG is a addition over-head worth to be worried.
NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
This topic has been locked.
8 replies Latest Post - 2012-12-11T20:10:07Z by HermannSW
Pinned topic Is having multiple MPGs a over-head to Datapower
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2012-12-11T20:10:07Z at 2012-12-11T20:10:07Z by HermannSW
kenhygh 120000PD1B1461 PostsACCEPTED ANSWER
Re: Is having multiple MPGs a over-head to Datapower2012-12-10T18:50:54Z in response to BankruptIn general, you want to avoid chaining services together. There's appreciable downsides to it, as the request (and response) is held in memory in each MPG/WPS for the length of the transaction, and depending on your processing policy, multiple copies could be held in memory. Another downside is that you get separate latency records for each gateway, so you have to do some magic to get an accurate picture of how much processing time is consumed in DataPower for the entire transaction.
That said, having a very thin gateway listening on :443 and then forwarding all requests on to application-specific services is very common.
In your scenario, what would each 'content specific' gateway be doing that couldn't already be done in either your primary MPG or the application services?
Re: Is having multiple MPGs a over-head to Datapower2012-12-10T19:46:22Z in response to kenhyghKen -- Today, my current primary MPG listening on 443 is solely written for SOAP/XML messages and has the request type set as XML. It would give a lot of errors if I send a non-XML request through it and they error out. When I marked it as non-XML type, it gave errors when passing a SOAP/XML message through it. So we were thinking of having 'separate' MPGs for each request type where the Primary MPG would just do the routing.
The other option was to create a separate port for non-XML for which, we do have have enough time to get and implement.
SanjeevKhare 2700057RC917 PostsACCEPTED ANSWER
Re: Is having multiple MPGs a over-head to Datapower2012-12-11T06:28:04Z in response to BankruptYou can still use same MPG for SOAP/XML and non-XML request, you may need to add one more request rule in your MPG and turn ON the " Non-XML processing" for that rule. In this way Same MPG will be able to receive both kind of requests XML and non-XML.
Sri_XI50 270005RBF623 PostsACCEPTED ANSWER
Re: Is having multiple MPGs a over-head to Datapower2012-12-11T07:25:15Z in response to SanjeevKhareThat is correct. You have one binary transform action at the beginning of the rule, parse the request/response .After parsing see if the content is node,if it is node it is XML ( you can identify SOAP easily after this ),if it is not node then it is binary .You can then proceed easily in the same MPG.
HermannSW 2700006U544491 PostsACCEPTED ANSWER
Re: Is having multiple MPGs a over-head to Datapower2012-12-11T08:02:20Z in response to Sri_XI50I Agree that changing "SOAP" to "Non-XML" request type allows to handle both, SOAP as well as binary data by conditional actions.
But there are different implicit actions executed before the first policy action in case of SOAP/Non-XML request type.
For example the "SOAP Validation" will not be done in case of request type Non-XML.
So you may want to do SOAP validation yourself by a validate action against a "store://schemas/*" Schema.
Re: Is having multiple MPGs a over-head to Datapower2012-12-11T18:18:50Z in response to SanjeevKhareThanks for all you input. Currently I have a Primary MPG of Request Type XML and it is forwarding the request to a Application WSP after some processing. However when I just change the Primary MPG to a non-XML Type, it fails. I dont see any errors in the Primary MPG but I see the following errors in the Application WSP. I had the PROBE on and the request is not reaching the policy rules. So the Probe has no entries. I am still investigating but if you have any clues, let me know.
source-http (FSH_HTTP_TEMPInformation_5080): No WS-Proxy service endpoints match request, envelope is missing or malformed.
xmlmgr (default): rule (default): Pipeline beginning at implied action Parse input as XML, attempt pipeline failed: Duplicate xml declaration at line 13 of http://127.0.0.1:5080/TEMPInformationService
request 0x80e003aa xmlmgr (default): Duplicate xml declaration at line 13 of http://127.0.0.1:5080/TempInformationService
HermannSW 2700006U544491 PostsACCEPTED ANSWER
Re: Is having multiple MPGs a over-head to Datapower2012-12-11T20:10:07Z in response to BankruptTemporarily point your primary MPGW with Non-XML request type against a passthru loopback XML FW and set response type of that MPGW to passthru.
Then send a request against it, and you will get back what was sent to the WSP producing the error.
Redirect the output into a file and attach that here, then we can tell what is wrong.
Btw, what are you doing in your MPGW request rule?