SlideShare uma empresa Scribd logo
1 de 55
Baixar para ler offline
Caching, and what’s new in Ehcache
     2 and Hibernate Caching Provider




Thursday, 17 June 2010
Why Cache?
       Reasons to cache:
      Offload - reducing the amount of resources consumed and hence cost
      Performance - increasing the speed of processing
      Scale out - distributed caching is a leading scale-out architecture




                                     www.terracotta.org                      2

Thursday, 17 June 2010
Truncating the request-response Loop
                                                 load balancer
                                                   load balancer




                         HTTPD                       HTTPD                          HTTPD




                                   Application                     Application
                                     server                          server
                                    ehcache                         ehcache




                  Terracotta     ...        Terracotta
                   Terracotta
                   Server           ...      Terracotta
                                             Server                      MySQL
                     Server                                              Database
                   stripe 1                    Server
                                             stripe n
                     stripe 1                  stripe n



                                                    www.terracotta.org                      3

Thursday, 17 June 2010
Truncating the request-response Loop
                                                 load balancer
                                                   load balancer




                         HTTPD                       HTTPD                          HTTPD




                                   Application                     Application
                                     server                          server
                                    ehcache                         ehcache




                  Terracotta     ...        Terracotta
                   Terracotta
                   Server           ...      Terracotta
                                             Server                      MySQL
                     Server                                              Database
                   stripe 1                    Server
                                             stripe n
                     stripe 1                  stripe n



                                                    www.terracotta.org                      3

Thursday, 17 June 2010
Truncating the request-response Loop
                                                 load balancer
                                                   load balancer




                         HTTPD                       HTTPD                          HTTPD




                                   Application                     Application
                                     server                          server
                                    ehcache                         ehcache




                  Terracotta     ...        Terracotta
                   Terracotta
                   Server           ...      Terracotta
                                             Server                      MySQL
                     Server                                              Database
                   stripe 1                    Server
                                             stripe n
                     stripe 1                  stripe n



                                                    www.terracotta.org                      3

Thursday, 17 June 2010
Truncating the request-response Loop
                                                 load balancer
                                                   load balancer




                         HTTPD                       HTTPD                          HTTPD




                                   Application                     Application
                                     server                          server
                                    ehcache                         ehcache




                  Terracotta     ...        Terracotta
                   Terracotta
                   Server           ...      Terracotta
                                             Server                      MySQL
                     Server                                              Database
                   stripe 1                    Server
                                             stripe n
                     stripe 1                  stripe n



                                                    www.terracotta.org                      3

Thursday, 17 June 2010
Truncating the request-response Loop
                                                 load balancer
                                                   load balancer




                         HTTPD                       HTTPD                          HTTPD




                                   Application                     Application
                                     server                          server
                                    ehcache                         ehcache




                  Terracotta     ...        Terracotta
                   Terracotta
                   Server           ...      Terracotta
                                             Server                      MySQL
                     Server                                              Database
                   stripe 1                    Server
                                             stripe n
                     stripe 1                  stripe n



                                                    www.terracotta.org                      3

Thursday, 17 June 2010
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)


      To apply Amdahl’s law you must measure the components of system
       time and the before and after affect of the perf change made.
      It is thus an empirical approach.
      Not recommended is the other approach “When all you have is a hammer
       every problem looks like a nail”. Lots of times it is something completely
       new. However very few developers will take the time to make careful
       measurements.




                                       www.terracotta.org                        4

Thursday, 17 June 2010
Cache Efficiency
                         cache efficiency = cache hits / total hits

      ➡ High efficiency = high offload
      ➡ High efficiency = high performance




                                        www.terracotta.org            5

Thursday, 17 June 2010
Why does caching work?
      Locality of Reference
      Pareto Distributions




                               www.terracotta.org   6

Thursday, 17 June 2010
Locality of Reference
      Many computer systems exhibit the phenomenon of locality of reference.
      Data that is near other data or has just been used is more likely to be
       used again.
       Temporal locality - refers to the reuse of specific data and/or resources
       within relatively small time durations.
       Spatial locality - refers to the use of data elements within relatively close
       storage locations
      e.g. this is the reason for hierarchical memory design in computers




                                      www.terracotta.org                               7

Thursday, 17 June 2010
Pareto Distributions
      Chris Anderson, of Wired Magazine, coined the term The Long Tail to
       refer to Ecommerce systems.
      The mathematical term is a Pareto Distribution aka Power Law
       Distribution.




                                   www.terracotta.org                        8

Thursday, 17 June 2010
Another Problem...
       But...
      What if the data set is too large to fit in the cache?
      What about staleness of data




                                      www.terracotta.org        9

Thursday, 17 June 2010
Coherency with SOR
      classically solved with an automatic expiry. Ehcache has both TTL and
       TTI.
       Better:
      Eternal caching plus a cache invalidation protocol
      Write-through or behind caches. The SOR gets updated in-line with the
       cache. Hibernate read-write and transactional strategies are examples.
       Also Ehcache CacheWriter




                                    www.terracotta.org                          10

Thursday, 17 June 2010
Why run a cluster?
      Availability, most often n+1 redundancy
      Scale out


       But this creates a new cascade of problems:
        • N * problem
        • Cluster coherency problem
        • CAP theorem limits




                                    www.terracotta.org   11

Thursday, 17 June 2010
N * Problem
      On a single node work is done once and then cached. Cache hits offload.
       But in a cluster the work must be done N times, where N is the number of
       nodes
      The solution to the N * times problem is a replicated or distributed cache
      replicated cache - the data is copied to each node. All data is held in
       each node
      distributed cache - the most used data is held in a node. The balance of
       the data is held outside the application node




                                     www.terracotta.org                           12

Thursday, 17 June 2010
Cluster Coherency Problem
      Each cache makes independent cache changes. The caches become
       different
      Solved partly by a replicated or distributed cache
      But, without locking, race conditions will cause incoherencies
      Solution is a coherent, distributed or replicated cache




                                     www.terracotta.org                 13

Thursday, 17 June 2010
CAP Theorem PACELC
       The CAP theorem, also known as Brewer's theorem, states that it is
       impossible for a distributed computer system to simultaneously provide
       all three of the following guarantees: consistency, availability and
       tolerance to partition.
       A better explanation of the tradeoffs is PACELC: if there is a partition (P)
       how does the system tradeoff between availability and consistency (A
       and C); else (E) when the system is running as normal in the absence of
       partitions, how does the system tradeoff between latency (L) and
       consistency (C)?
       There is no right answer, but the properties to be traded off will be
       different for different applications. So the solution must be configurable.




       1. http://dbmsmusings.blogspot.com/2010/04/problems-with-cap-and-yahoos-little.html



                                         www.terracotta.org                              14

