SlideShare uma empresa Scribd logo
1 de 50
Baixar para ler offline
Distributed Caching Using the
JCACHE API and ehcache, Including
a Case Study on Wotif.com
Greg Luck
Maintainer, ehcache—http://ehcache.sf.net
Member, JSR 107 JCACHE Expert Group
Chief Architect, Wotif.com—http://wotif.com

TS-6175

                        2007 JavaOneSM Conference | Session TS-6175 |
Goal of This Talk
  What You Will Gain


Learn how to:
- Use ehcache to make your apps fast
- Use General, Hibernate, and Web caches
- Configure caches as distributed caches for horizontal scaling
- Abstract the Cache Provider with Java™ Specification
  Request (JSR) 107 JCache
- Apply ehcache to real-world problems



                         2007 JavaOneSM Conference | Session TS-6175 |   2
Agenda
Introduction
Make Your Application 10–1,000 Times Faster
General Purpose Caching
Web Caching
Java Persistence API (JPA)/Hibernate Caching
Distributed Caching for Clusters
Step-by-Step Coding Demo
Do It With Standards—JSR 107 JCACHE
Making It Real: A Wotif.com Case Study
                 2007 JavaOneSM Conference | Session TS-6175 |   3
Agenda
Introduction
Make Your Application 10–1,000 Times Faster
General Purpose Caching
Web Caching
Java Persistence API (JPA)/Hibernate Caching
Distributed Caching for Clusters
Step-by-Step Coding Demo
Do It With Standards—JSR 107 JCACHE
Making It Real: A Wotif.com Case Study
                 2007 JavaOneSM Conference | Session TS-6175 |   4
Introduction
About ehcache
●   Since 2003
●   Probably the most widely used Java platform Cache
●   Apache 2.0 License
●   Integrated with Spring and Hibernate
●   Java Development Kit (JDK™) 1.4 and higher
    (from ehcache 1.2.4)
●   Web Caching, Persistence Caching, General
    Purpose and Cache Constructs
●   Distributed Caching implementation in 2006
●   JCACHE implementation released 2007
                      2007 JavaOneSM Conference | Session TS-6175 |   5
Agenda
Introduction
Make Your Application 10–1,000 Times Faster
General Purpose Caching
Web Caching
Java Persistence API (JPA)/Hibernate Caching
Distributed Caching for Clusters
Step-by-Step Coding Demo
Do It With Standards—JSR 107 JCACHE
Making It Real: A Wotif.com Case Study
                 2007 JavaOneSM Conference | Session TS-6175 |   6
Make Your Application 10–1,000
Times Faster
How much faster will caching make an application?
●   It depends on a multitude of factors being:
    ●   How many times a cached piece of data can and
        is reused by the application
    ●   The proportion of the response time that is
        alleviated by caching
    ●   In applications that are I/O bound, which is most
        business applications, most of the response time
        is getting data from a database; Therefore the
        speed up mostly depends on how much reuse a
        piece of data gets


                          2007 JavaOneSM Conference | Session TS-6175 |   7
Make Your Application 10–1,000
Times Faster
Cache Efficiency
●   Factors which affect the efficiency of a cache are:
    ●   Required Liveness of Data
    ●   Proportion of total data cached
    ●   Read/Write ratio
    ●   Caching in a single VM vs. Caching Clusters




                         2007 JavaOneSM Conference | Session TS-6175 |   8
Make Your Application 10–1,000
Times Faster
How to calculate entire system speedup: Amdahl’s Law
●   Amdahl’s law, after Gene Amdahl, is used to
    find the system speed up from a speed up in
    part of the system
    ●   1/ ((1 - Proportion Sped Up) + Proportion Sped Up /
        Speed up)

●   Things to Watch:
    ●   For a web application the “system” should include
        browser render time and network latency



                         2007 JavaOneSM Conference | Session TS-6175 |   9
Make Your Application 10–1,000
Times Faster
Speed up from a Web Page Cache
Uncached page time: 2 seconds
Cache retrieval time: 2ms
Proportion: 100%
The expected server-side system speedup is thus:
     1 / ((1 - 1) + 1 / 1000)
     = 1 / (0 + .001)
     = 1,000 times system speedup
The to the browser “system” speedup is much less

                    2007 JavaOneSM Conference | Session TS-6175 |   10
Make Your Application 10–1,000
Times Faster
Speed up from a Database Level Cache
Uncached page time: 2 seconds
Database time: 1.5 seconds
Cache retrieval time: 2ms
Proportion: 75% (1.5/2)
The expected system speedup is thus:
    1 / ((1 - .75) + .75 / (1500/2)))
    = 1 / (.25 + .75/750)
    = 3.98 times system speedup

                     2007 JavaOneSM Conference | Session TS-6175 |   11
Make Your Application 10–1,000
  Times Faster
  Speed compared with Memcached (smaller is better)
7000
6500
6000
5500
5000
4500                                                                        ehcache-1.2.4 memory
4000                                                                        ehcache-1.2.4 disk
                                                                            memcached-1.2.1
3500
3000
2500
2000
1500
1000
 500
  0
         put/set        get                      remove/delete

                       2007 JavaOneSM Conference | Session TS-6175 |   12
Agenda
Introduction
Make Your Application 10–1,000 Times Faster
General Purpose Caching
Web Caching
Java Persistence API (JPA)/Hibernate Caching
Distributed Caching for Clusters
Step-by-Step Coding Demo
Do It With Standards—JSR 107 JCACHE
Making It Real: A Wotif.com Case Study
                 2007 JavaOneSM Conference | Session TS-6175 |   13
General Purpose Caching
Step by Step
1. Add ehcache Java Archive (JAR) to your
   classpath
2. Place configuration in ehcache.xml and
   add it to your classpath
3. Create a CacheManager
  CacheManager manager = CacheManager.create();

4. Reference a Cache
  ehcache sampleCache = manager.getCache();

5. Use it
  sampleCache.put(new Element(“key”, “value”));
  sampleCache.get(“key”);


                            2007 JavaOneSM Conference | Session TS-6175 |   14
General Purpose Caching
ehcache.xml Configuration
<ehcache>

   <diskStore path="java.io.tmpdir"/>

  ...

   <cache name="sampleCache1"
           maxElementsInMemory="10000"
           maxElementsOnDisk="1000"
           eternal="false"
           overflowToDisk="true"
           timeToIdleSeconds="300"
           timeToLiveSeconds="600"
           memoryStoreEvictionPolicy="LFU"
            />
</ehcache>
                       2007 JavaOneSM Conference | Session TS-6175 |   15
Agenda
Introduction
Make Your Application 10–1,000 Times Faster
General Purpose Caching
Web Caching
Java Persistence API (JPA)/Hibernate Caching
Distributed Caching for Clusters
Step-by-Step Coding Demo
Do It With Standards—JSR 107 JCACHE
Making It Real: A Wotif.com Case Study
                 2007 JavaOneSM Conference | Session TS-6175 |   16
Web Caching
Step by Step
1. Use or Subclass SimpleCachingFilter or
   SimplePageFragmentCachingFilter
2. Configure filter in web.xml
3. Create a mapping in web.xml
4. Configure a cache entry matching the filter name




                    2007 JavaOneSM Conference | Session TS-6175 |   17
Web Caching
Example Scenario



  /index.jsp




 /include/footer.jsp




                       2007 JavaOneSM Conference | Session TS-6175 |   18
Filter Configuration in web.xml
Full Page Cache
<filter>
   <filter-name>SimplePageCachingFilter</filter-name>
   <filter-class>net.sf.ehcache.constructs.web.filter.
               SimplePageCachingFilter
   </filter-class>
</filter>

<filter-mapping>
     <filter-name>SimplePageCachingFilter</filter-name>
     <url-pattern>/index.jsp</url-pattern>
     <dispatcher>REQUEST</dispatcher>
     <dispatcher>INCLUDE</dispatcher>
     <dispatcher>FORWARD</dispatcher>
 </filter-mapping>


                       2007 JavaOneSM Conference | Session TS-6175 |   19
Add Cache to ehcache Configuration
Full Page Cache
<ehcache>

   <diskStore path="java.io.tmpdir"/>

  ...

   <cache name="SimplePageCachingFilter"
           maxElementsInMemory="10000"
           maxElementsOnDisk="1000"
           eternal="false"
           overflowToDisk="true"
           timeToIdleSeconds="300"
           timeToLiveSeconds="600"
           memoryStoreEvictionPolicy="LFU"
            />
