SlideShare una empresa de Scribd logo
1 de 24
Heap Off Memory

          WTF ??

Reducing Heap memory stress
Abstract
* Java memory fundamental

* heap off memory principles

* heap-off cache with Apache DirectMemory
/me
Olivier Lamy

* Open Source Architect @Talend Apache Team
* Apache Member : Maven, Archiva, Tomcat,
DirectMemory, Build Infra, etc..
* Jenkins
* Add bugs in various OpenSource projects
* twitter.com/olamy olamy.blogspot.com
Java Memory Fundamental
Java Memory Fundamental

                The cool part

* Automatic memory allocation (do you remember
when you used malloc)

* Garbage collector (GC) (no more free)
Java Memory Fundamental

                  The bad part

* stop-the-world mode

* proportionnal to memory's size

* unpredictable unresponsive application :
complicated with tight SLA
Heap Off Memory


Not in the Heap process

   Limited GC stop

 « Unlimited storage »
Heap Off Memory
              How to use that ?
           Native libraries with JNA
          https://github.com/twall/jna

        ByteBuffer @since 1.4 with nio
    ByteBuffer.allocate( size ) (not off heap)
        ByteBuffer.allocateDirect( size )

You can use sun.misc.Unsafe but can cause issue
               and not portable
Heap Off Memory
              How to use that ?

You can manipulate only Buffer (ByteBuffer byte[]
                    etc..) !

   So you must serialize/deserialize your datas

Maximum size with -XX:MaxDirectMemorySize=
Our use case : Cache


       RAM : 10-60 ns
 Network : 10000-30000 ns
SSD Disk : 70000-120000 ns
Disk : 3000000-10000000 ns

 Cache must use memory !
On-Heap Cache


           Objects stored by reference (no
                   de/serialisation)

GC storm effect when refreshing/removing objects!
Off-Heap Cache


 de/serialisation overhead (hopefully some very
       performant libraries exist for that)

Cache objects payload no more affecting GC
Solutions :


* Terracotta BigMemory (off-heap storage on
top of ehcache)

* Infinispan (by Jboss)

* Huge collections

* Apache DirectMemory
Apache Direct Memory


                    Goals :
Apache Direct Memory is a multi layered cache
   implementation featuring off-heap memory
storage to enable caching of java objects without
          degrading jvm performance.
Apache Direct Memory


Joined Apache Incubator end 2011
12 developpers ATM
Under development :
  Memory allocation service just rewrite
  APIs are subject to be changed and bugs to be
   found !
Design & principles


ByteBuffer.allocateDirect is the foundation of the
 cache
ByteBuffers are allocated in big chunk and
 splitted for internal use
Design & principles
Build on layers
  CachingService : serialize object (pluggable)

  MemoryManagerService: Compute
   ByteBuffer access

  ByteBufferAllocatorService: Eventually deals
   with ByteBuffer
ByteBuffers Allocation
Merging Strategy
  No memory wasted
  Suffers from fragmentation
  Need synchronization at de/allocation


Fixed Size buffers allocation
  Memory wasted if size not correctly configured
  No fragmentation
Use case (1)
Multi layers cache
Most used objects are cached on heap, the rest
 off-heap (maybe overflow to disk)
Sounds like ehcache with BigMemory
Hard coded class to use :
 net.sf.ehcache.store.offheap.OffHeapStore
So same package class name in Apache
 DirectMemory
 (https://jira.terracotta.org/jira/browse/EHC-940)
                       Demo
Use case (2)
Cache Server
« à la » memcache tru http(s)
But with a REST Api and written in Java
Client API available
Demo
> PUT /dm/cache/bordeaux HTTP/1.1
> Content-Type:text/plain
{"millesime":"2003","description":"so good so
 good"}
< HTTP/1.1 200 OK
< X-DirectMemory-SerializeSize: 58
< Content-Length: 0
> GET /dm/cache/bordeaux HTTP/1.1
> Accept:text/plain
< HTTP/1.1 200 OK
< Content-Type: text/plain
< Content-Length: 51
{"millesime":"2003","description":"so good so
 good"}
> DELETE /dm/cache/foo HTTP/1.1
Next Steps

JSR 107 ?
Benchmarks
Components Integration (Cassandra, Tomcat etc..)
Dynamic cache size modification
Management/Monitoring
Links
http://incubator.apache.org/directmemory/
https://issues.apache.org/jira/browse/DIRECTMEMORY
Demo project : https://bitbucket.org/olamy/heap-off-memory-
 wtf
Slides : http://www.slideshare.net/olamy
Thanks
  &&
Questions

Más contenido relacionado

La actualidad más candente

CHI - YAPC NA 2012
CHI - YAPC NA 2012CHI - YAPC NA 2012
CHI - YAPC NA 2012
jonswar
 

La actualidad más candente (20)

Caching Data For Performance
Caching Data For PerformanceCaching Data For Performance
Caching Data For Performance
 
CHI - YAPC NA 2012
CHI - YAPC NA 2012CHI - YAPC NA 2012
CHI - YAPC NA 2012
 
Cache all the things - A guide to caching Drupal
Cache all the things - A guide to caching DrupalCache all the things - A guide to caching Drupal
Cache all the things - A guide to caching Drupal
 
Tools for Metaspace
Tools for MetaspaceTools for Metaspace
Tools for Metaspace
 
MySQL Performance - SydPHP October 2011
MySQL Performance - SydPHP October 2011MySQL Performance - SydPHP October 2011
MySQL Performance - SydPHP October 2011
 
Memcached Presentation
Memcached PresentationMemcached Presentation
Memcached Presentation
 
High Performance Wordpress
High Performance WordpressHigh Performance Wordpress
High Performance Wordpress
 
Building Scalable Web Apps - LVL.UP KL
Building Scalable Web Apps - LVL.UP KLBuilding Scalable Web Apps - LVL.UP KL
Building Scalable Web Apps - LVL.UP KL
 
Performance and Scalability
Performance and ScalabilityPerformance and Scalability
Performance and Scalability
 
Storage based snapshots for KVM VMs in CloudStack
Storage based snapshots for KVM VMs in CloudStackStorage based snapshots for KVM VMs in CloudStack
Storage based snapshots for KVM VMs in CloudStack
 
Varnish Configuration Step by Step
Varnish Configuration Step by StepVarnish Configuration Step by Step
Varnish Configuration Step by Step
 
Nginx [engine x] and you (and WordPress)
Nginx [engine x] and you (and WordPress)Nginx [engine x] and you (and WordPress)
Nginx [engine x] and you (and WordPress)
 
The SPDY Protocol
The SPDY ProtocolThe SPDY Protocol
The SPDY Protocol
 
Speeding Up The Snail
Speeding Up The SnailSpeeding Up The Snail
Speeding Up The Snail
 
Vagrant for Virtualized Development
Vagrant for Virtualized DevelopmentVagrant for Virtualized Development
Vagrant for Virtualized Development
 
Travel with your mock server
Travel with your mock serverTravel with your mock server
Travel with your mock server
 
Cobbler, Func and Puppet: Tools for Large Scale Environments
Cobbler, Func and Puppet: Tools for Large Scale EnvironmentsCobbler, Func and Puppet: Tools for Large Scale Environments
Cobbler, Func and Puppet: Tools for Large Scale Environments
 
Using cobbler in a not so small environment 1.77
Using cobbler in a not so small environment 1.77Using cobbler in a not so small environment 1.77
Using cobbler in a not so small environment 1.77
 
Memcached
MemcachedMemcached
Memcached
 
Optimize drupal
Optimize drupalOptimize drupal
Optimize drupal
 

Destacado

Portfolio PlusAnimations 2009 NL
Portfolio PlusAnimations 2009 NLPortfolio PlusAnimations 2009 NL
Portfolio PlusAnimations 2009 NL
rogiervanmeeuwen
 
Building a Mega Community with PressWork
Building a Mega Community with PressWorkBuilding a Mega Community with PressWork
Building a Mega Community with PressWork
Brendan Sera-Shriar
 
Cs For Mk Brochure[1]
Cs For Mk Brochure[1]Cs For Mk Brochure[1]
Cs For Mk Brochure[1]
Jodi1269
 

Destacado (20)

Portfolio PlusAnimations 2009 NL
Portfolio PlusAnimations 2009 NLPortfolio PlusAnimations 2009 NL
Portfolio PlusAnimations 2009 NL
 
PAPER 2 2010
PAPER 2 2010PAPER 2 2010
PAPER 2 2010
 
Building a Mega Community with PressWork
Building a Mega Community with PressWorkBuilding a Mega Community with PressWork
Building a Mega Community with PressWork
 
ISoLA 2010: SADI Taverna plug-in
ISoLA 2010:  SADI Taverna plug-inISoLA 2010:  SADI Taverna plug-in
ISoLA 2010: SADI Taverna plug-in
 
Gitools
GitoolsGitools
Gitools
 
Semana de la biblioteca 2011 final
Semana de la biblioteca 2011 finalSemana de la biblioteca 2011 final
Semana de la biblioteca 2011 final
 
SWAT4LS 2011: SADI Knowledge Explorer Plug-in
SWAT4LS 2011: SADI Knowledge Explorer Plug-inSWAT4LS 2011: SADI Knowledge Explorer Plug-in
SWAT4LS 2011: SADI Knowledge Explorer Plug-in
 
Design Studio
Design StudioDesign Studio
Design Studio
 
How SADI & SHARE help restore the Scientific Method to in silico science
How SADI & SHARE help restore the Scientific Method to in silico scienceHow SADI & SHARE help restore the Scientific Method to in silico science
How SADI & SHARE help restore the Scientific Method to in silico science
 
Tumor Type Search
Tumor Type SearchTumor Type Search
Tumor Type Search
 
Sin ropa
Sin ropaSin ropa
Sin ropa
 
Leveraging trade associations
Leveraging trade associationsLeveraging trade associations
Leveraging trade associations
 
Tutorial 1.1 - Import Intogen tumor types
Tutorial 1.1 - Import Intogen tumor typesTutorial 1.1 - Import Intogen tumor types
Tutorial 1.1 - Import Intogen tumor types
 
The Evolution of Live Preview Environment Design
The Evolution of Live Preview Environment DesignThe Evolution of Live Preview Environment Design
The Evolution of Live Preview Environment Design
 
2007 11 07 Presentazione Ir In Asm
2007 11 07 Presentazione Ir In Asm2007 11 07 Presentazione Ir In Asm
2007 11 07 Presentazione Ir In Asm
 
Cs For Mk Brochure[1]
Cs For Mk Brochure[1]Cs For Mk Brochure[1]
Cs For Mk Brochure[1]
 
Gene Search
Gene SearchGene Search
Gene Search
 
¡LA BELLEZA DE LOS ARBOLES!
¡LA BELLEZA DE LOS ARBOLES!¡LA BELLEZA DE LOS ARBOLES!
¡LA BELLEZA DE LOS ARBOLES!
 
Glanz Industries, Inc.
Glanz Industries, Inc.Glanz Industries, Inc.
Glanz Industries, Inc.
 
Internet Protocol
Internet ProtocolInternet Protocol
Internet Protocol
 

Similar a Heapoff memory wtf

Jug Lugano - Scale over the limits
Jug Lugano - Scale over the limitsJug Lugano - Scale over the limits
Jug Lugano - Scale over the limits
Davide Carnevali
 
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
ColdFusionConference
 
Caching principles-solutions
Caching principles-solutionsCaching principles-solutions
Caching principles-solutions
pmanvi
 
Caching technology comparison
Caching technology comparisonCaching technology comparison
Caching technology comparison
Rohit Kelapure
 
Inside The Java Virtual Machine
Inside The Java Virtual MachineInside The Java Virtual Machine
Inside The Java Virtual Machine
elliando dias
 

Similar a Heapoff memory wtf (20)

Jug Lugano - Scale over the limits
Jug Lugano - Scale over the limitsJug Lugano - Scale over the limits
Jug Lugano - Scale over the limits
 
Scale ColdFusion with Terracotta Distributed Caching for Ehchache
Scale ColdFusion with Terracotta Distributed Caching for EhchacheScale ColdFusion with Terracotta Distributed Caching for Ehchache
Scale ColdFusion with Terracotta Distributed Caching for Ehchache
 
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
 
Caching technology comparison
Caching technology comparisonCaching technology comparison
Caching technology comparison
 
Java and cgroups eng
Java and cgroups engJava and cgroups eng
Java and cgroups eng
 
Caching with Memcached and APC
Caching with Memcached and APCCaching with Memcached and APC
Caching with Memcached and APC
 
HBase: Extreme Makeover
HBase: Extreme MakeoverHBase: Extreme Makeover
HBase: Extreme Makeover
 
Mini-Training: To cache or not to cache
Mini-Training: To cache or not to cacheMini-Training: To cache or not to cache
Mini-Training: To cache or not to cache
 
My Old Friend Malloc
My Old Friend MallocMy Old Friend Malloc
My Old Friend Malloc
 
Caching principles-solutions
Caching principles-solutionsCaching principles-solutions
Caching principles-solutions
 
Java programing considering performance
Java programing considering performanceJava programing considering performance
Java programing considering performance
 
Caching technology comparison
Caching technology comparisonCaching technology comparison
Caching technology comparison
 
Inside The Java Virtual Machine
Inside The Java Virtual MachineInside The Java Virtual Machine
Inside The Java Virtual Machine
 
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...
 
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...
 
Rails caching
Rails cachingRails caching
Rails caching
 
Exploring .NET memory management - JetBrains webinar
Exploring .NET memory management - JetBrains webinarExploring .NET memory management - JetBrains webinar
Exploring .NET memory management - JetBrains webinar
 
Javasession10
Javasession10Javasession10
Javasession10
 
JBUG.be Infinispan
JBUG.be InfinispanJBUG.be Infinispan
JBUG.be Infinispan
 
OOPs, OOMs, oh my! Containerizing JVM apps
OOPs, OOMs, oh my! Containerizing JVM appsOOPs, OOMs, oh my! Containerizing JVM apps
OOPs, OOMs, oh my! Containerizing JVM apps
 

Más de Olivier Lamy (6)

Apache sirona
Apache sironaApache sirona
Apache sirona
 
Maven university-course
Maven university-courseMaven university-course
Maven university-course
 
The Apache Way olamy
The Apache Way olamyThe Apache Way olamy
The Apache Way olamy
 
Juc paris olivier lamy talk
Juc paris olivier lamy talkJuc paris olivier lamy talk
Juc paris olivier lamy talk
 
Direct memory @ devoxxfr
Direct memory @ devoxxfrDirect memory @ devoxxfr
Direct memory @ devoxxfr
 
Tomcat Maven Plugin
Tomcat Maven PluginTomcat Maven Plugin
Tomcat Maven Plugin
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
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
Safe Software
 

Ú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...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
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...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
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
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
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
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
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
 

Heapoff memory wtf

  • 1. Heap Off Memory WTF ?? Reducing Heap memory stress
  • 2. Abstract * Java memory fundamental * heap off memory principles * heap-off cache with Apache DirectMemory
  • 3. /me Olivier Lamy * Open Source Architect @Talend Apache Team * Apache Member : Maven, Archiva, Tomcat, DirectMemory, Build Infra, etc.. * Jenkins * Add bugs in various OpenSource projects * twitter.com/olamy olamy.blogspot.com
  • 5. Java Memory Fundamental The cool part * Automatic memory allocation (do you remember when you used malloc) * Garbage collector (GC) (no more free)
  • 6. Java Memory Fundamental The bad part * stop-the-world mode * proportionnal to memory's size * unpredictable unresponsive application : complicated with tight SLA
  • 7. Heap Off Memory Not in the Heap process Limited GC stop « Unlimited storage »
  • 8. Heap Off Memory How to use that ? Native libraries with JNA https://github.com/twall/jna ByteBuffer @since 1.4 with nio ByteBuffer.allocate( size ) (not off heap) ByteBuffer.allocateDirect( size ) You can use sun.misc.Unsafe but can cause issue and not portable
  • 9. Heap Off Memory How to use that ? You can manipulate only Buffer (ByteBuffer byte[] etc..) ! So you must serialize/deserialize your datas Maximum size with -XX:MaxDirectMemorySize=
  • 10. Our use case : Cache RAM : 10-60 ns Network : 10000-30000 ns SSD Disk : 70000-120000 ns Disk : 3000000-10000000 ns Cache must use memory !
  • 11. On-Heap Cache Objects stored by reference (no de/serialisation) GC storm effect when refreshing/removing objects!
  • 12. Off-Heap Cache de/serialisation overhead (hopefully some very performant libraries exist for that) Cache objects payload no more affecting GC
  • 13. Solutions : * Terracotta BigMemory (off-heap storage on top of ehcache) * Infinispan (by Jboss) * Huge collections * Apache DirectMemory
  • 14. Apache Direct Memory Goals : Apache Direct Memory is a multi layered cache implementation featuring off-heap memory storage to enable caching of java objects without degrading jvm performance.
  • 15. Apache Direct Memory Joined Apache Incubator end 2011 12 developpers ATM Under development : Memory allocation service just rewrite APIs are subject to be changed and bugs to be found !
  • 16. Design & principles ByteBuffer.allocateDirect is the foundation of the cache ByteBuffers are allocated in big chunk and splitted for internal use
  • 17. Design & principles Build on layers CachingService : serialize object (pluggable) MemoryManagerService: Compute ByteBuffer access ByteBufferAllocatorService: Eventually deals with ByteBuffer
  • 18. ByteBuffers Allocation Merging Strategy No memory wasted Suffers from fragmentation Need synchronization at de/allocation Fixed Size buffers allocation Memory wasted if size not correctly configured No fragmentation
  • 19. Use case (1) Multi layers cache Most used objects are cached on heap, the rest off-heap (maybe overflow to disk) Sounds like ehcache with BigMemory Hard coded class to use : net.sf.ehcache.store.offheap.OffHeapStore So same package class name in Apache DirectMemory (https://jira.terracotta.org/jira/browse/EHC-940) Demo
  • 20. Use case (2) Cache Server « à la » memcache tru http(s) But with a REST Api and written in Java Client API available Demo
  • 21. > PUT /dm/cache/bordeaux HTTP/1.1 > Content-Type:text/plain {"millesime":"2003","description":"so good so good"} < HTTP/1.1 200 OK < X-DirectMemory-SerializeSize: 58 < Content-Length: 0 > GET /dm/cache/bordeaux HTTP/1.1 > Accept:text/plain < HTTP/1.1 200 OK < Content-Type: text/plain < Content-Length: 51 {"millesime":"2003","description":"so good so good"} > DELETE /dm/cache/foo HTTP/1.1
  • 22. Next Steps JSR 107 ? Benchmarks Components Integration (Cassandra, Tomcat etc..) Dynamic cache size modification Management/Monitoring
  • 23. Links http://incubator.apache.org/directmemory/ https://issues.apache.org/jira/browse/DIRECTMEMORY Demo project : https://bitbucket.org/olamy/heap-off-memory- wtf Slides : http://www.slideshare.net/olamy