Thursday, 17 June 2010
About Ehcache
     The world's most widely used Java cache
      Founded in 2003
      Apache 2.0 License
        Integrated by lots of projects, products
        Hibernate Provider implemented 2003
        Web Caching 2004
        Distributed Caching 2006
        Greg Luck becomes co-spec lead of JSR107
        JCACHE (JSR107) implementation 2007
        REST and SOAP APIs 2008
        SourceForge Project of the Month March 2009
        Acquired by Terracotta 2009; Integrated with Terracotta Server
        Ehcache 2.0 March 2010
      Forrester Wave “Leader” May 2010


                                       www.terracotta.org                 15

Thursday, 17 June 2010
Ehcache 2




                                     16

Thursday, 17 June 2010
Ehcache before Terracotta




                         www.terracotta.org   12
                                              17

Thursday, 17 June 2010
Ehcache after Terracotta




                         www.terracotta.org   13
                                              18

Thursday, 17 June 2010
Adding a specific ehcache.xml
      ehcache.xml:
       <ehcache>
           <defaultCache
                   maxElementsInMemory="10000"
                   eternal="false"
                   timeToLiveSeconds="120"
                   />

             <cache name="org.hibernate.cache.UpdateTimestampsCache"
                    maxElementsInMemory="10000"
                    timeToIdleSeconds="300"
                     />

           <cache name="org.hibernate.cache.StandardQueryCache"
                  maxElementsInMemory="10000"
                  timeToIdleSeconds="300"
                   />
       </ehcache>

                                  www.terracotta.org                   15
                                                                       19

Thursday, 17 June 2010
Adding Terracotta
      ehcache.xml
       <ehcache>
           <terracottaConfig url="someserver:9510"/>
           <defaultCache
                   maxElementsInMemory="10000"
                   eternal="false"
                   timeToLiveSeconds="120"
                   />

             <cache name="com.company.domain.Pets"
                    maxElementsInMemory="10000"
                    eternal=”true”>
                    <terracotta clustered="true" coherent="false"/>
                    </cache>

           <cache name="com.company.domain.Clinics"
                  maxElementsInMemory="10000"
                  timeToLiveSeconds="3000">
           <terracotta clustered="true" coherent="true"/>
       </cache>
       </ehcache>
                                  www.terracotta.org                  16
                                                                      20

Thursday, 17 June 2010
Ehcache 2 - New Features
     Hibernate 3.3+ Caching SPI
           Old SPI was heavily synchronized and not well suited to
           clusters
           New SPI uses CacheRegionFactory
           Fully cluster safe with Terracotta Server Array
           Unification of the Ehcache and Terracotta 3.2 providers
           JTA i.e. transactional caching strategy

     JTA
           Cache as an XAResource
           Detects most common Transaction Managers
           Others configurable
           Works with Spring, EJB and manual transactions


                                  www.terracotta.org                  21

Thursday, 17 June 2010
Ehcache 2 - New Features
     Write-behind
           Offloads Databases with high write workloads
           CacheWriter Interface to implement
           cache.putWithWriter(...) and cache.removeWithWriter(...)
           Write-through and Write-behind modes
           Batching, coalescing and very configurable
           Standalone with in-memory write-behind queue.
           TSA with HA, durability and distributed workload balancing

     Bulk Loading
           incoherent mode for startup or periodic cache loading
           10 x faster
           No change to the API (put, load etc).
           SetCoherent(), isCoherent(), waitForCoherent()


                                   www.terracotta.org                    22

Thursday, 17 June 2010
Ehcache 2 - New Features ...cont.
     New CAP configurability – per cache basis
           coherent – run coherent or incoherent (faster)
           synchronousWrites – true for ha, false is faster
           copyOnRead – true to stop interactions between threads outside
           of the cache
           Cluster events – notification of partition and reconnection
           NonStopCache - decorated cache favouring availability
           UnlockedReadsView - decorated cache favouring speed
     Management
           Dynamic Configuration of common cache configs from JMX and
           DevConsole
           New web-based Monitoring with UI and API


                                 www.terracotta.org                  23

Thursday, 17 June 2010
Ehcache 2.0 Monitoring Options
      JMX
        • is built in to Ehcache but...
             • JMX needs use portmap
             • Slow
             • Machines may be headless
      Terracotta Dev Console (if using Terracotta)
      Ehcache Console, new in 2.1




                                     www.terracotta.org   24

Thursday, 17 June 2010
Including Web Services
               Simple + Performant + Coherent + HA + Scaleable

                           Application

                                 Ehcache                        Terracotta   Terracotta
                                                                 Server       Server


                           Application

                                 Ehcache                        Terracotta   Terracotta
                                                                 Server       Server


                           Application

                                 Ehcache                                     Terracotta
                                                                Terracotta    Server
                                                                 Server

     PHP App


      C App
                           Web Container
                   REST/
                            Ehcache
      C# App       HTTP
                             Server


     Ruby App



                                           www.terracotta.org                             25

Thursday, 17 June 2010
Terracotta Developer Console
      Cache hit ratios
      Hit/miss rates
      Hits on the database
      Cache puts
      Detailed efficiency of cache
      regions




                                                           Dramatically simplifies tuning
                                                           and operations, and shows the
                                                           database offload.




                                      www.terracotta.org                                    26

Thursday, 17 June 2010
Ehcache Console
    Web based
    Configuration
    Efficiency
    Memory Use




                                         Comes with supported versions
                                         API to connect Operations
                                          Monitoring




                         www.terracotta.org                           27

Thursday, 17 June 2010
Exploring Hibernate Caching:
                       Spring Pet Clinic




                                                28

Thursday, 17 June 2010
Code - Spring Pet Clinic




                         www.terracotta.org   29

Thursday, 17 June 2010
Pet Clinic Domain Model
  Domain Objects                                  Sprint PetClinic Domain Model

           Vets                                      Vet             Specialty

                                              attr = ""           attr = ""
           Specialty
           Owner
           Pet                                    Owner

                                              attr = ""
           PetType
           Visit
                                                      Pet             PetType

                                              attr = ""           attr = ""




                                                     Visit

                                              attr = ""




                         www.terracotta.org                                       30