</ehcache>
                       2007 JavaOneSM Conference | Session TS-6175 |   20
Filter Configuration in web.xml
Page Fragment Cache
<filter>
   <filter-name>SimplePageFragmentCache</filter-name>
   <filter-class>net.sf.ehcache.constructs.web.filter.
                    SimplePageFragmentCachingFilter
   </filter-class>
</filter>

<!-- Page Fragment Cache -->
<filter-mapping>
     <filter-name>SimplePageFragmentCachingFilter
</filter-name>
     <url-pattern>/include/Footer.jsp</url-pattern>
</filter-mapping>




                       2007 JavaOneSM Conference | Session TS-6175 |   21
Agenda
Introduction
Make Your Application 10–1,000 Times Faster
General Purpose Caching
Web Caching
Java Persistence API (JPA)/Hibernate Caching
Distributed Caching for Clusters
Step-by-Step Coding Demo
Do It With Standards—JSR 107 JCACHE
Making It Real: A Wotif.com Case Study
                 2007 JavaOneSM Conference | Session TS-6175 |   22
JPA/Hibernate Caching
Overview
●   Hibernate can either be used directly either
    or via the Hibernate Java Persistence API
    Provider in Hibernate 3.2
●   ehcache is a CacheProvider for Hibernate
    2.x and 3.x
Example
●   Simple Country persistent object/Entity




                      2007 JavaOneSM Conference | Session TS-6175 |   23
JPA/Hibernate Caching
Step by Step
1. Configure Hibernate to use ehcache
2. Configure the Country object’s cacheability; this
   can be done in a number of ways
3. Decide whether to use defaults, or to configure
   specific cache settings for the Country object
   cache in ehcache.xml




                    2007 JavaOneSM Conference | Session TS-6175 |   24
JPA/Hibernate Caching
Configure Hibernate to use ehcache


Add the following to hibernate.properties:

hibernate.cache.provider_class=net.sf.ehcache.hibernate.EhCacheProvider

<!-- optional configuration file parameter -->
net.sf.ehcache.configurationResourceName=/name_of_configuration_resource




                           2007 JavaOneSM Conference | Session TS-6175 |   25
JPA/Hibernate Caching
Native Hibernate Mapping File Configuration
<hibernate-mapping>

<class
    name="com.somecompany.someproject.domain.Country"
    table="ut_Countries"
    dynamic-update="false"
    dynamic-insert="false"
>
    <cache usage="read-write|nonstrict-read-write|read-only" />
</class>
...
</hibernate-mapping>
<cache
    usage="transactional|read-write|nonstrict-read-write|read-only"
    region="RegionName"
    include="all|non-lazy"
/>


                            2007 JavaOneSM Conference | Session TS-6175 |   26
JPA/Hibernate Caching
Entity Configuration With JPA and Hibernate Annotations

@Entity
...
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public Class Country {

    private String name;

    ...

}




                           2007 JavaOneSM Conference | Session TS-6175 |   27
Agenda
Introduction
Make Your Application 10–1,000 Times Faster
General Purpose Caching
Web Caching
Java Persistence API (JPA)/Hibernate Caching
Distributed Caching for Clusters
Step-by-Step Coding Demo
Do It With Standards—JSR 107 JCACHE
Making It Real: A Wotif.com Case Study
                 2007 JavaOneSM Conference | Session TS-6175 |   28
Distributed Caching for Clusters
Features
1. Pluggable distribution mechanism.
2. Comes with an RMI-based replicator. JGroups
   coming. Easy to add others.
3. Multiple “clusters”
4. Replication set per Cache. Options:
   1. Replicate adds
   2. Replicate removes
   3. Replicate update by copy or invalidate
   4. Async or Sync
5. Bootstrapping from existing Caches in a cluster
                       2007 JavaOneSM Conference | Session TS-6175 |   29
Distributed Caching for Clusters
Architecture




               2007 JavaOneSM Conference | Session TS-6175 |   30
Distributed Caching for Clusters
RMI-Based Replication
1. Multicast Peer Discovery
  <cacheManagerPeerProviderFactory class=
  "net.sf.ehcache.distribution.
  RMICacheManagerPeerProviderFactory"
  properties="peerDiscovery=automatic,
     multicastGroupAddress=230.0.0.1,
  multicastGroupPort=4446/>




2. RMI Listener
  <cacheManagerPeerListenerFactory class=
  "net.sf.ehcache.distribution.RMICacheManagerPeerLis
  tenerFactory"properties="port=40001"/>

                        2007 JavaOneSM Conference | Session TS-6175 |   31
Distributed Caching for Clusters
   Set Replication Per Cache
<cache ...>
  <cacheEventListenerFactory

  class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
      properties="replicateAsynchronously=true,
      replicatePuts=true,
      replicateUpdates=true,
      replicateUpdatesViaCopy=true,
      replicateRemovals=true,
      asynchronousReplicationIntervalMillis=1000"/>
      ...
</cache>




                         2007 JavaOneSM Conference | Session TS-6175 |   32
Distributed Caching for Clusters
   Set Bootstrapping Per Cache
<cache ...>
       <bootstrapCacheLoaderFactory class="
  net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory"
   properties="bootstrapAsynchronously=true,
               maximumChunkSizeBytes=5000000"/>
</cache>




                          2007 JavaOneSM Conference | Session TS-6175 |   33
Agenda
Introduction
Make Your Application 10–1,000 Times Faster
General Purpose Caching
Web Caching
Java Persistence API (JPA)/Hibernate Caching
Distributed Caching for Clusters
Step-by-Step Coding Demo
Do It With Standards—JSR 107 JCACHE
Making It Real: A Wotif.com Case Study
                 2007 JavaOneSM Conference | Session TS-6175 |   34
Agenda
Introduction
Make Your Application 10–1,000 Times Faster
General Purpose Caching
Web Caching
Java Persistence API (JPA)/Hibernate Caching
Distributed Caching for Clusters
Step-by-Step Coding Demo
Do It With Standards—JSR 107 JCACHE
Making It Real: A Wotif.com Case Study
                 2007 JavaOneSM Conference | Session TS-6175 |   35
JSR 107—JCACHE: Java Temporary
Caching API
Description and Status
●   Formed 20/3/2001
●   Abstracts user from the Cache Providers in much
    the same way as Java DataBase Connectivity
    (JDBC™) does for databases
●   Many think it is moribund
●   Too important not to be finalized
●   Forthcoming ehcache-1.3 Implementation can be
    used with interfaces in net.sf.jsr107cache
●   JCache expert group has reactivated and will be
    conducting meetings this week on the spec
                         2007 JavaOneSM Conference | Session TS-6175 |   36
JSR 107—JCACHE
Basic Usage
1. Add ehcache-1.3 and jsr107cache jar to your
   classpath
2. Place configuration in ehcache.xml and add it
   to your classpath
3. Specify a CacheFactory in META-
   INF/services/net.sf.jsr107cache.CacheFactory
  net.sf.ehcache.jcache.JCacheFactory

4. Create a CacheManager
  CacheManager manager = CacheManager.getInstance();




                           2007 JavaOneSM Conference | Session TS-6175 |   37
JSR 107—JCACHE
Basic Usage (Cont.)
5. Create a Cache
       Map env = new HashMap();
       env.put("name", "test4");
       env.put("maxElementsInMemory", "1000");
       env.put("overflowToDisk", "true");
       env.put("eternal", "true");
       env.put("timeToLiveSeconds", "0");
       env.put("timeToIdleSeconds", "0");
       cache = manager.getCacheFactory().createCache(env);

6.Reference a Cache
  Cache sampleCache = manager.getCache();

  or   manager.addCache(ehcache);
       Cache cache = new JCache(ehcache, null);

7.Use it
  sampleCache.put(“key”, “value”));
  sampleCache.get(“key”);
                             2007 JavaOneSM Conference | Session TS-6175 |   38
Agenda
Introduction
Make Your Application 10–1,000 Times Faster
General Purpose Caching
Web Caching
Java Persistence API (JPA)/Hibernate Caching
Distributed Caching for Clusters
Step-by-Step Coding Demo
Do It With Standards—JSR 107 JCACHE
Making It Real: A Wotif.com Case Study
                 2007 JavaOneSM Conference | Session TS-6175 |   39
Wotif.com Case Study
      Key facts and figures
      ●     Australia’s No. 1 Hotel Booking Site
      ●     Rapidly Growing elsewhere
      ●     1,000,000 users
      ●     10,000 concurrent users
      ●     3.6 million room nights sold per year
      ●     9,000 hotels
      ●     Very Large Pages by design (some > 1.5MB)

