In the previous article, I talked about the WebSphere DataPower XC10 Appliance and how is can be used to offload cache from a JVM. I described three use cases for the XC10. This article describes the second of the three scenarios for using the XC10. The XC10 can be used for HTTP Session management and this requires no change to the application code.
HTTP Session management
The HTTP protocol is inherently stateless, but data can be kept for multiple requests from the same client, from the same location over a period of time. A Java Enterprise application keeps state in an HTTP session object. Java Enterprise programmers know how and when to use the HTTP session to store data. The WebSphere Application Server has several ways of implementing this data storage. The XC10 WebSphere DataPower appliance adds an additional place for this data to be stored. This is a good example of how the XC10 can be used in a drop-in scenario.
Using the XC10 for HTTP Session data
A common example given for a website that uses HTTP session data is an online shopping site and session is used to hold a shopping cart. The state is a list of products and quantities that customers plan to purchase. This data is unique for an individual customer at a browser, and must be kept between stateless HTTP calls. It should be stored efficiently for the web application to retrieve. When HTTP session is kept in the JVM heap it is efficient but it is vulnerable to failure. The HTTP session data also put a strain on the application server as the heap grows larger. The session data can be made fault tolerant by replicating it to other JVMs or storing it in the database. Replication of HTTP sessions to other JVMs increases the sizes of all JVMs and this isn't good. Storing the session in the database will solve the failover and heap size issues, but it adds an additional burden to the database layer. The XC10 by contrast, is a dedicated caching layer created with the explicit purpose of providing fast replication and fault tolerance.
In the final article, I will describe how the XC10 appliance can be more deeply integrated into the application programming model. This scenario will use the WebSphere DataPower XC10 appliance as a side cache.
Bio and Contact Information
Matt Oberlin works for IBM in the WebSphere Education group. Matt enjoys providing complex technical information in a straightforward manner. You can find Matt at
Twitter: @Matto_Tweets and Linkedin: www.linkedin.com/pub/matt-oberlin/1/4b9/802/