Topic
  • 7 replies
  • Latest Post - ‏2013-05-25T08:48:43Z by Rohit-Goyal
Rohit-Goyal
Rohit-Goyal
151 Posts

Pinned topic Cache SOMA Scripts Results?

‏2013-05-22T11:44:44Z |

Is it possible to cache SOMA script results?

I think 2 options

1) If DataPower provide facility to do it, I can call SOMA scripts from a Java Program and DataPower cache the result. For next call, it returns cached result.

2) Create a MPG, execute soap-call() with SOMA script from a XSL and return the result back. But I don't know if I choose this option how should I cache my results.

Have anyone tried any of these? Suggestion?

Rohit

  • kenhygh
    kenhygh
    2032 Posts

    Re: Cache SOMA Scripts Results?

    ‏2013-05-22T15:27:22Z  

    Rohit,

    What's your use case? Caching a management-level call sounds odd :-)

  • Rohit-Goyal
    Rohit-Goyal
    151 Posts

    Re: Cache SOMA Scripts Results?

    ‏2013-05-23T00:07:40Z  
    • kenhygh
    • ‏2013-05-22T15:27:22Z

    Rohit,

    What's your use case? Caching a management-level call sounds odd :-)

    Hi Ken,

    I am creating a mpg which returns the list of mpgs created in that particular domain. For that mpg internally call SOMA script and return the list of mpgs back to consumer.

    I want that result should be cached for sometime. I don't want for every request, mpg make a SOMA call.

     

    Rohit

  • swlinn
    swlinn
    1395 Posts

    Re: Cache SOMA Scripts Results?

    ‏2013-05-23T02:18:32Z  

    Hi Ken,

    I am creating a mpg which returns the list of mpgs created in that particular domain. For that mpg internally call SOMA script and return the list of mpgs back to consumer.

    I want that result should be cached for sometime. I don't want for every request, mpg make a SOMA call.

     

    Rohit

    Why not have a normal service that uses var://service/system/status/ObjectStatus ... it gives you the object status of every object in your domain, but you can xpath into the result to look for the multi-protocol gateways only and then build your output with the names.  No internal SOMA call required.

    Regards,

    Steve

  • Rohit-Goyal
    Rohit-Goyal
    151 Posts

    Re: Cache SOMA Scripts Results?

    ‏2013-05-23T04:20:02Z  
    • swlinn
    • ‏2013-05-23T02:18:32Z

    Why not have a normal service that uses var://service/system/status/ObjectStatus ... it gives you the object status of every object in your domain, but you can xpath into the result to look for the multi-protocol gateways only and then build your output with the names.  No internal SOMA call required.

    Regards,

    Steve

    Hi Steve

    It's just an example that I gave here. I have more such requirements that I need to implement using SOMA.

    Rohit

  • kenhygh
    kenhygh
    2032 Posts

    Re: Cache SOMA Scripts Results?

    ‏2013-05-23T17:32:27Z  

    Hi Ken,

    I am creating a mpg which returns the list of mpgs created in that particular domain. For that mpg internally call SOMA script and return the list of mpgs back to consumer.

    I want that result should be cached for sometime. I don't want for every request, mpg make a SOMA call.

     

    Rohit

    Rohit,

    Shouldn't your main mpg be able to cache the results of the SOMA call automatically?

  • HermannSW
    HermannSW
    6065 Posts

    Re: Cache SOMA Scripts Results?

    ‏2013-05-24T12:41:53Z  
    • kenhygh
    • ‏2013-05-23T17:32:27Z

    Rohit,

    Shouldn't your main mpg be able to cache the results of the SOMA call automatically?

    Rohit,

    I agree with Ken, your MPGW can cache the results.

    For your scenario 1) just make the MPGW send the SOMA request received from Java client
    and send it to the XML management interface of the same or other box (eg. match(all)+Results).

    Do not forget to enable document cache on your service's XML manager.
    By default document cache size is 0 (which means disabled).

    And you need to define document caching policies as well.


    What you want is "normal" response caching (only idempotent methods, GET and HEAD).

    But that does not mean that caching POSTs is not possible with DataPower ;-)
    https://www.ibm.com/developerworks/community/blogs/HermannSW/entry/caching_client_requests_on_datapower


    Hermann<myXsltBlog/> <myXsltTweets/> <myCE/>
     

  • Rohit-Goyal
    Rohit-Goyal
    151 Posts

    Re: Cache SOMA Scripts Results?

    ‏2013-05-25T08:48:43Z  
    • HermannSW
    • ‏2013-05-24T12:41:53Z

    Rohit,

    I agree with Ken, your MPGW can cache the results.

    For your scenario 1) just make the MPGW send the SOMA request received from Java client
    and send it to the XML management interface of the same or other box (eg. match(all)+Results).

    Do not forget to enable document cache on your service's XML manager.
    By default document cache size is 0 (which means disabled).

    And you need to define document caching policies as well.


    What you want is "normal" response caching (only idempotent methods, GET and HEAD).

    But that does not mean that caching POSTs is not possible with DataPower ;-)
    https://www.ibm.com/developerworks/community/blogs/HermannSW/entry/caching_client_requests_on_datapower


    Hermann<myXsltBlog/> <myXsltTweets/> <myCE/>
     

    Thanks Herman

    Rohit