Source: http://blogs.sun.com/stories/entry/wotif
        http://www.networksasia.net/ena/article/articleDetail.jsp?id=393040
        http://info.wotif.com/pdf/Wotif.com_Facts_Figures.pdf
                                                     2007 JavaOneSM Conference | Session TS-6175 |   40
Wotif.com Case Study
      Screen shots—Home Page




Source: http://wotif.com
                           2007 JavaOneSM Conference | Session TS-6175 |   41
Wotif.com Case Study
       Screen shots—Search Results




   ●   + 15 more screenfuls for a total of 1.5MB
   ●   Support many of these per second
Source: http://www.wotif.com/search/Simple?refine=simpleSearch&country=1&region=1&viewType=all
                                                 2007 JavaOneSM Conference | Session TS-6175 |   42
Wotif.com Case Study
Technology Platform
●   Sun AMD64 Servers
●   RHEL5
●   64-bit Java technology
●   GlassFish™ Project
●   Open Message Queue
●   Oracle and MySQL
●   Java Platform, Enterprise Edition (Java EE
    platform) 5 with Enterprise JavaBeans™
    (EJB™) 3, JavaServer Pages™ (JSP™) 2
●   Also lots of open source
                      2007 JavaOneSM Conference | Session TS-6175 |   43
Wotif.com Case Study
ehcache
●   150 caches
●   Hibernate 2 and Hibernate 3 Persistent Object
    and Collection Caches
●   Distributed Page Caches in a “Customer” cluster
●   AJAX XML Response Caches
●   Distributed Java Object Caches in a “Supplier”
    cluster
●   Uses SelfPopulating and Blocking Cache
●   Web Cache Full Page and Fragment Web Filters
●   Disk Store and Persistent Disk Stores
                     2007 JavaOneSM Conference | Session TS-6175 |   44
Wotif.com Case Study
How we came to implement a Cache
● Started with Apache JCS. It had some serious threading
  bugs 3 years ago. Submitted a patch which was ignored
  by the maintainer.
● Mentioned on the Hibernate mailing list about JCS
  problems and linked the patch for people to apply.
● Gavin King suggested forking JCS. On the basis that
  Hibernate would use the forked version ehcache was
  born. It originally stood for Easy Hibernate Cache.
● ehcache’s evolution mirrors Wotif.com’s own need for
  caching features with the progression of MemoryStore ->
  DiskStore -> SelfPopulatingCache -> Web Response
  Caching -> Persistent Disk Store -> Distributed Caching.

                       2007 JavaOneSM Conference | Session TS-6175 |   45
DEMO
1. Web App on GlassFish Project without caching
2. Add caching to a single instance
3. Use distributed caching with n instances




                   2007 JavaOneSM Conference | Session TS-6175 |   46
Summary
●   Most apps will benefit from caching
●   You can calculate the speed up
●   ehcache is easy to use directly
●   You can also benefit from ehcache indirectly
    through frameworks that use it
●   Distributed ehcache is a small configuration step
●   Abstract yourself from Caching Providers
    using JCACHE


                      2007 JavaOneSM Conference | Session TS-6175 |   47
For More Information
●   Project Website:
    http://ehcache.sf.net
●   Downloadable Book:
    http://ehcache.sourceforge.net/EhcacheUserGuide.pdf
●   My Email:
    gluck@gregluck.com




                       2007 JavaOneSM Conference | Session TS-6175 |   48
Q&A
Greg Luck
gluck@gregluck.com




                 2007 JavaOneSM Conference | Session TS-6175 |   49
Distributed Caching Using the
JCACHE API and ehcache, Including
a Case Study on Wotif.com
Greg Luck
Maintainer, ehcache—http://ehcache.sf.net
Member, JSR 107 JCACHE Expert Group
Chief Architect, Wotif.com—http://wotif.com

TS-6175

                        2007 JavaOneSM Conference | Session TS-6175 |

Mais conteúdo relacionado

Mais procurados

Ibm web sphere application server interview questions
Ibm web sphere application server interview questionsIbm web sphere application server interview questions
Ibm web sphere application server interview questionspraveen_guda
 
카프카(kafka) 성능 테스트 환경 구축 (JMeter, ELK)
카프카(kafka) 성능 테스트 환경 구축 (JMeter, ELK)카프카(kafka) 성능 테스트 환경 구축 (JMeter, ELK)
카프카(kafka) 성능 테스트 환경 구축 (JMeter, ELK)Hyunmin Lee
 
Why you should switch to Cypress for modern web testing?
Why you should switch to Cypress for modern web testing?Why you should switch to Cypress for modern web testing?
Why you should switch to Cypress for modern web testing?Shivam Bharadwaj
 
Responsive web designing
Responsive web designingResponsive web designing
Responsive web designingAanand Bohara
 
Open source apm scouter를 통한 관제 관리 jadecross 정환열 수석
Open source apm scouter를 통한 관제  관리 jadecross 정환열 수석Open source apm scouter를 통한 관제  관리 jadecross 정환열 수석
Open source apm scouter를 통한 관제 관리 jadecross 정환열 수석uEngine Solutions
 
Managing Your Security Logs with Elasticsearch
Managing Your Security Logs with ElasticsearchManaging Your Security Logs with Elasticsearch
Managing Your Security Logs with ElasticsearchVic Hargrave
 
[오픈소스컨설팅]Java Performance Tuning
[오픈소스컨설팅]Java Performance Tuning[오픈소스컨설팅]Java Performance Tuning
[오픈소스컨설팅]Java Performance TuningJi-Woong Choi
 
Presentation oracle on power power advantages and license optimization
Presentation   oracle on power power advantages and license optimizationPresentation   oracle on power power advantages and license optimization
Presentation oracle on power power advantages and license optimizationsolarisyougood
 
Intro to Reactive Programming
Intro to Reactive ProgrammingIntro to Reactive Programming
Intro to Reactive ProgrammingStéphane Maldini
 
Reactive Microservices with Quarkus
Reactive Microservices with QuarkusReactive Microservices with Quarkus
Reactive Microservices with QuarkusNiklas Heidloff
 
Oracle_Retail_Xstore_Suite_Install.pdf
Oracle_Retail_Xstore_Suite_Install.pdfOracle_Retail_Xstore_Suite_Install.pdf
Oracle_Retail_Xstore_Suite_Install.pdfvamshikkrishna1
 
Spring Boot Interview Questions | Edureka
Spring Boot Interview Questions | EdurekaSpring Boot Interview Questions | Edureka
Spring Boot Interview Questions | EdurekaEdureka!
 
[오픈소스컨설팅] 스카우터 사용자 가이드 2020
[오픈소스컨설팅] 스카우터 사용자 가이드 2020[오픈소스컨설팅] 스카우터 사용자 가이드 2020
[오픈소스컨설팅] 스카우터 사용자 가이드 2020Ji-Woong Choi
 
apidays Paris 2022 - Adding a mock as a service capability to your API strate...
apidays Paris 2022 - Adding a mock as a service capability to your API strate...apidays Paris 2022 - Adding a mock as a service capability to your API strate...
apidays Paris 2022 - Adding a mock as a service capability to your API strate...apidays
 
Reactive Programming In Java Using: Project Reactor
Reactive Programming In Java Using: Project ReactorReactive Programming In Java Using: Project Reactor
Reactive Programming In Java Using: Project ReactorKnoldus Inc.
 
Cypress vs Selenium WebDriver: Better, Or Just Different? -- by Gil Tayar
Cypress vs Selenium WebDriver: Better, Or Just Different? -- by Gil TayarCypress vs Selenium WebDriver: Better, Or Just Different? -- by Gil Tayar
Cypress vs Selenium WebDriver: Better, Or Just Different? -- by Gil TayarApplitools
 

Mais procurados (20)

Ibm web sphere application server interview questions
Ibm web sphere application server interview questionsIbm web sphere application server interview questions
Ibm web sphere application server interview questions
 
카프카(kafka) 성능 테스트 환경 구축 (JMeter, ELK)
카프카(kafka) 성능 테스트 환경 구축 (JMeter, ELK)카프카(kafka) 성능 테스트 환경 구축 (JMeter, ELK)
카프카(kafka) 성능 테스트 환경 구축 (JMeter, ELK)
 
Why you should switch to Cypress for modern web testing?
Why you should switch to Cypress for modern web testing?Why you should switch to Cypress for modern web testing?
Why you should switch to Cypress for modern web testing?
 
