Topic
IC4NOTICE: 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.
8 replies Latest Post - ‏2012-12-11T20:10:07Z by HermannSW
Bankrupt
Bankrupt
39 Posts
ACCEPTED ANSWER

Pinned topic Is having multiple MPGs a over-head to Datapower

‏2012-12-10T16:17:47Z |
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.
Thanks
Updated on 2012-12-11T20:10:07Z at 2012-12-11T20:10:07Z by HermannSW
  • kenhygh
    kenhygh
    1461 Posts
    ACCEPTED ANSWER

    Re: Is having multiple MPGs a over-head to Datapower

    ‏2012-12-10T18:50:54Z  in response to Bankrupt
    In 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?

    Ken
    • Bankrupt
      Bankrupt
      39 Posts
      ACCEPTED ANSWER

      Re: Is having multiple MPGs a over-head to Datapower

      ‏2012-12-10T19:46:22Z  in response to kenhygh
      Ken -- 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.
      • kenhygh
        kenhygh
        1461 Posts
        ACCEPTED ANSWER

        Re: Is having multiple MPGs a over-head to Datapower

        ‏2012-12-10T21:19:10Z  in response to Bankrupt
        What errors did you receive when passing SOAP/XML through? They're probably all fixable.

        Ken
      • SanjeevKhare
        SanjeevKhare
        17 Posts
        ACCEPTED ANSWER

        Re: Is having multiple MPGs a over-head to Datapower

        ‏2012-12-11T06:28:04Z  in response to Bankrupt
        You 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
          Sri_XI50
          23 Posts
          ACCEPTED ANSWER

          Re: Is having multiple MPGs a over-head to Datapower

          ‏2012-12-11T07:25:15Z  in response to SanjeevKhare
          That 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.

          Thanks.
          • HermannSW
            HermannSW
            4491 Posts
            ACCEPTED ANSWER

            Re: Is having multiple MPGs a over-head to Datapower

            ‏2012-12-11T08:02:20Z  in response to Sri_XI50
            I 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.

             
            Hermann<myXsltBlog/> <myXsltTweets/>
        • Bankrupt
          Bankrupt
          39 Posts
          ACCEPTED ANSWER

          Re: Is having multiple MPGs a over-head to Datapower

          ‏2012-12-11T18:18:50Z  in response to SanjeevKhare
          Thanks 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
            HermannSW
            4491 Posts
            ACCEPTED ANSWER

            Re: Is having multiple MPGs a over-head to Datapower

            ‏2012-12-11T20:10:07Z  in response to Bankrupt
            Temporarily 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?

             
            Hermann<myXsltBlog/> <myXsltTweets/>