1. Glassfish V3 Prelude Launch Event
Ehcache Server
Greg Luck
Maintainer, Ehcache
6 November 2008
Job Title
Company Name
Session ID
1 Glassfish V3 Prelude – Ehcache Server Session
2. Ehcache Server
● Launched July 2008
● REST & SOAP APIs
● Uses Jersey, JAX-WS
● Caching engine is the proven Ehcache core
● Embeds GFV3 Prelude to make a cache server
product
● Launch with ./startup.sh
● Configure caches with ehcache.xml as usual
2 Glassfish V3 Prelude – Ehcache Server Session
3. Fit in Overall Ehcache Architecture
3 Glassfish V3 Prelude – Ehcache Server Session
6. Compared With Memcached
● Client – Server, out of ● Client – Server, out of
process architecture process architecture
● Server is C based ● Server is Java: GFV3
● Specific language client libs ● No client. REST or SOAP
● Uses the memcache protocol ● Uses HTTP protocol
● Synchronous operations ● Synchronous operations
● Partitioning via client key ● Partitioning via client key
hashing hashing, load balancer key
hashing or load balancer URI
Routing
● No Replication ● Multimaster Replication
6 Glassfish V3 Prelude – Ehcache Server Session
7. Embedding Glassfish - Why?
● Memcached folks spend a lot of time maintaining
a high performance NIO server. I started writing
one... but we already have one in Grizzly.
● Glassfish is proven – have been running it for 2
years in large production Internet sites, plus it
now has huge adoption
● Much easier to embed Glassfish V3 than Grizzly
● There are other NIO alternatives: Jetty, Tomcat,
AsyncWeb/Mina
7 Glassfish V3 Prelude – Ehcache Server Session
9. Embedding Glassfish
To Start:
GlassFish glassfish = new GlassFish(port);
GFApplication application = glassfish.deploy(war);
And to Stop:
glassfish.stop();
9 Glassfish V3 Prelude – Ehcache Server Session
10. Conclusion
● New competitor to memcached for multi-language
client-server caching
● Like memcached, it is much slower than ehcache
core, but still much faster and less resource
intense than regenerating expensive items
● See http://ehcache.sourceforge.net/
documentation/cache_server.html
● Contact me at gluck@gregluck.com
10 Glassfish V3 Prelude – Ehcache Server Session