IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  Stateless and Caching features

    Posted 02/05/03 07:30 PM

    Has anybody successfully used Stateless and Caching features of a service? I had some difficulties earlier where, a cached service also cached the pipeline and overwrote my pipeline with those values. I am yet to try it in 4.6.


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 2.  RE: Stateless and Caching features

    Posted 02/05/03 09:11 PM

    I’ve used stateless settings to avoid creating a session (most times it’s not needed). Any particular question regarding stateless services?


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 3.  RE: Stateless and Caching features

    Posted 02/05/03 09:49 PM

    Still don’t quite understand when to use, when not to use. Any examples?


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 4.  RE: Stateless and Caching features

    Posted 02/05/03 10:04 PM

    When you create a service that will be externally invokable (ie. one that you will expose to clients) make it stateless unless you store data in the session for later use (by a subsequent request from the same client). You don’t need the overhead of all these sessions lying around for just one request. The wm.tn:receive service (TradingNetworks) is stateless for example.

    For caching, the documentation states that “When the server receives subsequent requests for a service with the same set of input values, it returns the cached result to the client rather than invoking the service again.” The only way a cached pipeline would be used is if you provide the same input values. So don’t use caching if the service will provide different output for the same input (flows that get the date/time for example). Here’s another quote from the developer’s guide "If a service retrieves data from a data source that is updated frequently, the cached results can become outdated. Do not cache services that retrieve information from sources that are updated in real-time or near real-time, such as stock quote systems or transactional databases. "

    So my philosophy is generally NOT to use caching since most services retrieve dynamic data from a database that gets updated from other sources (even with the same input values).

    Will


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 5.  RE: Stateless and Caching features

    Posted 02/05/03 10:21 PM

    Thanks Will.
    How about making some internal services stateless, for example WmMarketConnect sendEnvelope service?


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 6.  RE: Stateless and Caching features

    Posted 02/05/03 10:27 PM

    I had an interesting time experimenting with the caching switch on/off and experienced the same issue of the cache overwriting the pipeline. In fact, many times, the pipeline would contain old data that would skew or render the current transaction useless.

    I worked around this by storing data in the repository and extracting the values I needed later by using a key still present in the pipeline. This cut down on the size of the vectors that are created between flow steps by only keeping the data needed at that time and dropping the data that is not needed.

    Generally speaking, Stateless is the best way to go because it forces the flow to handle transactions in an atomic manner and doesn’t leave behind any objects that could corrupt other transactions later.

    Opinions are running amok!

    Ray


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 7.  RE: Stateless and Caching features

    Posted 02/06/03 07:56 AM

    > Thanks Will.
    > How about making some internal services stateless, for
    > example WmMarketConnect sendEnvelope service?

    Hi PU - don’t have much input for the advantages of making internal services stateless, but just wanted to pipe in to say that, with WM very weak in version and config management, its good practise not to touch the internal Wm-provided packages unless there is good reason to.

    I concur with what Will says - you generally must make externally-invokable services stateless. I’ve had a session-expiry problem once occur between 2 WM boxes. It was fixed by making the invoked service stateless. This is the thread:
    [url=“wmusers.com”]wmusers.com


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 8.  RE: Stateless and Caching features

    Posted 02/06/03 03:49 PM

    Thanks all for sharing your experiences


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services