Thursday, 17 June 2010
Code
      Steps:
              Configure PetClinic for Hibernate

              Configure hibernate for second-level cache

              Configure hbm file for caching

              Update query code to add caching

               Optional but recommended:

              add ehcache.xml to WEB-INF/classes
              specify cache regions and config


                                   www.terracotta.org       31

Thursday, 17 June 2010
Code
      ehcache.xml:
       <ehcache>
           <defaultCache
                   maxElementsInMemory="10000"
                   eternal="false"
                   timeToLiveSeconds="120"
                   />

             <cache name="org.hibernate.cache.UpdateTimestampsCache"
                    maxElementsInMemory="10000"
                    timeToIdleSeconds="300"
                     />

           <cache name="org.hibernate.cache.StandardQueryCache"
                  maxElementsInMemory="10000"
                  timeToIdleSeconds="300"
                   />
       </ehcache>

                                  www.terracotta.org                   32

Thursday, 17 June 2010
Performance




                                       33

Thursday, 17 June 2010
Performance

           Testing Methodology

           Results in Details

           Conclusions




                                  www.terracotta.org   34

Thursday, 17 June 2010
Standalone Performance
      Read Performance




                          www.terracotta.org   35

Thursday, 17 June 2010
Standalone Performance
      Put Performance




                         www.terracotta.org   36

Thursday, 17 June 2010
Ehcache in-process vs Memcached




                         www.terracotta.org   37

Thursday, 17 June 2010
REST Performance
                         Ehcache Server                          Memcache
        4000

        3000

        2000

        1000

              0
                         Get          Multi-Get                Put    Remove
Source: MemcacheBench with Java clients. Time for 10,000 operations
                                          www.terracotta.org                   38

Thursday, 17 June 2010
Ehcache with Terracotta vs the Rest
      Application
                Tests done with Owners = 25K and 125K which translates
                 to total objects of 0.3 M and 1.5 M
                Minimal tuning.
      Cluster Configuration:
                8 Client JVMs (1.75G Heap)
                1 (+0) Terracotta Servers (6G Heap)
                MySql: sales18.




                                    www.terracotta.org                39

Thursday, 17 June 2010
Ehcache with Terracotta vs the Rest
      Ehcache
                Replicated with RMI not included because not coherent
                Single TSA Server
                15 threads and some with 100 threads
      IMDG
                15 threads
                Cache deployed in Partitioned Mode
                Tests were also done with Replicated – which did well for
                 small cache sizes but failed to complete with larger cache
                 sizes. So, it is not included.
      memcached
                15 threads
                1 server

                                    www.terracotta.org                    40

Thursday, 17 June 2010
Hibernate - Read Only TPS




                         www.terracotta.org   41

Thursday, 17 June 2010
Hibernate - Read Write TPS




                         www.terracotta.org   42

Thursday, 17 June 2010
Hibernate - Read Only Latency




                         www.terracotta.org   43

Thursday, 17 June 2010
Hibernate - Read Write Latency




                         www.terracotta.org   44

Thursday, 17 June 2010
Test Source
     The code behind the benchmarks is in the
     Terracotta Community SVN repository.

     Download https://svn.terracotta.org/repo/forge/
     projects/ehcacheperf/
     (Terracotta Community Login Required)




                                  www.terracotta.org   45

Thursday, 17 June 2010
Performance Conclusions
     With Hibernate, Using Spring Pet Clinic

           After app servers and DBs tuned by
           independent 3rd parties
           30-95% database load reduction
           80 times read-only performance of MySQL
           Notably lower latency

     1.5 ms versus 120 ms for database (25k)



                            www.terracotta.org        46

Thursday, 17 June 2010
What about NoSQL?
      Ehcache + Terracotta configured with persistence gives you a NoSQL
       store with limited features i.e. no search
      TerraStore - new open source project from Sergio Bossa is a document
       oriented NoSQL store based on Terracotta and ful




                                   www.terracotta.org                         47

Thursday, 17 June 2010
Wrap Up




                                   48

Thursday, 17 June 2010
Q&A
     Please ask any questions you have in the Q&A
      window.




                         www.terracotta.org      49

Thursday, 17 June 2010
Additional Ehcache Information
      Website: www.ehcache.org

      Documention: www.ehcache.org/documentation

      Hibernate: www.ehcache.org/documentation/
       hibernate.html

      Commercial Products: www.terracotta.org/ehcache/

      Twitter: www.twitter.com/Ehcache




                           www.terracotta.org             50

Thursday, 17 June 2010
Terracotta Contact Information
      Website: www.terracottatech.com

      Telephone: +1 415-738-4000

      Email: info@terracottatech.com

      Facebook: www.facebook.com/Terracotta

      Twitter: www.twitter.com/TerracottaTech



                          www.terracotta.org     51

Thursday, 17 June 2010

Mais conteúdo relacionado

Mais procurados

Supercharging Cassandra - GOTO Amsterdam
Supercharging Cassandra - GOTO AmsterdamSupercharging Cassandra - GOTO Amsterdam
Supercharging Cassandra - GOTO AmsterdamAcunu
 
Cacheconcurrencyconsistency cassandra svcc
Cacheconcurrencyconsistency cassandra svccCacheconcurrencyconsistency cassandra svcc
Cacheconcurrencyconsistency cassandra svccsrisatish ambati
 
TWaver Web Performance Report
TWaver Web Performance ReportTWaver Web Performance Report
TWaver Web Performance Report253725291
 
Tungsten University: Setup and Operate Tungsten Replicators
Tungsten University: Setup and Operate Tungsten ReplicatorsTungsten University: Setup and Operate Tungsten Replicators
Tungsten University: Setup and Operate Tungsten ReplicatorsContinuent
 
How to Make Ruby CGI Script Faster - CGIを高速化する小手先テクニック -
How to Make Ruby CGI Script Faster - CGIを高速化する小手先テクニック -How to Make Ruby CGI Script Faster - CGIを高速化する小手先テクニック -
How to Make Ruby CGI Script Faster - CGIを高速化する小手先テクニック -kwatch
 
Gfarm Fs Tatebe Tip2004
Gfarm Fs Tatebe Tip2004Gfarm Fs Tatebe Tip2004
Gfarm Fs Tatebe Tip2004xlight
 
Ca บทที่สี่
Ca บทที่สี่Ca บทที่สี่
Ca บทที่สี่atit604
 
Dean Keynote Ladis2009 Google
Dean Keynote Ladis2009 GoogleDean Keynote Ladis2009 Google
Dean Keynote Ladis2009 GoogleDuoc
 
CloudStackユーザ会〜仮想ルータの謎に迫る
CloudStackユーザ会〜仮想ルータの謎に迫るCloudStackユーザ会〜仮想ルータの謎に迫る
CloudStackユーザ会〜仮想ルータの謎に迫るsamemoon
 
Tokyo Cabinet & Tokyo Tyrant
Tokyo Cabinet & Tokyo TyrantTokyo Cabinet & Tokyo Tyrant
Tokyo Cabinet & Tokyo Tyrant輝 子安
 
Foreman presentation at NYC puppet users
Foreman presentation at NYC puppet usersForeman presentation at NYC puppet users
Foreman presentation at NYC puppet usersohadlevy
 
Adaptive Linear Solvers and Eigensolvers
Adaptive Linear Solvers and EigensolversAdaptive Linear Solvers and Eigensolvers
Adaptive Linear Solvers and Eigensolversinside-BigData.com
 

Mais procurados (14)

Supercharging Cassandra - GOTO Amsterdam
Supercharging Cassandra - GOTO AmsterdamSupercharging Cassandra - GOTO Amsterdam
Supercharging Cassandra - GOTO Amsterdam
 
Cacheconcurrencyconsistency cassandra svcc
Cacheconcurrencyconsistency cassandra svccCacheconcurrencyconsistency cassandra svcc
Cacheconcurrencyconsistency cassandra svcc
 
Week3.1
Week3.1Week3.1
Week3.1
 
TWaver Web Performance Report
TWaver Web Performance ReportTWaver Web Performance Report
TWaver Web Performance Report
 
Tungsten University: Setup and Operate Tungsten Replicators
Tungsten University: Setup and Operate Tungsten ReplicatorsTungsten University: Setup and Operate Tungsten Replicators
Tungsten University: Setup and Operate Tungsten Replicators
 
How to Make Ruby CGI Script Faster - CGIを高速化する小手先テクニック -
How to Make Ruby CGI Script Faster - CGIを高速化する小手先テクニック -How to Make Ruby CGI Script Faster - CGIを高速化する小手先テクニック -
How to Make Ruby CGI Script Faster - CGIを高速化する小手先テクニック -
 
lec9_ref.pdf
lec9_ref.pdflec9_ref.pdf
lec9_ref.pdf
 
Gfarm Fs Tatebe Tip2004
Gfarm Fs Tatebe Tip2004Gfarm Fs Tatebe Tip2004
Gfarm Fs Tatebe Tip2004
 
Ca บทที่สี่
Ca บทที่สี่Ca บทที่สี่
Ca บทที่สี่
 
Dean Keynote Ladis2009 Google
Dean Keynote Ladis2009 GoogleDean Keynote Ladis2009 Google
Dean Keynote Ladis2009 Google
 
CloudStackユーザ会〜仮想ルータの謎に迫る
CloudStackユーザ会〜仮想ルータの謎に迫るCloudStackユーザ会〜仮想ルータの謎に迫る
CloudStackユーザ会〜仮想ルータの謎に迫る
 
Tokyo Cabinet & Tokyo Tyrant
Tokyo Cabinet & Tokyo TyrantTokyo Cabinet & Tokyo Tyrant
Tokyo Cabinet & Tokyo Tyrant
 
Foreman presentation at NYC puppet users
Foreman presentation at NYC puppet usersForeman presentation at NYC puppet users
Foreman presentation at NYC puppet users
 
Adaptive Linear Solvers and Eigensolvers
Adaptive Linear Solvers and EigensolversAdaptive Linear Solvers and Eigensolvers
Adaptive Linear Solvers and Eigensolvers
 

Destaque

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
 
Overview of the ehcache
Overview of the ehcacheOverview of the ehcache
Overview of the ehcacheHyeonSeok Choi
 
Implementing portlets using Web Scripts
Implementing portlets using Web ScriptsImplementing portlets using Web Scripts
Implementing portlets using Web ScriptsPiergiorgio Lucidi
 
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
 
Distributed Caching Using the JCACHE API and ehcache, Including a Case Study ...
Distributed Caching Using the JCACHE API and ehcache, Including a Case Study ...Distributed Caching Using the JCACHE API and ehcache, Including a Case Study ...
Distributed Caching Using the JCACHE API and ehcache, Including a Case Study ...elliando dias
 
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
 
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
 
Building High Scalability Apps With Terracotta
Building High Scalability Apps With TerracottaBuilding High Scalability Apps With Terracotta
Building High Scalability Apps With TerracottaDavid Reines
 
Sap java connector / Hybris RFC
Sap java connector / Hybris RFCSap java connector / Hybris RFC
Sap java connector / Hybris RFCMonsif Elaissoussi
 
Architectural Terracotta History, Composition, Failure, Anchoring, Repair and...
Architectural Terracotta History, Composition, Failure, Anchoring, Repair and...Architectural Terracotta History, Composition, Failure, Anchoring, Repair and...
Architectural Terracotta History, Composition, Failure, Anchoring, Repair and...Patrick J. Morrissey
 
Apache Geode で始める Spring Data Gemfire
Apache Geode で始めるSpring Data GemfireApache Geode で始めるSpring Data Gemfire
Apache Geode で始める Spring Data GemfireAkihiro Kitada
 

Destaque (20)

Ehcache Architecture, Features And Usage Patterns
Ehcache Architecture, Features And Usage PatternsEhcache Architecture, Features And Usage Patterns
Ehcache Architecture, Features And Usage Patterns
 
Overview of the ehcache
Overview of the ehcacheOverview of the ehcache
Overview of the ehcache
 
Implementing portlets using Web Scripts
Implementing portlets using Web ScriptsImplementing portlets using Web Scripts
Implementing portlets using Web Scripts
 
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
 
Distributed Caching Using the JCACHE API and ehcache, Including a Case Study ...
Distributed Caching Using the JCACHE API and ehcache, Including a Case Study ...Distributed Caching Using the JCACHE API and ehcache, Including a Case Study ...
Distributed Caching Using the JCACHE API and ehcache, Including a Case Study ...
 
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
 
