Skip to content

victori/jetty-session-cache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jetty-Session-Cache
======

Jetty-Session-Cache is a Jetty session manager that off-loads session management to
the TCache[1] caching system. This enables Jetty to persist sessions to various caching
end points; EhCache, Memcached or the Database.

[1] TCache: https://github.com/victori/tcache

Features
--------

- Distributed Sessions:
	* Memcached Session Store
	* JDBC DB Session Store
	* File Session Store (NFS)

- Custom Logging:
        * Log which JVM/Server processed the request
        * Log the render time
        * Log everything in the request map

Build
-----

Jetty-Session-Cache requires java 5 and ant 1.7

Building from source is easy:

    $ mvn package

Or, if you prefer ant:

    $ ant jar


Configuration
-----

<!-- Select one of the Session Stores -->

<!-- Memcached Store -->
<!--
  <New class="com.base.MemcachedSessionManager2">
    <Arg><Array type="java.lang.String"><Item>localhost:11211</Item></Array></Arg>
    <Arg>workerpool1</Arg>
  </New>
-->

<!-- EhCache / Memcached Store -->
<!-- EhCache is the L1 Cache and Memcached is the L2 Cache -->
<!-- Meaning, all cache look ups are against EhCache and then fallback to the Memcached Server -->
<!-- This gives the best performance but requires Session Affinity -->
<!--
  <New class="com.base.EhMemcachedSessionManager2">
    <Arg><Array type="java.lang.String"><Item>localhost:11211</Item></Array></Arg>
    <Arg>workerpool1</Arg>
    <Set name="localttl">1800</Set>
  </New>
-->

<!-- Database store -->
<!--
  <New class="com.base.DBSessionManager">
    <Arg>jdbc:mysql://myapp/sessionstore</Arg>
    <Arg>myuser</Arg>
    <Arg>mypassword</Arg>
    <Arg>com.mysql.jdbc.Driver</Arg>
    <Arg>mydb</Arg>
  </New>
-->

<!-- Database store (L2) with a Memcached store (L1) for fast lookups. -->
<!--
  <New class="com.base.AsyncDBSessionManager">
    <Arg>jdbc:mysql://myapp/sessionstore</Arg>
    <Arg>myuser</Arg>
    <Arg>mypassword</Arg>
    <Arg>com.mysql.jdbc.Driver</Arg>
    <Arg>mydb</Arg>
    <Arg><Array type="java.lang.String"><Item>localhost:11311</Item></Array></Arg>
  </New>
-->

<!-- File store, see how large your sessions really are. -->
<!--
  <New class="com.base.FileSessionManager">
    <Arg>/tmp/wicket</Arg>
  </New>
-->

Thanks
--------

Thanks to the following contributors.

* Jens Rantil - https://github.com/JensRantil

Author
-------

Victor Igumnov <[email protected]>

About

Distributed session storage system for Jetty.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages