Integrating WebSphere Extreme Scale and WebSphere Application Server for Caching HTTP Sessions

WebSphere® eXtreme scale is distributed high-speed caching solution. Integrating it with WebSphere Application Server enables the enterprise applications hosted to use the capability of distributed caching. This article describes managing HTTP Sessions for enterprise applications using eXtreme Scale's caching abilities.

Harish Shenoy, IT Architect, IBM

Harish Shenoy is an IBM Certified SOA Solution Designer. He is currently working in BPTSE team IBM India Software Lab providing technical solution architecture in Application Connectivity and Application Infrastructure. His expertise includes IBM Worklight, WebSphere Application Server, WebSphere eXtreme Scale, WebSphere Process Server, WebSphere Message Broker and BPM. He is also certified in WebSphere Process Server, WMQ,WebSphere Message Broker and WebSphere Application Server.



16 December 2011

Also available in Chinese Japanese

Introduction

IBM® WebSphere Application Server V8 (hereafter Application Server) is the first JEE 6 certified enterprise application server. It supports the latest technology such as EJB 3.1, Sevlet 3.0, JPA 2.0, and JAX-WS 2.2 as well as the OSGI, SCA, Batch and CEA programming models. Moreover, Application Server performance has been improved from 20-26% compared to version 7 and about 85% compared to version 6. It also includes new features for operational efficiency, security and speed of development and delivery of applications to enterprise platform.

WebSphere eXtreme Scale (hereafter eXtreme Scale) is a high-speed distributed caching solution, which can be used to reduce the application path length or the distance that data has to travel and provides a range of scaling requirements from simple-in process caching to very complex distributing caching requirements and can be used in variety of caching requirements such as side cache, HTTP session cache, inline backend cache as well as for extreme transaction processing. It is very quick for development and deployment and provides high ROI, and supports a variety of application environments such as Java SE, Java EE, .NET and REST .It can be configured in standalone or along with Application Server.

When eXtreme Scale is integrated with Application Server, it can use all the non-functional features provided by Application Server for high availability: failover, transactions, security etc. All the configurations required for caching are provided by the admin console itself. A single console can be used to manage and configure both the Application Server and eXtreme Scale environments.

HTTP session management

Session management is the technique used by web developers to enable the stateless HTTP protocol to support session state. For example, after a user has authenticated to the web server, subsequent HTTP request (GET or POST) should not cause the web server to ask for the account and password again. An HTTP cookie can be used to maintain session state. The session information is stored on the web server using the session identifier called session ID, which is generated as a result of the request from the user running a web browser.

When multiple web servers must share knowledge of session state, which is typical in clustered environments, session information must be shared between the cluster nodes that are running the web server. Session information can be shared between nodes by using memory replication, by storing session information in a database, or by storing the information in a distributed cache. WebSphere eXtreme Scale provides support for a distributed cache management solution.

The eXtreme Scale HTTP session manager provides session replication capabilities for an application. The session replication manager works with the web container's session manager to create HTTP sessions and manage the life cycles of HTTP sessions that are associated with the application. These life cycle management activities include the invalidation of sessions based on a timeout or an explicit servlet or JavaServer Pages (JSP) call and the invocation of session listeners that are associated with the session or the web application.

When eXtreme Scale manages HTTP sessions, the session manager persists its sessions in an ObjectGrid instance. This instance can be a local, in-memory instance or a fully replicated, clustered, and partitioned instance. The latter provides HTTP session failover support when application servers are shut down or end unexpectedly.

eXtreme Scale usage scenario's for session management

Usage scenarios include:

  • Environments that use application servers at different versions of Application Server.
  • Deployments that use application servers from different vendors.
  • Environments that require the user to persist sessions with higher quality of service levels and better guarantees of session availability during server failover
  • Environment where session affinity cannot be guaranteed or environments in which affinity is maintained by a third-party load balancer and the affinity mechanism must be customized to that load balancer.
  • Environment that must offload session management and storage to an external Java process
  • To enable session failover between cells

This article explains how HTTP sessions management can be offloaded to eXtreme Scale from the Application Server environment. When eXtreme Scale is integrated with Application Server, the HTTP session management processing offloading can be done by eXtreme Scale. Any web application hosted on Application Server can be configured to use the session management capability from eXtreme Scale. Moreover the existing Application Server console can be used to configure HTTP Session management for any web application deployed within the Application Server environment.