Real Terracotta
Real TerracottaReal Terracotta
Real Terracotta
 
Cold Hard Cache
Cold Hard CacheCold Hard Cache
Cold Hard Cache
 
Intro To Sap Netweaver Java
Intro To Sap Netweaver JavaIntro To Sap Netweaver Java
Intro To Sap Netweaver Java
 
Eh cache in Kaunas JUG
Eh cache in Kaunas JUGEh cache in Kaunas JUG
Eh cache in Kaunas JUG
 
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
 
Building High Scalability Apps With Terracotta
Building High Scalability Apps With TerracottaBuilding High Scalability Apps With Terracotta
Building High Scalability Apps With Terracotta
 
Sap java connector / Hybris RFC
Sap java connector / Hybris RFCSap java connector / Hybris RFC
Sap java connector / Hybris RFC
 
Architectural Terracotta History, Composition, Failure, Anchoring, Repair and...
Architectural Terracotta History, Composition, Failure, Anchoring, Repair and...Architectural Terracotta History, Composition, Failure, Anchoring, Repair and...
Architectural Terracotta History, Composition, Failure, Anchoring, Repair and...
 
Apache Geode で始める Spring Data Gemfire
Apache Geode で始めるSpring Data GemfireApache Geode で始めるSpring Data Gemfire
Apache Geode で始める Spring Data Gemfire
 

Semelhante a The new ehcache 2.0 and hibernate spi

Terracotta And Hibernate
Terracotta And  HibernateTerracotta And  Hibernate
Terracotta And HibernateTaylor Gautier
 
2010-04-13 Reactor Pattern & Event Driven Programming 2
2010-04-13 Reactor Pattern & Event Driven Programming 22010-04-13 Reactor Pattern & Event Driven Programming 2
2010-04-13 Reactor Pattern & Event Driven Programming 2Lin Jen-Shin
 
Reactive Stream Processing with Akka Streams
Reactive Stream Processing with Akka StreamsReactive Stream Processing with Akka Streams
Reactive Stream Processing with Akka StreamsKonrad Malawski
 
解读server.xml文件
解读server.xml文件解读server.xml文件
解读server.xml文件wensheng wei
 
2010-02-09 Reactor Pattern & Event Driven Programming
2010-02-09 Reactor Pattern & Event Driven Programming2010-02-09 Reactor Pattern & Event Driven Programming
2010-02-09 Reactor Pattern & Event Driven ProgrammingLin Jen-Shin
 
Session 49 - Semantic metadata management practical
Session 49 - Semantic metadata management practical Session 49 - Semantic metadata management practical
Session 49 - Semantic metadata management practical ISSGC Summer School
 
Information Flow on the Intranet at Region Västra Götaland
Information Flow on the Intranet at Region Västra GötalandInformation Flow on the Intranet at Region Västra Götaland
Information Flow on the Intranet at Region Västra GötalandKristian Norling
 
Session 49 Practical Semantic Sticky Note
Session 49 Practical Semantic Sticky NoteSession 49 Practical Semantic Sticky Note
Session 49 Practical Semantic Sticky NoteISSGC Summer School
 
(ATS3-PLAT06) Handling “Big Data” with Pipeline Pilot (MapReduce/NoSQL)
(ATS3-PLAT06) Handling “Big Data” with Pipeline Pilot (MapReduce/NoSQL)(ATS3-PLAT06) Handling “Big Data” with Pipeline Pilot (MapReduce/NoSQL)
(ATS3-PLAT06) Handling “Big Data” with Pipeline Pilot (MapReduce/NoSQL)BIOVIA
 
Zero-Copy Event-Driven Servers with Netty
Zero-Copy Event-Driven Servers with NettyZero-Copy Event-Driven Servers with Netty
Zero-Copy Event-Driven Servers with NettyDaniel Bimschas
 
A Low-Power CoAP for Contiki
A Low-Power CoAP for ContikiA Low-Power CoAP for Contiki
A Low-Power CoAP for ContikiMatthias Kovatsch
 
Slash n: Technical Session 3 - Storage @ Scale: Quest for the mythical silver...
Slash n: Technical Session 3 - Storage @ Scale: Quest for the mythical silver...Slash n: Technical Session 3 - Storage @ Scale: Quest for the mythical silver...
Slash n: Technical Session 3 - Storage @ Scale: Quest for the mythical silver...slashn
 
P2P-Next: Future Internet Media Delivery to CE Devices
P2P-Next: Future Internet Media Delivery to CE DevicesP2P-Next: Future Internet Media Delivery to CE Devices
P2P-Next: Future Internet Media Delivery to CE DevicesMark Stuart
 
Kafka Summit NYC 2017 - Introducing Exactly Once Semantics in Apache Kafka
Kafka Summit NYC 2017 - Introducing Exactly Once Semantics in Apache KafkaKafka Summit NYC 2017 - Introducing Exactly Once Semantics in Apache Kafka
Kafka Summit NYC 2017 - Introducing Exactly Once Semantics in Apache Kafkaconfluent
 
03 2014 Apache Spark Serving: Unifying Batch, Streaming, and RESTful Serving
03 2014 Apache Spark Serving: Unifying Batch, Streaming, and RESTful Serving03 2014 Apache Spark Serving: Unifying Batch, Streaming, and RESTful Serving
03 2014 Apache Spark Serving: Unifying Batch, Streaming, and RESTful ServingDatabricks
 
Introducing Exactly Once Semantics To Apache Kafka
Introducing Exactly Once Semantics To Apache KafkaIntroducing Exactly Once Semantics To Apache Kafka
Introducing Exactly Once Semantics To Apache KafkaApurva Mehta
 

Semelhante a The new ehcache 2.0 and hibernate spi (20)

Terracotta And Hibernate
Terracotta And  HibernateTerracotta And  Hibernate
Terracotta And Hibernate
 
Apache con 2011 gd
Apache con 2011 gdApache con 2011 gd
Apache con 2011 gd
 
Usenix lisa 2011
Usenix lisa 2011Usenix lisa 2011
Usenix lisa 2011
 
2010-04-13 Reactor Pattern & Event Driven Programming 2
2010-04-13 Reactor Pattern & Event Driven Programming 22010-04-13 Reactor Pattern & Event Driven Programming 2
2010-04-13 Reactor Pattern & Event Driven Programming 2
 