Responsive web designing
Responsive web designingResponsive web designing
Responsive web designing
 
Springboot Microservices
Springboot MicroservicesSpringboot Microservices
Springboot Microservices
 
Angular PWA
Angular PWAAngular PWA
Angular PWA
 
Introducao EJB 3
Introducao EJB 3Introducao EJB 3
Introducao EJB 3
 
Open source apm scouter를 통한 관제 관리 jadecross 정환열 수석
Open source apm scouter를 통한 관제  관리 jadecross 정환열 수석Open source apm scouter를 통한 관제  관리 jadecross 정환열 수석
Open source apm scouter를 통한 관제 관리 jadecross 정환열 수석
 
Managing Your Security Logs with Elasticsearch
Managing Your Security Logs with ElasticsearchManaging Your Security Logs with Elasticsearch
Managing Your Security Logs with Elasticsearch
 
[오픈소스컨설팅]Java Performance Tuning
[오픈소스컨설팅]Java Performance Tuning[오픈소스컨설팅]Java Performance Tuning
[오픈소스컨설팅]Java Performance Tuning
 
Presentation oracle on power power advantages and license optimization
Presentation   oracle on power power advantages and license optimizationPresentation   oracle on power power advantages and license optimization
Presentation oracle on power power advantages and license optimization
 
Intro to Reactive Programming
Intro to Reactive ProgrammingIntro to Reactive Programming
Intro to Reactive Programming
 
Reactive Microservices with Quarkus
Reactive Microservices with QuarkusReactive Microservices with Quarkus
Reactive Microservices with Quarkus
 
Oracle_Retail_Xstore_Suite_Install.pdf
Oracle_Retail_Xstore_Suite_Install.pdfOracle_Retail_Xstore_Suite_Install.pdf
Oracle_Retail_Xstore_Suite_Install.pdf
 
Spring Boot Interview Questions | Edureka
Spring Boot Interview Questions | EdurekaSpring Boot Interview Questions | Edureka
Spring Boot Interview Questions | Edureka
 
[오픈소스컨설팅] 스카우터 사용자 가이드 2020
[오픈소스컨설팅] 스카우터 사용자 가이드 2020[오픈소스컨설팅] 스카우터 사용자 가이드 2020
[오픈소스컨설팅] 스카우터 사용자 가이드 2020
 
apidays Paris 2022 - Adding a mock as a service capability to your API strate...
apidays Paris 2022 - Adding a mock as a service capability to your API strate...apidays Paris 2022 - Adding a mock as a service capability to your API strate...
apidays Paris 2022 - Adding a mock as a service capability to your API strate...
 
Firebase slide
Firebase slideFirebase slide
Firebase slide
 
Reactive Programming In Java Using: Project Reactor
Reactive Programming In Java Using: Project ReactorReactive Programming In Java Using: Project Reactor
Reactive Programming In Java Using: Project Reactor
 
Cypress vs Selenium WebDriver: Better, Or Just Different? -- by Gil Tayar
Cypress vs Selenium WebDriver: Better, Or Just Different? -- by Gil TayarCypress vs Selenium WebDriver: Better, Or Just Different? -- by Gil Tayar
Cypress vs Selenium WebDriver: Better, Or Just Different? -- by Gil Tayar
 

Destaque

Distributed caching with java JCache
Distributed caching with java JCacheDistributed caching with java JCache
Distributed caching with java JCacheKasun Gajasinghe
 
Java cluster-based certificate revocation with vindication capability for mo...
Java  cluster-based certificate revocation with vindication capability for mo...Java  cluster-based certificate revocation with vindication capability for mo...
Java cluster-based certificate revocation with vindication capability for mo...ecwayerode
 
Developing High Performance and Scalable ColdFusion Application Using Terraco...
Developing High Performance and Scalable ColdFusion Application Using Terraco...Developing High Performance and Scalable ColdFusion Application Using Terraco...
Developing High Performance and Scalable ColdFusion Application Using Terraco...ColdFusionConference
 
Predicting Defects in SAP Java Code: An Experience Report
Predicting Defects in SAP Java Code: An Experience ReportPredicting Defects in SAP Java Code: An Experience Report
Predicting Defects in SAP Java Code: An Experience Reporttilman.holschuh
 
SAP Integration with Red Hat JBoss Technologies
SAP Integration with Red Hat JBoss TechnologiesSAP Integration with Red Hat JBoss Technologies
SAP Integration with Red Hat JBoss Technologieshwilming
 
The new ehcache 2.0 and hibernate spi
The new ehcache 2.0 and hibernate spiThe new ehcache 2.0 and hibernate spi
The new ehcache 2.0 and hibernate spiCyril Lakech
 
Intro To Sap Netweaver Java
Intro To Sap Netweaver JavaIntro To Sap Netweaver Java
Intro To Sap Netweaver JavaLeland Bartlett
 
Practical SAP pentesting workshop (NullCon Goa)
Practical SAP pentesting workshop (NullCon Goa)Practical SAP pentesting workshop (NullCon Goa)
Practical SAP pentesting workshop (NullCon Goa)ERPScan
 
Integrating SAP the Java EE Way - JBoss One Day talk 2012
Integrating SAP the Java EE Way - JBoss One Day talk 2012Integrating SAP the Java EE Way - JBoss One Day talk 2012
Integrating SAP the Java EE Way - JBoss One Day talk 2012hwilming
 
Low latency Java apps
Low latency Java appsLow latency Java apps
Low latency Java appsSimon Ritter
 
Sap java connector / Hybris RFC
Sap java connector / Hybris RFCSap java connector / Hybris RFC
Sap java connector / Hybris RFCMonsif Elaissoussi
 
Caching In Java- Best Practises and Pitfalls
Caching In Java- Best Practises and PitfallsCaching In Java- Best Practises and Pitfalls
Caching In Java- Best Practises and PitfallsHARIHARAN ANANTHARAMAN
 
Overview of the ehcache
Overview of the ehcacheOverview of the ehcache
Overview of the ehcacheHyeonSeok Choi
 
Building low latency java applications with ehcache
Building low latency java applications with ehcacheBuilding low latency java applications with ehcache
Building low latency java applications with ehcacheChris Westin
 

Destaque (16)

Distributed caching with java JCache
Distributed caching with java JCacheDistributed caching with java JCache
Distributed caching with java JCache
 
Java cluster-based certificate revocation with vindication capability for mo...
Java  cluster-based certificate revocation with vindication capability for mo...Java  cluster-based certificate revocation with vindication capability for mo...
Java cluster-based certificate revocation with vindication capability for mo...
 
Developing High Performance and Scalable ColdFusion Application Using Terraco...
Developing High Performance and Scalable ColdFusion Application Using Terraco...Developing High Performance and Scalable ColdFusion Application Using Terraco...
Developing High Performance and Scalable ColdFusion Application Using Terraco...
 
SAP and Red Hat JBoss Partner Webinar
SAP and Red Hat JBoss Partner WebinarSAP and Red Hat JBoss Partner Webinar
SAP and Red Hat JBoss Partner Webinar
 
Predicting Defects in SAP Java Code: An Experience Report
Predicting Defects in SAP Java Code: An Experience ReportPredicting Defects in SAP Java Code: An Experience Report
Predicting Defects in SAP Java Code: An Experience Report
 
Sap java
Sap javaSap java
Sap java
 
SAP Integration with Red Hat JBoss Technologies
SAP Integration with Red Hat JBoss TechnologiesSAP Integration with Red Hat JBoss Technologies
SAP Integration with Red Hat JBoss Technologies
 
The new ehcache 2.0 and hibernate spi
The new ehcache 2.0 and hibernate spiThe new ehcache 2.0 and hibernate spi
The new ehcache 2.0 and hibernate spi
 
Intro To Sap Netweaver Java
Intro To Sap Netweaver JavaIntro To Sap Netweaver Java
Intro To Sap Netweaver Java
 
Practical SAP pentesting workshop (NullCon Goa)
Practical SAP pentesting workshop (NullCon Goa)Practical SAP pentesting workshop (NullCon Goa)
Practical SAP pentesting workshop (NullCon Goa)
 
Integrating SAP the Java EE Way - JBoss One Day talk 2012
Integrating SAP the Java EE Way - JBoss One Day talk 2012Integrating SAP the Java EE Way - JBoss One Day talk 2012
Integrating SAP the Java EE Way - JBoss One Day talk 2012
 
Low latency Java apps
Low latency Java appsLow latency Java apps
Low latency Java apps
 
