Alachisoft.com

Contact Us

+1 (925) 236-3830 sales@alachisoft.com

support@alachisoft.com

Live Chat

Web Sessions Persistence within In-Memory Data Grid

If your web application is high transaction then remove data storage bottlenecks related to your web session persistence and store your web sessions in an in-memory data grid like TayzGrid. In-memory data grid allows you to scale your web applications and handle extreme transaction loads.

In-memory data grid like TayzGrid as a web session store is a much better option than the built-in storage options like InProc and clustered session store in any Java Servlet Container (e.g. JBoss). This is because TayzGrid lets you linearly scale the in-memory data grid by adding more data grid servers to the cluster. And, this something you cannot do with the built-in options.

Additional Benefits

In addition to linear scalability, TayzGrid offer the following extra benefits for storing your web sessions in it:

  • WAN Replication of Web Session: TayzGrid allows you to replicate web sessions across the WAN if your application is running in multiple data centers. You can achieve this for active-passive and active-active datacenter configuration. This way, if one datacenter goes down, you can redirect all your traffic to the other datacenter and all user sessions stay active and valid.
  • Multi-site Web Sessions: If you don’t want to replicate Web Sessions across the WAN because of bandwidth consumption cost, you can choose to use Multi-site Web Session feature of TayzGrid. In this, the Web Session is not replicated across sites and instead is kept at the location of its creation. But, it is accessible to your web application that is running in other datacenters in case you redirect some or all of your traffic from one datacenter to another either due to overflow or if one datacenter is doing down.
  • Fast Compact Serialization of Web Session: When you put your objects in Web Session and store it out-of-process, the entire Web Session must be serialized along with your Java and .NET objects. And, this is normally done with regular Java and .NET serialization that use Reflection at runtime and this is quite slow. TayzGrid provides almost 10 times faster serialization called Fast Compact Serialization. With this, your Web application speed increases noticeably. And, the best thing is that you don’t have to write any code for it because TayzGrid generates serialization code at runtime, compiles it in-memory, and uses it for all serialization. You can mix Fast Compact Serialization with regular serialization.

Use without any Programming

The best thing about using TayzGrid for Web Session persistence is that there is no programming required on your part. You simply modify your application configuration file and add TayzGrid as a Filter to your web JSP application. Here is an example of configuration changes:


<web-app>
  <session-config>
    <session-timeout>
    30
    </session-timeout>
  </session-config>
  <filter>
    <filter-name>
      TayzGridSessionProvider
    </filter-name>
    <filter-class>
      com.alachisoft.tayzgrid.web.session.TayzGridSessionProvider
    </filter-class>
    <init-param>
      <description>
        configPath is used to load the session.xml and client.conf files
      </description>
      <param-name>
        configPath
      </param-name>
      <param-name>
        /opt/tayzgrid/config
      </param-name>
    </init-param>
  </filter>
  <filter-mapping>
    <filter-name>
      TayzGridSessionProvider
    </filter-name>
    <url-pattern>
      /*
    </url-pattern>
  </filter-mapping>
  <welcome-file-list>
    <welcome-file>
      index.jsp
    </welcome-file>
  </welcome-file-list>
</web-app>

What to Do Next?