Reactive Stream Processing with Akka Streams
Reactive Stream Processing with Akka StreamsReactive Stream Processing with Akka Streams
Reactive Stream Processing with Akka Streams
 
解读server.xml文件
解读server.xml文件解读server.xml文件
解读server.xml文件
 
2010-02-09 Reactor Pattern & Event Driven Programming
2010-02-09 Reactor Pattern & Event Driven Programming2010-02-09 Reactor Pattern & Event Driven Programming
2010-02-09 Reactor Pattern & Event Driven Programming
 
Session 49 - Semantic metadata management practical
Session 49 - Semantic metadata management practical Session 49 - Semantic metadata management practical
Session 49 - Semantic metadata management practical
 
Information Flow on the Intranet at Region Västra Götaland
Information Flow on the Intranet at Region Västra GötalandInformation Flow on the Intranet at Region Västra Götaland
Information Flow on the Intranet at Region Västra Götaland
 
LMAX Architecture
LMAX ArchitectureLMAX Architecture
LMAX Architecture
 
Session 49 Practical Semantic Sticky Note
Session 49 Practical Semantic Sticky NoteSession 49 Practical Semantic Sticky Note
Session 49 Practical Semantic Sticky Note
 
(ATS3-PLAT06) Handling “Big Data” with Pipeline Pilot (MapReduce/NoSQL)
(ATS3-PLAT06) Handling “Big Data” with Pipeline Pilot (MapReduce/NoSQL)(ATS3-PLAT06) Handling “Big Data” with Pipeline Pilot (MapReduce/NoSQL)
(ATS3-PLAT06) Handling “Big Data” with Pipeline Pilot (MapReduce/NoSQL)
 
Zero-Copy Event-Driven Servers with Netty
Zero-Copy Event-Driven Servers with NettyZero-Copy Event-Driven Servers with Netty
Zero-Copy Event-Driven Servers with Netty
 
Tomcatx performance-tuning
Tomcatx performance-tuningTomcatx performance-tuning
Tomcatx performance-tuning
 
A Low-Power CoAP for Contiki
A Low-Power CoAP for ContikiA Low-Power CoAP for Contiki
A Low-Power CoAP for Contiki
 
Slash n: Technical Session 3 - Storage @ Scale: Quest for the mythical silver...
Slash n: Technical Session 3 - Storage @ Scale: Quest for the mythical silver...Slash n: Technical Session 3 - Storage @ Scale: Quest for the mythical silver...
Slash n: Technical Session 3 - Storage @ Scale: Quest for the mythical silver...
 
P2P-Next: Future Internet Media Delivery to CE Devices
P2P-Next: Future Internet Media Delivery to CE DevicesP2P-Next: Future Internet Media Delivery to CE Devices
P2P-Next: Future Internet Media Delivery to CE Devices
 
Kafka Summit NYC 2017 - Introducing Exactly Once Semantics in Apache Kafka
Kafka Summit NYC 2017 - Introducing Exactly Once Semantics in Apache KafkaKafka Summit NYC 2017 - Introducing Exactly Once Semantics in Apache Kafka
Kafka Summit NYC 2017 - Introducing Exactly Once Semantics in Apache Kafka
 
03 2014 Apache Spark Serving: Unifying Batch, Streaming, and RESTful Serving
03 2014 Apache Spark Serving: Unifying Batch, Streaming, and RESTful Serving03 2014 Apache Spark Serving: Unifying Batch, Streaming, and RESTful Serving
03 2014 Apache Spark Serving: Unifying Batch, Streaming, and RESTful Serving
 
Introducing Exactly Once Semantics To Apache Kafka
Introducing Exactly Once Semantics To Apache KafkaIntroducing Exactly Once Semantics To Apache Kafka
Introducing Exactly Once Semantics To Apache Kafka
 

Último

The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 

Último (20)

The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 