Sap java connector / Hybris RFC
Sap java connector / Hybris RFCSap java connector / Hybris RFC
Sap java connector / Hybris RFC
 
Caching In Java- Best Practises and Pitfalls
Caching In Java- Best Practises and PitfallsCaching In Java- Best Practises and Pitfalls
Caching In Java- Best Practises and Pitfalls
 
Overview of the ehcache
Overview of the ehcacheOverview of the ehcache
Overview of the ehcache
 
Building low latency java applications with ehcache
Building low latency java applications with ehcacheBuilding low latency java applications with ehcache
Building low latency java applications with ehcache
 

Semelhante a Distributed Caching Using the JCACHE API and ehcache, Including a Case Study on Wotif.com

Ehcache Architecture, Features And Usage Patterns
Ehcache Architecture, Features And Usage PatternsEhcache Architecture, Features And Usage Patterns
Ehcache Architecture, Features And Usage PatternsEduardo Pelegri-Llopart
 
EMC Multisite DR for SQL Server 2012
EMC Multisite DR for SQL Server 2012EMC Multisite DR for SQL Server 2012
EMC Multisite DR for SQL Server 2012xKinAnx
 
VMworld 2013: Extreme Performance Series: Storage in a Flash
VMworld 2013: Extreme Performance Series: Storage in a Flash VMworld 2013: Extreme Performance Series: Storage in a Flash
VMworld 2013: Extreme Performance Series: Storage in a Flash VMworld
 
Joomla! Performance on Steroids
Joomla! Performance on SteroidsJoomla! Performance on Steroids
Joomla! Performance on SteroidsSiteGround.com
 
Developing High Performance and Scalable ColdFusion Applications Using Terrac...
Developing High Performance and Scalable ColdFusion Applications Using Terrac...Developing High Performance and Scalable ColdFusion Applications Using Terrac...
Developing High Performance and Scalable ColdFusion Applications Using Terrac...Shailendra Prasad
 
Emc vspex customer_presentation_private_cloud_virtualized_share_point
Emc vspex customer_presentation_private_cloud_virtualized_share_pointEmc vspex customer_presentation_private_cloud_virtualized_share_point
Emc vspex customer_presentation_private_cloud_virtualized_share_pointxKinAnx
 
Faq websphere performance
Faq websphere performanceFaq websphere performance
Faq websphere performancebudakia
 
VMworld 2013: How SRP Delivers More Than Power to Their Customers
VMworld 2013: How SRP Delivers More Than Power to Their Customers VMworld 2013: How SRP Delivers More Than Power to Their Customers
VMworld 2013: How SRP Delivers More Than Power to Their Customers VMworld
 
Scale Your Data Tier with Windows Server AppFabric
Scale Your Data Tier with Windows Server AppFabricScale Your Data Tier with Windows Server AppFabric
Scale Your Data Tier with Windows Server AppFabricWim Van den Broeck
 
Advanced caching techniques with ehcache, big memory, terracotta, and coldfusion
Advanced caching techniques with ehcache, big memory, terracotta, and coldfusionAdvanced caching techniques with ehcache, big memory, terracotta, and coldfusion
Advanced caching techniques with ehcache, big memory, terracotta, and coldfusionColdFusionConference
 
Troubleshooting Memory Problems in Java Applications
Troubleshooting Memory Problems in Java ApplicationsTroubleshooting Memory Problems in Java Applications
Troubleshooting Memory Problems in Java ApplicationsPoonam Bajaj Parhar
 
Caching fundamentals by Shrikant Vashishtha
Caching fundamentals by Shrikant VashishthaCaching fundamentals by Shrikant Vashishtha
Caching fundamentals by Shrikant VashishthaShriKant Vashishtha
 
Mysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New FeaturesMysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New FeaturesTarique Saleem
 
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
 Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL SupportMysql User Camp
 
Centralized logging for (java) applications with the elastic stack made easy
Centralized logging for (java) applications with the elastic stack   made easyCentralized logging for (java) applications with the elastic stack   made easy
Centralized logging for (java) applications with the elastic stack made easyfelixbarny
 
VMworld 2013: VMware Disaster Recovery Solution with Oracle Data Guard and Si...
VMworld 2013: VMware Disaster Recovery Solution with Oracle Data Guard and Si...VMworld 2013: VMware Disaster Recovery Solution with Oracle Data Guard and Si...
VMworld 2013: VMware Disaster Recovery Solution with Oracle Data Guard and Si...VMworld
 
Coherence RoadMap 2018
Coherence RoadMap 2018Coherence RoadMap 2018
Coherence RoadMap 2018harvraja
 
Caching and JCache with Greg Luck 18.02.16
Caching and JCache with Greg Luck 18.02.16Caching and JCache with Greg Luck 18.02.16
Caching and JCache with Greg Luck 18.02.16Comsysto Reply GmbH
 
Guaranteeing CloudStack Storage Performance
Guaranteeing CloudStack Storage Performance Guaranteeing CloudStack Storage Performance
Guaranteeing CloudStack Storage Performance NetApp
 

Semelhante a Distributed Caching Using the JCACHE API and ehcache, Including a Case Study on Wotif.com (20)

Ehcache Architecture, Features And Usage Patterns
Ehcache Architecture, Features And Usage PatternsEhcache Architecture, Features And Usage Patterns
Ehcache Architecture, Features And Usage Patterns
 
EMC Multisite DR for SQL Server 2012
EMC Multisite DR for SQL Server 2012EMC Multisite DR for SQL Server 2012
EMC Multisite DR for SQL Server 2012
 
VMworld 2013: Extreme Performance Series: Storage in a Flash
VMworld 2013: Extreme Performance Series: Storage in a Flash VMworld 2013: Extreme Performance Series: Storage in a Flash
VMworld 2013: Extreme Performance Series: Storage in a Flash
 
Joomla! Performance on Steroids
Joomla! Performance on SteroidsJoomla! Performance on Steroids
Joomla! Performance on Steroids
 
Developing High Performance and Scalable ColdFusion Applications Using Terrac...
Developing High Performance and Scalable ColdFusion Applications Using Terrac...Developing High Performance and Scalable ColdFusion Applications Using Terrac...
Developing High Performance and Scalable ColdFusion Applications Using Terrac...
 
Emc vspex customer_presentation_private_cloud_virtualized_share_point
Emc vspex customer_presentation_private_cloud_virtualized_share_pointEmc vspex customer_presentation_private_cloud_virtualized_share_point
Emc vspex customer_presentation_private_cloud_virtualized_share_point
 
Faq websphere performance
Faq websphere performanceFaq websphere performance
Faq websphere performance
 
JCache Using JCache
JCache Using JCacheJCache Using JCache
JCache Using JCache
 
VMworld 2013: How SRP Delivers More Than Power to Their Customers
VMworld 2013: How SRP Delivers More Than Power to Their Customers VMworld 2013: How SRP Delivers More Than Power to Their Customers
VMworld 2013: How SRP Delivers More Than Power to Their Customers
 
Scale Your Data Tier with Windows Server AppFabric
Scale Your Data Tier with Windows Server AppFabricScale Your Data Tier with Windows Server AppFabric
Scale Your Data Tier with Windows Server AppFabric
 
Advanced caching techniques with ehcache, big memory, terracotta, and coldfusion
Advanced caching techniques with ehcache, big memory, terracotta, and coldfusionAdvanced caching techniques with ehcache, big memory, terracotta, and coldfusion
Advanced caching techniques with ehcache, big memory, terracotta, and coldfusion
 
Troubleshooting Memory Problems in Java Applications
Troubleshooting Memory Problems in Java ApplicationsTroubleshooting Memory Problems in Java Applications
Troubleshooting Memory Problems in Java Applications
 
Caching fundamentals by Shrikant Vashishtha
Caching fundamentals by Shrikant VashishthaCaching fundamentals by Shrikant Vashishtha
Caching fundamentals by Shrikant Vashishtha
 
Mysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New FeaturesMysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New Features
 
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
 Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
 
Centralized logging for (java) applications with the elastic stack made easy
Centralized logging for (java) applications with the elastic stack   made easyCentralized logging for (java) applications with the elastic stack   made easy
Centralized logging for (java) applications with the elastic stack made easy
 
VMworld 2013: VMware Disaster Recovery Solution with Oracle Data Guard and Si...
VMworld 2013: VMware Disaster Recovery Solution with Oracle Data Guard and Si...VMworld 2013: VMware Disaster Recovery Solution with Oracle Data Guard and Si...
VMworld 2013: VMware Disaster Recovery Solution with Oracle Data Guard and Si...
 