Prerequisites

The example described in this article uses the PlantsByWebSphere sample application (see Figure 1). For this example, the following must be installed:

  1. WebSphere Application Server V8
  2. WebSphere eXtreme Scale V7
  3. The PlantsByWebSphere sample application
Figure 1 The PlantsByWebSphere application on WebSphere Application Server V8
Plants by WebSphere interface

Installation of WebSphere eXtreme Scale

Question: should the following be plural (same servers rather than same server)?

You must install eXtreme Scale on the same server as Application Server. On Windows systems, it can be installed using the install.bat script. On UNIX and Linux platforms, the install.sh script can be used for installation. For this example, we specify C:\WebSphere8\AppServer as the installation directory.

Figure 2: Specifying the installation location for eXtreme Scale
Install shield screen for specifying directory

You also need to specify which eXtreme Scale features to install. See Figure 3.

Figure 3: Selecting features to install
Install shield screen showing features to install

During installation, you can augment Application Server profiles with eXtreme Scale features (see Figure 4). Any existing Application Server profile can be augmented, or you can create new profiles with eXtreme scale features. For this example, we augmented the existing profile AppSrv01.

Figure 4: Augmenting profile for eXtreme Scale
Install shield screen for profile augmentation

After installation of eXtreme Scale, when the profile is started, confirm the installation of eXtreme Scale by accessing the AppSrv01 profile – represented by server1 application server on the admin console (see Figure 5).

Figure 5: Application Server profile with eXtreme Scale features installed
Console screen showing application server profile

Configuring an application for HTTP session management

All web applications installed on Application Server can now use the eXtreme Scale features. In our example, we configure the sample application PlantsbyWebSphere for eXtreme Scale HTTP Session management.

From the Application Server admin console, select Applications –> WebSphere enterprise applications. This lists all applications installed on Application Server. PlantsbyWebSphere is listed as pbw.ear in the installed applications list. See Figure 6.

Figure 6: Admin console listing the PlantsbyWebSphere application
Console screen showing Plants by WebSphere application

Select pbw.ear from the application list. All the properties that can be configured for the application are listed, as shown in Figure 7. To configure HTTP Session management for the application, Select Session Management under Web Module Properties.

Figure 7: Configurable properties for PlantsbyWebSphere
Console screen showing Plants by WebSphere properties

When an Application Server profile is augmented with eXtreme Scale, a new option, eXtreme Scale session management settings, is shown on the Session management configuration page under Additional Properties.

Figure 8: Configuring HTTP Session Management
Console screen for session management

In the eXtreme Scale session management settings page, select Embedded eXtreme Scale data grid to use the eXtreme Scale instance installed on the server (see Figure 9). When you select this option, PlantsbyWebSphere uses the caching flexibility provided by eXtreme Scale to manage HTTP Sessions. If you browse through the PlantsbyWebSphere application, you notice the performance improvement. The magnitude of the performance improvement can be calculated by using any performance benchmarking tools.

Figure 9: eXtreme Scale management option for session management
Console screen showing session management options

Conclusion

The distributed caching solution provided by WebSphere eXtreme Scale can be integrated along with latest version of WebSphere Application Server for HTTP session management. This HTTP session management improves application performance signficantly. A single admin console can be used for managing Application Server and eXtreme Scale for making configuration changes.


Resources

WebSphere Extreme Scale 7 Info center

http://publib.boulder.ibm.com/infocenter/wxsinfo/v7r0/index.jsp

WebSphere Extreme Scale Solutions Architecture Redbook

http://www.redbooks.ibm.com/abstracts/redp4602.html

WebSphere Application Server 8 Info center

http://publib.boulder.ibm.com/infocenter/wasinfo/v8r0/index.jsp

WebSphere Application Server Features and Benefits

http://www-01.ibm.com/software/webservers/appserv/was/features/

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into WebSphere on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=WebSphere
ArticleID=777164
ArticleTitle=Integrating WebSphere Extreme Scale and WebSphere Application Server for Caching HTTP Sessions
publish-date=12162011