The new ehcache 2.0 and hibernate spi

  • 1. Caching, and what’s new in Ehcache 2 and Hibernate Caching Provider Thursday, 17 June 2010
  • 2. Why Cache? Reasons to cache:  Offload - reducing the amount of resources consumed and hence cost  Performance - increasing the speed of processing  Scale out - distributed caching is a leading scale-out architecture www.terracotta.org 2 Thursday, 17 June 2010
  • 3. Truncating the request-response Loop load balancer load balancer HTTPD HTTPD HTTPD Application Application server server ehcache ehcache Terracotta ... Terracotta Terracotta Server ... Terracotta Server MySQL Server Database stripe 1 Server stripe n stripe 1 stripe n www.terracotta.org 3 Thursday, 17 June 2010
  • 4. Truncating the request-response Loop load balancer load balancer HTTPD HTTPD HTTPD Application Application server server ehcache ehcache Terracotta ... Terracotta Terracotta Server ... Terracotta Server MySQL Server Database stripe 1 Server stripe n stripe 1 stripe n www.terracotta.org 3 Thursday, 17 June 2010
  • 5. Truncating the request-response Loop load balancer load balancer HTTPD HTTPD HTTPD Application Application server server ehcache ehcache Terracotta ... Terracotta Terracotta Server ... Terracotta Server MySQL Server Database stripe 1 Server stripe n stripe 1 stripe n www.terracotta.org 3 Thursday, 17 June 2010
  • 6. Truncating the request-response Loop load balancer load balancer HTTPD HTTPD HTTPD Application Application server server ehcache ehcache Terracotta ... Terracotta Terracotta Server ... Terracotta Server MySQL Server Database stripe 1 Server stripe n stripe 1 stripe n www.terracotta.org 3 Thursday, 17 June 2010
  • 7. Truncating the request-response Loop load balancer load balancer HTTPD HTTPD HTTPD Application Application server server ehcache ehcache Terracotta ... Terracotta Terracotta Server ... Terracotta Server MySQL Server Database stripe 1 Server stripe n stripe 1 stripe n www.terracotta.org 3 Thursday, 17 June 2010
  • 8. 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)  To apply Amdahl’s law you must measure the components of system time and the before and after affect of the perf change made.  It is thus an empirical approach.  Not recommended is the other approach “When all you have is a hammer every problem looks like a nail”. Lots of times it is something completely new. However very few developers will take the time to make careful measurements. www.terracotta.org 4 Thursday, 17 June 2010
  • 9. Cache Efficiency cache efficiency = cache hits / total hits ➡ High efficiency = high offload ➡ High efficiency = high performance www.terracotta.org 5 Thursday, 17 June 2010
  • 10. Why does caching work?  Locality of Reference  Pareto Distributions www.terracotta.org 6 Thursday, 17 June 2010
  • 11. Locality of Reference  Many computer systems exhibit the phenomenon of locality of reference.  Data that is near other data or has just been used is more likely to be used again. Temporal locality - refers to the reuse of specific data and/or resources within relatively small time durations. Spatial locality - refers to the use of data elements within relatively close storage locations  e.g. this is the reason for hierarchical memory design in computers www.terracotta.org 7 Thursday, 17 June 2010
  • 12. Pareto Distributions  Chris Anderson, of Wired Magazine, coined the term The Long Tail to refer to Ecommerce systems.  The mathematical term is a Pareto Distribution aka Power Law Distribution. www.terracotta.org 8 Thursday, 17 June 2010
  • 13. Another Problem... But...  What if the data set is too large to fit in the cache?  What about staleness of data www.terracotta.org 9 Thursday, 17 June 2010
  • 14. Coherency with SOR  classically solved with an automatic expiry. Ehcache has both TTL and TTI. Better:  Eternal caching plus a cache invalidation protocol  Write-through or behind caches. The SOR gets updated in-line with the cache. Hibernate read-write and transactional strategies are examples. Also Ehcache CacheWriter www.terracotta.org 10 Thursday, 17 June 2010
  • 15. Why run a cluster?  Availability, most often n+1 redundancy  Scale out But this creates a new cascade of problems: • N * problem • Cluster coherency problem • CAP theorem limits www.terracotta.org 11 Thursday, 17 June 2010
  • 16. N * Problem  On a single node work is done once and then cached. Cache hits offload. But in a cluster the work must be done N times, where N is the number of nodes  The solution to the N * times problem is a replicated or distributed cache  replicated cache - the data is copied to each node. All data is held in each node  distributed cache - the most used data is held in a node. The balance of the data is held outside the application node www.terracotta.org 12 Thursday, 17 June 2010
  • 17. Cluster Coherency Problem  Each cache makes independent cache changes. The caches become different  Solved partly by a replicated or distributed cache  But, without locking, race conditions will cause incoherencies  Solution is a coherent, distributed or replicated cache www.terracotta.org 13 Thursday, 17 June 2010
  • 18. CAP Theorem PACELC The CAP theorem, also known as Brewer's theorem, states that it is impossible for a distributed computer system to simultaneously provide all three of the following guarantees: consistency, availability and tolerance to partition. A better explanation of the tradeoffs is PACELC: if there is a partition (P) how does the system tradeoff between availability and consistency (A and C); else (E) when the system is running as normal in the absence of partitions, how does the system tradeoff between latency (L) and consistency (C)? There is no right answer, but the properties to be traded off will be different for different applications. So the solution must be configurable. 1. http://dbmsmusings.blogspot.com/2010/04/problems-with-cap-and-yahoos-little.html www.terracotta.org 14 Thursday, 17 June 2010
  • 19. About Ehcache The world's most widely used Java cache  Founded in 2003  Apache 2.0 License  Integrated by lots of projects, products  Hibernate Provider implemented 2003  Web Caching 2004  Distributed Caching 2006  Greg Luck becomes co-spec lead of JSR107  JCACHE (JSR107) implementation 2007  REST and SOAP APIs 2008  SourceForge Project of the Month March 2009  Acquired by Terracotta 2009; Integrated with Terracotta Server  Ehcache 2.0 March 2010  Forrester Wave “Leader” May 2010 www.terracotta.org 15 Thursday, 17 June 2010
  • 20. Ehcache 2 16 Thursday, 17 June 2010
  • 21. Ehcache before Terracotta www.terracotta.org 12 17 Thursday, 17 June 2010
  • 22. Ehcache after Terracotta www.terracotta.org 13 18 Thursday, 17 June 2010
  • 23. Adding a specific ehcache.xml ehcache.xml: <ehcache> <defaultCache maxElementsInMemory="10000" eternal="false" timeToLiveSeconds="120" /> <cache name="org.hibernate.cache.UpdateTimestampsCache" maxElementsInMemory="10000" timeToIdleSeconds="300" /> <cache name="org.hibernate.cache.StandardQueryCache" maxElementsInMemory="10000" timeToIdleSeconds="300" /> </ehcache> www.terracotta.org 15 19 Thursday, 17 June 2010
  • 24. Adding Terracotta ehcache.xml <ehcache> <terracottaConfig url="someserver:9510"/> <defaultCache maxElementsInMemory="10000" eternal="false" timeToLiveSeconds="120" /> <cache name="com.company.domain.Pets" maxElementsInMemory="10000" eternal=”true”> <terracotta clustered="true" coherent="false"/> </cache> <cache name="com.company.domain.Clinics" maxElementsInMemory="10000" timeToLiveSeconds="3000"> <terracotta clustered="true" coherent="true"/> </cache> </ehcache> www.terracotta.org 16 20 Thursday, 17 June 2010
  • 25. Ehcache 2 - New Features Hibernate 3.3+ Caching SPI Old SPI was heavily synchronized and not well suited to clusters New SPI uses CacheRegionFactory Fully cluster safe with Terracotta Server Array Unification of the Ehcache and Terracotta 3.2 providers JTA i.e. transactional caching strategy JTA Cache as an XAResource Detects most common Transaction Managers Others configurable Works with Spring, EJB and manual transactions www.terracotta.org 21 Thursday, 17 June 2010
  • 26. Ehcache 2 - New Features Write-behind Offloads Databases with high write workloads CacheWriter Interface to implement cache.putWithWriter(...) and cache.removeWithWriter(...) Write-through and Write-behind modes Batching, coalescing and very configurable Standalone with in-memory write-behind queue. TSA with HA, durability and distributed workload balancing Bulk Loading incoherent mode for startup or periodic cache loading 10 x faster No change to the API (put, load etc). SetCoherent(), isCoherent(), waitForCoherent() www.terracotta.org 22 Thursday, 17 June 2010
  • 27. Ehcache 2 - New Features ...cont. New CAP configurability – per cache basis coherent – run coherent or incoherent (faster) synchronousWrites – true for ha, false is faster copyOnRead – true to stop interactions between threads outside of the cache Cluster events – notification of partition and reconnection NonStopCache - decorated cache favouring availability UnlockedReadsView - decorated cache favouring speed Management Dynamic Configuration of common cache configs from JMX and DevConsole New web-based Monitoring with UI and API www.terracotta.org 23 Thursday, 17 June 2010
  • 28. Ehcache 2.0 Monitoring Options  JMX • is built in to Ehcache but... • JMX needs use portmap • Slow • Machines may be headless  Terracotta Dev Console (if using Terracotta)  Ehcache Console, new in 2.1 www.terracotta.org 24 Thursday, 17 June 2010
  • 29. Including Web Services Simple + Performant + Coherent + HA + Scaleable Application Ehcache Terracotta Terracotta Server Server Application Ehcache Terracotta Terracotta Server Server Application Ehcache Terracotta Terracotta Server Server PHP App C App Web Container REST/ Ehcache C# App HTTP Server Ruby App www.terracotta.org 25 Thursday, 17 June 2010
  • 30. Terracotta Developer Console Cache hit ratios Hit/miss rates Hits on the database Cache puts Detailed efficiency of cache regions Dramatically simplifies tuning and operations, and shows the database offload. www.terracotta.org 26 Thursday, 17 June 2010
  • 31. Ehcache Console  Web based  Configuration  Efficiency  Memory Use  Comes with supported versions  API to connect Operations Monitoring www.terracotta.org 27 Thursday, 17 June 2010
  • 32. Exploring Hibernate Caching: Spring Pet Clinic 28 Thursday, 17 June 2010
  • 33. Code - Spring Pet Clinic www.terracotta.org 29 Thursday, 17 June 2010
  • 34. Pet Clinic Domain Model Domain Objects Sprint PetClinic Domain Model  Vets Vet Specialty attr = "" attr = ""  Specialty  Owner  Pet Owner attr = ""  PetType  Visit Pet PetType attr = "" attr = "" Visit attr = "" www.terracotta.org 30 Thursday, 17 June 2010
  • 35. Code Steps:  Configure PetClinic for Hibernate  Configure hibernate for second-level cache  Configure hbm file for caching  Update query code to add caching Optional but recommended:  add ehcache.xml to WEB-INF/classes  specify cache regions and config www.terracotta.org 31 Thursday, 17 June 2010
  • 36. Code ehcache.xml: <ehcache> <defaultCache maxElementsInMemory="10000" eternal="false" timeToLiveSeconds="120" /> <cache name="org.hibernate.cache.UpdateTimestampsCache" maxElementsInMemory="10000" timeToIdleSeconds="300" /> <cache name="org.hibernate.cache.StandardQueryCache" maxElementsInMemory="10000" timeToIdleSeconds="300" /> </ehcache> www.terracotta.org 32 Thursday, 17 June 2010
  • 37. Performance 33 Thursday, 17 June 2010
  • 38. Performance  Testing Methodology  Results in Details  Conclusions www.terracotta.org 34 Thursday, 17 June 2010
  • 39. Standalone Performance  Read Performance www.terracotta.org 35 Thursday, 17 June 2010
  • 40. Standalone Performance  Put Performance www.terracotta.org 36 Thursday, 17 June 2010
  • 41. Ehcache in-process vs Memcached www.terracotta.org 37 Thursday, 17 June 2010
  • 42. REST Performance Ehcache Server Memcache 4000 3000 2000 1000 0 Get Multi-Get Put Remove Source: MemcacheBench with Java clients. Time for 10,000 operations www.terracotta.org 38 Thursday, 17 June 2010
  • 43. Ehcache with Terracotta vs the Rest  Application  Tests done with Owners = 25K and 125K which translates to total objects of 0.3 M and 1.5 M  Minimal tuning.  Cluster Configuration:  8 Client JVMs (1.75G Heap)  1 (+0) Terracotta Servers (6G Heap)  MySql: sales18. www.terracotta.org 39 Thursday, 17 June 2010
  • 44. Ehcache with Terracotta vs the Rest  Ehcache  Replicated with RMI not included because not coherent  Single TSA Server  15 threads and some with 100 threads  IMDG  15 threads  Cache deployed in Partitioned Mode  Tests were also done with Replicated – which did well for small cache sizes but failed to complete with larger cache sizes. So, it is not included.  memcached  15 threads  1 server www.terracotta.org 40 Thursday, 17 June 2010
  • 45. Hibernate - Read Only TPS www.terracotta.org 41 Thursday, 17 June 2010
  • 46. Hibernate - Read Write TPS www.terracotta.org 42 Thursday, 17 June 2010
  • 47. Hibernate - Read Only Latency www.terracotta.org 43 Thursday, 17 June 2010
  • 48. Hibernate - Read Write Latency www.terracotta.org 44 Thursday, 17 June 2010
  • 49. Test Source The code behind the benchmarks is in the Terracotta Community SVN repository. Download https://svn.terracotta.org/repo/forge/ projects/ehcacheperf/ (Terracotta Community Login Required) www.terracotta.org 45 Thursday, 17 June 2010
  • 50. Performance Conclusions With Hibernate, Using Spring Pet Clinic After app servers and DBs tuned by independent 3rd parties 30-95% database load reduction 80 times read-only performance of MySQL Notably lower latency 1.5 ms versus 120 ms for database (25k) www.terracotta.org 46 Thursday, 17 June 2010
  • 51. What about NoSQL?  Ehcache + Terracotta configured with persistence gives you a NoSQL store with limited features i.e. no search  TerraStore - new open source project from Sergio Bossa is a document oriented NoSQL store based on Terracotta and ful www.terracotta.org 47 Thursday, 17 June 2010
  • 52. Wrap Up 48 Thursday, 17 June 2010
  • 53. Q&A Please ask any questions you have in the Q&A window. www.terracotta.org 49 Thursday, 17 June 2010
  • 54. Additional Ehcache Information  Website: www.ehcache.org  Documention: www.ehcache.org/documentation  Hibernate: www.ehcache.org/documentation/ hibernate.html  Commercial Products: www.terracotta.org/ehcache/  Twitter: www.twitter.com/Ehcache www.terracotta.org 50 Thursday, 17 June 2010
  • 55. Terracotta Contact Information  Website: www.terracottatech.com  Telephone: +1 415-738-4000  Email: info@terracottatech.com  Facebook: www.facebook.com/Terracotta  Twitter: www.twitter.com/TerracottaTech www.terracotta.org 51 Thursday, 17 June 2010