Embedding GlassFish v3 in Ehcache Server

1,861 views

Published on

What is the Ehcache Server and how it embeds GlassFish v3 Prelude

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,861
On SlideShare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
47
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Embedding GlassFish v3 in Ehcache Server

  1. 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. 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. 3. Fit in Overall Ehcache Architecture 3 Glassfish V3 Prelude – Ehcache Server Session
  4. 4. Client Hashing Partitioning Topology 4 Glassfish V3 Prelude – Ehcache Server Session
  5. 5. Load Balancer Partitioning Topology 5 Glassfish V3 Prelude – Ehcache Server Session
  6. 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. 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
  8. 8. Embedding Glassfish Maven Dependencies <dependency> <groupId>org.glassfish.embedded</groupId> <artifactId>gf-embedded-api</artifactId> <version>1.0-alpha-4</version> </dependency> <dependency> <groupId>org.glassfish.distributions</groupId> <artifactId>web-all</artifactId> <version>10.0-build-20080430</version> </dependency> 8 Glassfish V3 Prelude – Ehcache Server Session
  9. 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. 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

×