Coherence RoadMap 2018
Coherence RoadMap 2018Coherence RoadMap 2018
Coherence RoadMap 2018
 
Caching and JCache with Greg Luck 18.02.16
Caching and JCache with Greg Luck 18.02.16Caching and JCache with Greg Luck 18.02.16
Caching and JCache with Greg Luck 18.02.16
 
Guaranteeing CloudStack Storage Performance
Guaranteeing CloudStack Storage Performance Guaranteeing CloudStack Storage Performance
Guaranteeing CloudStack Storage Performance
 

Mais de elliando dias

Clojurescript slides
Clojurescript slidesClojurescript slides
Clojurescript slideselliando dias
 
Why you should be excited about ClojureScript
Why you should be excited about ClojureScriptWhy you should be excited about ClojureScript
Why you should be excited about ClojureScriptelliando dias
 
Functional Programming with Immutable Data Structures
Functional Programming with Immutable Data StructuresFunctional Programming with Immutable Data Structures
Functional Programming with Immutable Data Structureselliando dias
 
Nomenclatura e peças de container
Nomenclatura  e peças de containerNomenclatura  e peças de container
Nomenclatura e peças de containerelliando dias
 
Polyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better AgilityPolyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better Agilityelliando dias
 
Javascript Libraries
Javascript LibrariesJavascript Libraries
Javascript Librarieselliando dias
 
How to Make an Eight Bit Computer and Save the World!
How to Make an Eight Bit Computer and Save the World!How to Make an Eight Bit Computer and Save the World!
How to Make an Eight Bit Computer and Save the World!elliando dias
 
A Practical Guide to Connecting Hardware to the Web
A Practical Guide to Connecting Hardware to the WebA Practical Guide to Connecting Hardware to the Web
A Practical Guide to Connecting Hardware to the Webelliando dias
 
Introdução ao Arduino
Introdução ao ArduinoIntrodução ao Arduino
Introdução ao Arduinoelliando dias
 
Incanter Data Sorcery
Incanter Data SorceryIncanter Data Sorcery
Incanter Data Sorceryelliando dias
 
Fab.in.a.box - Fab Academy: Machine Design
Fab.in.a.box - Fab Academy: Machine DesignFab.in.a.box - Fab Academy: Machine Design
Fab.in.a.box - Fab Academy: Machine Designelliando dias
 
The Digital Revolution: Machines that makes
The Digital Revolution: Machines that makesThe Digital Revolution: Machines that makes
The Digital Revolution: Machines that makeselliando dias
 
Hadoop - Simple. Scalable.
Hadoop - Simple. Scalable.Hadoop - Simple. Scalable.
Hadoop - Simple. Scalable.elliando dias
 
Hadoop and Hive Development at Facebook
Hadoop and Hive Development at FacebookHadoop and Hive Development at Facebook
Hadoop and Hive Development at Facebookelliando dias
 
Multi-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case StudyMulti-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case Studyelliando dias
 

Mais de elliando dias (20)

Clojurescript slides
Clojurescript slidesClojurescript slides
Clojurescript slides
 
Why you should be excited about ClojureScript
Why you should be excited about ClojureScriptWhy you should be excited about ClojureScript
Why you should be excited about ClojureScript
 
Functional Programming with Immutable Data Structures
Functional Programming with Immutable Data StructuresFunctional Programming with Immutable Data Structures
Functional Programming with Immutable Data Structures
 
Nomenclatura e peças de container
Nomenclatura  e peças de containerNomenclatura  e peças de container
Nomenclatura e peças de container
 
Geometria Projetiva
Geometria ProjetivaGeometria Projetiva
Geometria Projetiva
 
Polyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better AgilityPolyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better Agility
 
Javascript Libraries
Javascript LibrariesJavascript Libraries
Javascript Libraries
 
How to Make an Eight Bit Computer and Save the World!
How to Make an Eight Bit Computer and Save the World!How to Make an Eight Bit Computer and Save the World!
How to Make an Eight Bit Computer and Save the World!
 
Ragel talk
Ragel talkRagel talk
Ragel talk
 
A Practical Guide to Connecting Hardware to the Web
A Practical Guide to Connecting Hardware to the WebA Practical Guide to Connecting Hardware to the Web
A Practical Guide to Connecting Hardware to the Web
 
Introdução ao Arduino
Introdução ao ArduinoIntrodução ao Arduino
Introdução ao Arduino
 
Minicurso arduino
Minicurso arduinoMinicurso arduino
Minicurso arduino
 
Incanter Data Sorcery
Incanter Data SorceryIncanter Data Sorcery
Incanter Data Sorcery
 
Rango
RangoRango
Rango
 
Fab.in.a.box - Fab Academy: Machine Design
Fab.in.a.box - Fab Academy: Machine DesignFab.in.a.box - Fab Academy: Machine Design
Fab.in.a.box - Fab Academy: Machine Design
 
The Digital Revolution: Machines that makes
The Digital Revolution: Machines that makesThe Digital Revolution: Machines that makes
The Digital Revolution: Machines that makes
 
Hadoop + Clojure
Hadoop + ClojureHadoop + Clojure
Hadoop + Clojure
 
Hadoop - Simple. Scalable.
Hadoop - Simple. Scalable.Hadoop - Simple. Scalable.
Hadoop - Simple. Scalable.
 
Hadoop and Hive Development at Facebook
Hadoop and Hive Development at FacebookHadoop and Hive Development at Facebook
Hadoop and Hive Development at Facebook
 
Multi-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case StudyMulti-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case Study
 

Último

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 

Último (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 

Distributed Caching Using the JCACHE API and ehcache, Including a Case Study on Wotif.com

  • 1. Distributed Caching Using the JCACHE API and ehcache, Including a Case Study on Wotif.com Greg Luck Maintainer, ehcache—http://ehcache.sf.net Member, JSR 107 JCACHE Expert Group Chief Architect, Wotif.com—http://wotif.com TS-6175 2007 JavaOneSM Conference | Session TS-6175 |
  • 2. Goal of This Talk What You Will Gain Learn how to: - Use ehcache to make your apps fast - Use General, Hibernate, and Web caches - Configure caches as distributed caches for horizontal scaling - Abstract the Cache Provider with Java™ Specification Request (JSR) 107 JCache - Apply ehcache to real-world problems 2007 JavaOneSM Conference | Session TS-6175 | 2
  • 3. Agenda Introduction Make Your Application 10–1,000 Times Faster General Purpose Caching Web Caching Java Persistence API (JPA)/Hibernate Caching Distributed Caching for Clusters Step-by-Step Coding Demo Do It With Standards—JSR 107 JCACHE Making It Real: A Wotif.com Case Study 2007 JavaOneSM Conference | Session TS-6175 | 3
  • 4. Agenda Introduction Make Your Application 10–1,000 Times Faster General Purpose Caching Web Caching Java Persistence API (JPA)/Hibernate Caching Distributed Caching for Clusters Step-by-Step Coding Demo Do It With Standards—JSR 107 JCACHE Making It Real: A Wotif.com Case Study 2007 JavaOneSM Conference | Session TS-6175 | 4
  • 5. Introduction About ehcache ● Since 2003 ● Probably the most widely used Java platform Cache ● Apache 2.0 License ● Integrated with Spring and Hibernate ● Java Development Kit (JDK™) 1.4 and higher (from ehcache 1.2.4) ● Web Caching, Persistence Caching, General Purpose and Cache Constructs ● Distributed Caching implementation in 2006 ● JCACHE implementation released 2007 2007 JavaOneSM Conference | Session TS-6175 | 5
  • 6. Agenda Introduction Make Your Application 10–1,000 Times Faster General Purpose Caching Web Caching Java Persistence API (JPA)/Hibernate Caching Distributed Caching for Clusters Step-by-Step Coding Demo Do It With Standards—JSR 107 JCACHE Making It Real: A Wotif.com Case Study 2007 JavaOneSM Conference | Session TS-6175 | 6
  • 7. Make Your Application 10–1,000 Times Faster How much faster will caching make an application? ● It depends on a multitude of factors being: ● How many times a cached piece of data can and is reused by the application ● The proportion of the response time that is alleviated by caching ● In applications that are I/O bound, which is most business applications, most of the response time is getting data from a database; Therefore the speed up mostly depends on how much reuse a piece of data gets 2007 JavaOneSM Conference | Session TS-6175 | 7
  • 8. Make Your Application 10–1,000 Times Faster Cache Efficiency ● Factors which affect the efficiency of a cache are: ● Required Liveness of Data ● Proportion of total data cached ● Read/Write ratio ● Caching in a single VM vs. Caching Clusters 2007 JavaOneSM Conference | Session TS-6175 | 8
  • 9. Make Your Application 10–1,000 Times Faster How to calculate entire system speedup: Amdahl’s Law ● Amdahl’s law, after Gene Amdahl, is used to find the system speed up from a speed up in part of the system ● 1/ ((1 - Proportion Sped Up) + Proportion Sped Up / Speed up) ● Things to Watch: ● For a web application the “system” should include browser render time and network latency 2007 JavaOneSM Conference | Session TS-6175 | 9
  • 10. Make Your Application 10–1,000 Times Faster Speed up from a Web Page Cache Uncached page time: 2 seconds Cache retrieval time: 2ms Proportion: 100% The expected server-side system speedup is thus: 1 / ((1 - 1) + 1 / 1000) = 1 / (0 + .001) = 1,000 times system speedup The to the browser “system” speedup is much less 2007 JavaOneSM Conference | Session TS-6175 | 10
  • 11. Make Your Application 10–1,000 Times Faster Speed up from a Database Level Cache Uncached page time: 2 seconds Database time: 1.5 seconds Cache retrieval time: 2ms Proportion: 75% (1.5/2) The expected system speedup is thus: 1 / ((1 - .75) + .75 / (1500/2))) = 1 / (.25 + .75/750) = 3.98 times system speedup 2007 JavaOneSM Conference | Session TS-6175 | 11
  • 12. Make Your Application 10–1,000 Times Faster Speed compared with Memcached (smaller is better) 7000 6500 6000 5500 5000 4500 ehcache-1.2.4 memory 4000 ehcache-1.2.4 disk memcached-1.2.1 3500 3000 2500 2000 1500 1000 500 0 put/set get remove/delete 2007 JavaOneSM Conference | Session TS-6175 | 12
  • 13. Agenda Introduction Make Your Application 10–1,000 Times Faster General Purpose Caching Web Caching Java Persistence API (JPA)/Hibernate Caching Distributed Caching for Clusters Step-by-Step Coding Demo Do It With Standards—JSR 107 JCACHE Making It Real: A Wotif.com Case Study 2007 JavaOneSM Conference | Session TS-6175 | 13
  • 14. General Purpose Caching Step by Step 1. Add ehcache Java Archive (JAR) to your classpath 2. Place configuration in ehcache.xml and add it to your classpath 3. Create a CacheManager CacheManager manager = CacheManager.create(); 4. Reference a Cache ehcache sampleCache = manager.getCache(); 5. Use it sampleCache.put(new Element(“key”, “value”)); sampleCache.get(“key”); 2007 JavaOneSM Conference | Session TS-6175 | 14
  • 15. General Purpose Caching ehcache.xml Configuration <ehcache> <diskStore path="java.io.tmpdir"/> ... <cache name="sampleCache1" maxElementsInMemory="10000" maxElementsOnDisk="1000" eternal="false" overflowToDisk="true" timeToIdleSeconds="300" timeToLiveSeconds="600" memoryStoreEvictionPolicy="LFU" /> </ehcache> 2007 JavaOneSM Conference | Session TS-6175 | 15
  • 16. Agenda Introduction Make Your Application 10–1,000 Times Faster General Purpose Caching Web Caching Java Persistence API (JPA)/Hibernate Caching Distributed Caching for Clusters Step-by-Step Coding Demo Do It With Standards—JSR 107 JCACHE Making It Real: A Wotif.com Case Study 2007 JavaOneSM Conference | Session TS-6175 | 16
  • 17. Web Caching Step by Step 1. Use or Subclass SimpleCachingFilter or SimplePageFragmentCachingFilter 2. Configure filter in web.xml 3. Create a mapping in web.xml 4. Configure a cache entry matching the filter name 2007 JavaOneSM Conference | Session TS-6175 | 17
  • 18. Web Caching Example Scenario /index.jsp /include/footer.jsp 2007 JavaOneSM Conference | Session TS-6175 | 18
  • 19. Filter Configuration in web.xml Full Page Cache <filter> <filter-name>SimplePageCachingFilter</filter-name> <filter-class>net.sf.ehcache.constructs.web.filter. SimplePageCachingFilter </filter-class> </filter> <filter-mapping> <filter-name>SimplePageCachingFilter</filter-name> <url-pattern>/index.jsp</url-pattern> <dispatcher>REQUEST</dispatcher> <dispatcher>INCLUDE</dispatcher> <dispatcher>FORWARD</dispatcher> </filter-mapping> 2007 JavaOneSM Conference | Session TS-6175 | 19
  • 20. Add Cache to ehcache Configuration Full Page Cache <ehcache> <diskStore path="java.io.tmpdir"/> ... <cache name="SimplePageCachingFilter" maxElementsInMemory="10000" maxElementsOnDisk="1000" eternal="false" overflowToDisk="true" timeToIdleSeconds="300" timeToLiveSeconds="600" memoryStoreEvictionPolicy="LFU" /> </ehcache> 2007 JavaOneSM Conference | Session TS-6175 | 20
  • 21. Filter Configuration in web.xml Page Fragment Cache <filter> <filter-name>SimplePageFragmentCache</filter-name> <filter-class>net.sf.ehcache.constructs.web.filter. SimplePageFragmentCachingFilter </filter-class> </filter> <!-- Page Fragment Cache --> <filter-mapping> <filter-name>SimplePageFragmentCachingFilter </filter-name> <url-pattern>/include/Footer.jsp</url-pattern> </filter-mapping> 2007 JavaOneSM Conference | Session TS-6175 | 21
  • 22. Agenda Introduction Make Your Application 10–1,000 Times Faster General Purpose Caching Web Caching Java Persistence API (JPA)/Hibernate Caching Distributed Caching for Clusters Step-by-Step Coding Demo Do It With Standards—JSR 107 JCACHE Making It Real: A Wotif.com Case Study 2007 JavaOneSM Conference | Session TS-6175 | 22
  • 23. JPA/Hibernate Caching Overview ● Hibernate can either be used directly either or via the Hibernate Java Persistence API Provider in Hibernate 3.2 ● ehcache is a CacheProvider for Hibernate 2.x and 3.x Example ● Simple Country persistent object/Entity 2007 JavaOneSM Conference | Session TS-6175 | 23
  • 24. JPA/Hibernate Caching Step by Step 1. Configure Hibernate to use ehcache 2. Configure the Country object’s cacheability; this can be done in a number of ways 3. Decide whether to use defaults, or to configure specific cache settings for the Country object cache in ehcache.xml 2007 JavaOneSM Conference | Session TS-6175 | 24
  • 25. JPA/Hibernate Caching Configure Hibernate to use ehcache Add the following to hibernate.properties: hibernate.cache.provider_class=net.sf.ehcache.hibernate.EhCacheProvider <!-- optional configuration file parameter --> net.sf.ehcache.configurationResourceName=/name_of_configuration_resource 2007 JavaOneSM Conference | Session TS-6175 | 25
  • 26. JPA/Hibernate Caching Native Hibernate Mapping File Configuration <hibernate-mapping> <class name="com.somecompany.someproject.domain.Country" table="ut_Countries" dynamic-update="false" dynamic-insert="false" > <cache usage="read-write|nonstrict-read-write|read-only" /> </class> ... </hibernate-mapping> <cache usage="transactional|read-write|nonstrict-read-write|read-only" region="RegionName" include="all|non-lazy" /> 2007 JavaOneSM Conference | Session TS-6175 | 26
  • 27. JPA/Hibernate Caching Entity Configuration With JPA and Hibernate Annotations @Entity ... @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE) public Class Country { private String name; ... } 2007 JavaOneSM Conference | Session TS-6175 | 27
  • 28. Agenda Introduction Make Your Application 10–1,000 Times Faster General Purpose Caching Web Caching Java Persistence API (JPA)/Hibernate Caching Distributed Caching for Clusters Step-by-Step Coding Demo Do It With Standards—JSR 107 JCACHE Making It Real: A Wotif.com Case Study 2007 JavaOneSM Conference | Session TS-6175 | 28
  • 29. Distributed Caching for Clusters Features 1. Pluggable distribution mechanism. 2. Comes with an RMI-based replicator. JGroups coming. Easy to add others. 3. Multiple “clusters” 4. Replication set per Cache. Options: 1. Replicate adds 2. Replicate removes 3. Replicate update by copy or invalidate 4. Async or Sync 5. Bootstrapping from existing Caches in a cluster 2007 JavaOneSM Conference | Session TS-6175 | 29
  • 30. Distributed Caching for Clusters Architecture 2007 JavaOneSM Conference | Session TS-6175 | 30
  • 31. Distributed Caching for Clusters RMI-Based Replication 1. Multicast Peer Discovery <cacheManagerPeerProviderFactory class= "net.sf.ehcache.distribution. RMICacheManagerPeerProviderFactory" properties="peerDiscovery=automatic, multicastGroupAddress=230.0.0.1, multicastGroupPort=4446/> 2. RMI Listener <cacheManagerPeerListenerFactory class= "net.sf.ehcache.distribution.RMICacheManagerPeerLis tenerFactory"properties="port=40001"/> 2007 JavaOneSM Conference | Session TS-6175 | 31
  • 32. Distributed Caching for Clusters Set Replication Per Cache <cache ...> <cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory" properties="replicateAsynchronously=true, replicatePuts=true, replicateUpdates=true, replicateUpdatesViaCopy=true, replicateRemovals=true, asynchronousReplicationIntervalMillis=1000"/> ... </cache> 2007 JavaOneSM Conference | Session TS-6175 | 32
  • 33. Distributed Caching for Clusters Set Bootstrapping Per Cache <cache ...> <bootstrapCacheLoaderFactory class=" net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory" properties="bootstrapAsynchronously=true, maximumChunkSizeBytes=5000000"/> </cache> 2007 JavaOneSM Conference | Session TS-6175 | 33
  • 34. Agenda Introduction Make Your Application 10–1,000 Times Faster General Purpose Caching Web Caching Java Persistence API (JPA)/Hibernate Caching Distributed Caching for Clusters Step-by-Step Coding Demo Do It With Standards—JSR 107 JCACHE Making It Real: A Wotif.com Case Study 2007 JavaOneSM Conference | Session TS-6175 | 34
  • 35. Agenda Introduction Make Your Application 10–1,000 Times Faster General Purpose Caching Web Caching Java Persistence API (JPA)/Hibernate Caching Distributed Caching for Clusters Step-by-Step Coding Demo Do It With Standards—JSR 107 JCACHE Making It Real: A Wotif.com Case Study 2007 JavaOneSM Conference | Session TS-6175 | 35
  • 36. JSR 107—JCACHE: Java Temporary Caching API Description and Status ● Formed 20/3/2001 ● Abstracts user from the Cache Providers in much the same way as Java DataBase Connectivity (JDBC™) does for databases ● Many think it is moribund ● Too important not to be finalized ● Forthcoming ehcache-1.3 Implementation can be used with interfaces in net.sf.jsr107cache ● JCache expert group has reactivated and will be conducting meetings this week on the spec 2007 JavaOneSM Conference | Session TS-6175 | 36
  • 37. JSR 107—JCACHE Basic Usage 1. Add ehcache-1.3 and jsr107cache jar to your classpath 2. Place configuration in ehcache.xml and add it to your classpath 3. Specify a CacheFactory in META- INF/services/net.sf.jsr107cache.CacheFactory net.sf.ehcache.jcache.JCacheFactory 4. Create a CacheManager CacheManager manager = CacheManager.getInstance(); 2007 JavaOneSM Conference | Session TS-6175 | 37
  • 38. JSR 107—JCACHE Basic Usage (Cont.) 5. Create a Cache Map env = new HashMap(); env.put("name", "test4"); env.put("maxElementsInMemory", "1000"); env.put("overflowToDisk", "true"); env.put("eternal", "true"); env.put("timeToLiveSeconds", "0"); env.put("timeToIdleSeconds", "0"); cache = manager.getCacheFactory().createCache(env); 6.Reference a Cache Cache sampleCache = manager.getCache(); or manager.addCache(ehcache); Cache cache = new JCache(ehcache, null); 7.Use it sampleCache.put(“key”, “value”)); sampleCache.get(“key”); 2007 JavaOneSM Conference | Session TS-6175 | 38
  • 39. Agenda Introduction Make Your Application 10–1,000 Times Faster General Purpose Caching Web Caching Java Persistence API (JPA)/Hibernate Caching Distributed Caching for Clusters Step-by-Step Coding Demo Do It With Standards—JSR 107 JCACHE Making It Real: A Wotif.com Case Study 2007 JavaOneSM Conference | Session TS-6175 | 39
  • 40. Wotif.com Case Study Key facts and figures ● Australia’s No. 1 Hotel Booking Site ● Rapidly Growing elsewhere ● 1,000,000 users ● 10,000 concurrent users ● 3.6 million room nights sold per year ● 9,000 hotels ● Very Large Pages by design (some > 1.5MB) Source: http://blogs.sun.com/stories/entry/wotif http://www.networksasia.net/ena/article/articleDetail.jsp?id=393040 http://info.wotif.com/pdf/Wotif.com_Facts_Figures.pdf 2007 JavaOneSM Conference | Session TS-6175 | 40
  • 41. Wotif.com Case Study Screen shots—Home Page Source: http://wotif.com 2007 JavaOneSM Conference | Session TS-6175 | 41
  • 42. Wotif.com Case Study Screen shots—Search Results ● + 15 more screenfuls for a total of 1.5MB ● Support many of these per second Source: http://www.wotif.com/search/Simple?refine=simpleSearch&country=1&region=1&viewType=all 2007 JavaOneSM Conference | Session TS-6175 | 42
  • 43. Wotif.com Case Study Technology Platform ● Sun AMD64 Servers ● RHEL5 ● 64-bit Java technology ● GlassFish™ Project ● Open Message Queue ● Oracle and MySQL ● Java Platform, Enterprise Edition (Java EE platform) 5 with Enterprise JavaBeans™ (EJB™) 3, JavaServer Pages™ (JSP™) 2 ● Also lots of open source 2007 JavaOneSM Conference | Session TS-6175 | 43
  • 44. Wotif.com Case Study ehcache ● 150 caches ● Hibernate 2 and Hibernate 3 Persistent Object and Collection Caches ● Distributed Page Caches in a “Customer” cluster ● AJAX XML Response Caches ● Distributed Java Object Caches in a “Supplier” cluster ● Uses SelfPopulating and Blocking Cache ● Web Cache Full Page and Fragment Web Filters ● Disk Store and Persistent Disk Stores 2007 JavaOneSM Conference | Session TS-6175 | 44
  • 45. Wotif.com Case Study How we came to implement a Cache ● Started with Apache JCS. It had some serious threading bugs 3 years ago. Submitted a patch which was ignored by the maintainer. ● Mentioned on the Hibernate mailing list about JCS problems and linked the patch for people to apply. ● Gavin King suggested forking JCS. On the basis that Hibernate would use the forked version ehcache was born. It originally stood for Easy Hibernate Cache. ● ehcache’s evolution mirrors Wotif.com’s own need for caching features with the progression of MemoryStore -> DiskStore -> SelfPopulatingCache -> Web Response Caching -> Persistent Disk Store -> Distributed Caching. 2007 JavaOneSM Conference | Session TS-6175 | 45
  • 46. DEMO 1. Web App on GlassFish Project without caching 2. Add caching to a single instance 3. Use distributed caching with n instances 2007 JavaOneSM Conference | Session TS-6175 | 46
  • 47. Summary ● Most apps will benefit from caching ● You can calculate the speed up ● ehcache is easy to use directly ● You can also benefit from ehcache indirectly through frameworks that use it ● Distributed ehcache is a small configuration step ● Abstract yourself from Caching Providers using JCACHE 2007 JavaOneSM Conference | Session TS-6175 | 47
  • 48. For More Information ● Project Website: http://ehcache.sf.net ● Downloadable Book: http://ehcache.sourceforge.net/EhcacheUserGuide.pdf ● My Email: gluck@gregluck.com 2007 JavaOneSM Conference | Session TS-6175 | 48
  • 49. Q&A Greg Luck gluck@gregluck.com 2007 JavaOneSM Conference | Session TS-6175 | 49
  • 50. Distributed Caching Using the JCACHE API and ehcache, Including a Case Study on Wotif.com Greg Luck Maintainer, ehcache—http://ehcache.sf.net Member, JSR 107 JCACHE Expert Group Chief Architect, Wotif.com—http://wotif.com TS-6175 2007 JavaOneSM Conference | Session TS-6175 |