SlideShare a Scribd company logo
Riding The Memory BusOphir Radnitz
AgendaRAM vs. IOTools of the TradeIntroducing TerracottaRAM Patterns with Terracotta
Anatomy of an ApplicationGet a DB connection, start transactioningStart a requestNetworkGet a bunch of dataAccess disk,SerializationRelease resourcesRender stuff
I/O IssuesScalability issuesExcessive network chatterHow do you scale the database?Only as fast as your slowest queryImplies serialization/deserialization
Bandwidths (1 of 2)
Bandwidths (1 of 2)
RAM vs. DiskInternet: ~80ms
RAM GoodnessRAM = High Bandwidth & Low LatencyNo serialization costsLess network
Use CasesLow level cacheSQL, HTTPApplication cacheHibernate 2nd level cacheShort lived entitiesQueues
Generic ToolsMemcachedA high-performance, distributed memory caching systemUsed EVRYWHERE: Facebook, Twitter, Digg, Wikipedia, Slashdot, LiveJournal, Sourceforge etc.SquidRouting and load balancing HTTP cache
Memcached Limitations for JavaRemote cacheSerialization2Gb limit
Java In-Memory ToolsPrevayler, Space4JPersist objects in memory, supports ACID and file system journalingDb4O in memory, PerstObject oriented databaseJoftiA high-performance object indexing and searching solution. Supports Map.
In-Memory ConsiderationsReliability requires redundancyAnd/or durabilityIn a cluster state must be syncedRequires state distribution
Java Distribution ToolsCoherenceGigaSpaceEhcacheInfinispanTerracottaHazelcast
Introducing TerracottaNetwork-Attached Memory infrastructure for the JVMOpen source(TPL, based on Mozilla License)Current version: 3.0.1
Terracotta Customers
Introducing TerracottaHighly AvailableHighly ScalableAvoids excessive state replicationHub and spoke architecture
A Nice DiagramApplicationApplicationApplicationTerracottaServerTerracottaServerTerracottaServerApplicationApplication
How Terracotta WorksApplicationTerracottaClientBootjarinstrumenting  your applicationTerracotta LibrariesJVMTerracottaServerTC handles JVM locks and data access
How Terracotta Works, take 2ApplicationApplicationApplication Terracotta ServerReferenceActual instance
Terracotta FeaturesCross-JVM object identity Automatic Persistence to diskVirtual Memory spill heap to TC and/or to disk, transparentlyCluster profiling & visualizationJMX-based monitoring and management
Terracotta AdvantagesEasy to integrate, Maven supportGreat scalabilityNo proprietary API (optional)Ready made integration modulesGreat diagnosticsIn/out of process
Terracotta Development Console
Integrating TerracottaDownload & extractWrite a tc-config.xmlCreate a bootjarRun your app with the bootjarAdd elements & refactor
TIM - Terracotta Integration ModulesPackaged functionalityEasy to integrateHandles locks detailsExamples:Concurrent collections, EhcacheLucene/Compass, Spring SecurityPipes, Wicket, Tomcat, Jetty Hibernate, JBoss, Spring etc.
Terracotta ElementsHTTP Session ReplicationCache EvictorQueuesMaster-WorkerAsynchronous ProcessorCluster membership events
Terracotta PatternsData CacheIntermediate persistenceQueues / work distributionWrite behind to database
Data Cache ConsiderationsFigure out data lifecycleRead-only, metadata, configuration, sessionWhere cache is applicableSingle point of updateSet eviction policiesLRU, FIFO
Data CacheSession cache is easier, entity cache needs real distributionUse a generic cacheConcurrentMap + Map Evictor (+ Jofti)Or a Hibernate 2nd level cacheehcache, TC-Cache
Where Should My Objects Live?MemoryDatabaseAppropriatenessdies quicklystays foreverData Lifetime
Intermediate Data LifetimeSome data doesn’t have to be stored in the databaseSession informationMessages / TokensTransactionUnfinished stuffData Lifetime
TIM Pipes: QueuesExecute time consuming tasks asynchronouslyIn a reliable wayLoad balancedExamples:Send emails, process images Supports pub/sub, routingNo need for JMS
CommonJ – Work DistributionA joint API spec by Oracle and IBMProvides interfaces for:Worker / WorkItem / WorkManagerScheduleretc…TIM-Messaging provides an implementationPipesMaster / Worker
Write Behind to System Of RecordAsynchronously persist to DBWork queue“1.5 phase commit”Flags objects as dirtyAvoids syncing dirty objectsFlushes objectsFlags objects as clean
Terracotta DrawbacksConcurrency awarenessMassive scalability is a commercial featureRequires another machine(s)Sharing objects across applications requires configurationTIMs documentation
Terracotta ProsConcurrency awarenessFits into your applicationProvides great visibilityVery versatile usageScales massivelyDoesn’t use serializationGreat community
SummaryAsk yourself:Does it belong in the DB?Do I have to go to the DB for that?Do I have to do it now?
Terracotta ProsAny Questions?

More Related Content

PPT
Persisting Your Objects In The Database World @ AlphaCSP Professional OSS Con...
Baruch Sadogursky
 
PPT
Breaking The Clustering Limits @ AlphaCSP JavaEdge 2007
Baruch Sadogursky
 
PPTX
TheEdge10 : Big Data is Here - Hadoop to the Rescue
Shay Sofer
 
PDF
REST and JAX-RS
Guy Nir
 
PPTX
Smart Data Conference: DL4J and DataVec
Josh Patterson
 
PDF
Ray and Its Growing Ecosystem
Databricks
 
PDF
Apache Spark: What's under the hood
Adarsh Pannu
 
PDF
Spark & Spark Streaming Internals - Nov 15 (1)
Akhil Das
 
Persisting Your Objects In The Database World @ AlphaCSP Professional OSS Con...
Baruch Sadogursky
 
Breaking The Clustering Limits @ AlphaCSP JavaEdge 2007
Baruch Sadogursky
 
TheEdge10 : Big Data is Here - Hadoop to the Rescue
Shay Sofer
 
REST and JAX-RS
Guy Nir
 
Smart Data Conference: DL4J and DataVec
Josh Patterson
 
Ray and Its Growing Ecosystem
Databricks
 
Apache Spark: What's under the hood
Adarsh Pannu
 
Spark & Spark Streaming Internals - Nov 15 (1)
Akhil Das
 

What's hot (20)

PDF
Deep Dive: Memory Management in Apache Spark
Databricks
 
PDF
Packed Objects: Fast Talking Java Meets Native Code - Steve Poole (IBM)
jaxLondonConference
 
PDF
Spark as the Gateway Drug to Typed Functional Programming: Spark Summit East ...
Spark Summit
 
PPTX
Deep Learning: DL4J and DataVec
Josh Patterson
 
PDF
Apache Spark: The Analytics Operating System
Adarsh Pannu
 
PDF
Spark overview
Lisa Hua
 
PDF
How Machine Learning and AI Can Support the Fight Against COVID-19
Databricks
 
PDF
Apache Spark RDDs
Dean Chen
 
PDF
Spark 101
Mohit Garg
 
ODP
The Adventure: BlackRay as a Storage Engine
fschupp
 
PDF
Elasticsearch And Apache Lucene For Apache Spark And MLlib
Jen Aman
 
PDF
Writing Continuous Applications with Structured Streaming Python APIs in Apac...
Databricks
 
ODP
Spark Deep Dive
Corey Nolet
 
PDF
Introduction to spark
Duyhai Doan
 
PDF
Apache Spark in Depth: Core Concepts, Architecture & Internals
Anton Kirillov
 
PDF
Apache Spark, the Next Generation Cluster Computing
Gerger
 
PDF
Apache Spark Tutorial
Ahmet Bulut
 
PDF
Big learning 1.2
Mohit Garg
 
PPTX
Introduction to Spark ML
Holden Karau
 
PDF
Spark shuffle introduction
colorant
 
Deep Dive: Memory Management in Apache Spark
Databricks
 
Packed Objects: Fast Talking Java Meets Native Code - Steve Poole (IBM)
jaxLondonConference
 
Spark as the Gateway Drug to Typed Functional Programming: Spark Summit East ...
Spark Summit
 
Deep Learning: DL4J and DataVec
Josh Patterson
 
Apache Spark: The Analytics Operating System
Adarsh Pannu
 
Spark overview
Lisa Hua
 
How Machine Learning and AI Can Support the Fight Against COVID-19
Databricks
 
Apache Spark RDDs
Dean Chen
 
Spark 101
Mohit Garg
 
The Adventure: BlackRay as a Storage Engine
fschupp
 
Elasticsearch And Apache Lucene For Apache Spark And MLlib
Jen Aman
 
Writing Continuous Applications with Structured Streaming Python APIs in Apac...
Databricks
 
Spark Deep Dive
Corey Nolet
 
Introduction to spark
Duyhai Doan
 
Apache Spark in Depth: Core Concepts, Architecture & Internals
Anton Kirillov
 
Apache Spark, the Next Generation Cluster Computing
Gerger
 
Apache Spark Tutorial
Ahmet Bulut
 
Big learning 1.2
Mohit Garg
 
Introduction to Spark ML
Holden Karau
 
Spark shuffle introduction
colorant
 
Ad

Similar to From I/O To RAM (20)

PPT
FOWA Scaling The Lamp Stack Workshop
dlieberman
 
PPT
Scalable Apache for Beginners
webhostingguy
 
PPT
Design an I/O system
AARTHI SEETHA
 
PPT
WE18_Performance_Up.ppt
webhostingguy
 
PDF
Making it fast: Zotonic & Performance
Arjan
 
PPT
Caching fundamentals by Shrikant Vashishtha
ShriKant Vashishtha
 
PDF
Performance and predictability
RichardWarburton
 
PPT
Introduction to Real Time Java
Deniz Oguz
 
PDF
Distributed Systems: scalability and high availability
Renato Lucindo
 
ODP
Terracotta Ch'ti Jug
Ch'ti JUG
 
PDF
User-space Network Processing
Ryousei Takano
 
PPTX
Vault2016
Dan Lambright
 
PDF
Cómo se diseña una base de datos que pueda ingerir más de cuatro millones de ...
javier ramirez
 
PPT
Performance_Up.ppt
webhostingguy
 
PDF
Magento's Imagine eCommerce Conference 2011 - Hosting Magento: Performance an...
MagentoImagine
 
PDF
Magento Imagine eCommerce Conference February 2011: Optimizing Magento For Pe...
varien
 
PPT
Rtos
seenakumari
 
PPT
Rtos
Naveen N
 
PPT
ghhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhjjjjjjjjjjjjjjj
adugnanegero
 
PPT
Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010
Bhupesh Bansal
 
FOWA Scaling The Lamp Stack Workshop
dlieberman
 
Scalable Apache for Beginners
webhostingguy
 
Design an I/O system
AARTHI SEETHA
 
WE18_Performance_Up.ppt
webhostingguy
 
Making it fast: Zotonic & Performance
Arjan
 
Caching fundamentals by Shrikant Vashishtha
ShriKant Vashishtha
 
Performance and predictability
RichardWarburton
 
Introduction to Real Time Java
Deniz Oguz
 
Distributed Systems: scalability and high availability
Renato Lucindo
 
Terracotta Ch'ti Jug
Ch'ti JUG
 
User-space Network Processing
Ryousei Takano
 
Vault2016
Dan Lambright
 
Cómo se diseña una base de datos que pueda ingerir más de cuatro millones de ...
javier ramirez
 
Performance_Up.ppt
webhostingguy
 
Magento's Imagine eCommerce Conference 2011 - Hosting Magento: Performance an...
MagentoImagine
 
Magento Imagine eCommerce Conference February 2011: Optimizing Magento For Pe...
varien
 
Rtos
Naveen N
 
ghhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhjjjjjjjjjjjjjjj
adugnanegero
 
Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010
Bhupesh Bansal
 
Ad

More from Baruch Sadogursky (20)

PDF
DevOps Patterns & Antipatterns for Continuous Software Updates @ NADOG April ...
Baruch Sadogursky
 
PDF
DevOps Patterns & Antipatterns for Continuous Software Updates @ DevOps.com A...
Baruch Sadogursky
 
PDF
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Oracle Code NY...
Baruch Sadogursky
 
PDF
Data driven devops as presented at QCon London 2018
Baruch Sadogursky
 
PDF
A Research Study Into DevOps Bottlenecks as presented at Oracle Code LA 2018
Baruch Sadogursky
 
PDF
Java Puzzlers NG S03 a DevNexus 2018
Baruch Sadogursky
 
PDF
Where the Helm are your binaries? as presented at Canada Kubernetes Meetups
Baruch Sadogursky
 
PDF
Data driven devops as presented at Codemash 2018
Baruch Sadogursky
 
PDF
A Research Study into DevOps Bottlenecks as presented at Codemash 2018
Baruch Sadogursky
 
PPTX
Best Practices for Managing Docker Versions as presented at JavaOne 2017
Baruch Sadogursky
 
PDF
Troubleshooting & Debugging Production Microservices in Kubernetes as present...
Baruch Sadogursky
 
PDF
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Devoxx 2017
Baruch Sadogursky
 
PPTX
Amazon Alexa Skills vs Google Home Actions, the Big Java VUI Faceoff as prese...
Baruch Sadogursky
 
PDF
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at DevOps Days Be...
Baruch Sadogursky
 
PDF
Java Puzzlers NG S02: Down the Rabbit Hole as it was presented at The Pittsbu...
Baruch Sadogursky
 
PDF
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at The Pittsburgh...
Baruch Sadogursky
 
PDF
Let’s Wing It: A Study in DevRel Strategy
Baruch Sadogursky
 
PDF
Log Driven First Class Customer Support at Scale
Baruch Sadogursky
 
PPTX
[Webinar] The Frog And The Butler: CI Pipelines For Modern DevOps
Baruch Sadogursky
 
PDF
Patterns and antipatterns in Docker image lifecycle as was presented at DC Do...
Baruch Sadogursky
 
DevOps Patterns & Antipatterns for Continuous Software Updates @ NADOG April ...
Baruch Sadogursky
 
DevOps Patterns & Antipatterns for Continuous Software Updates @ DevOps.com A...
Baruch Sadogursky
 
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Oracle Code NY...
Baruch Sadogursky
 
Data driven devops as presented at QCon London 2018
Baruch Sadogursky
 
A Research Study Into DevOps Bottlenecks as presented at Oracle Code LA 2018
Baruch Sadogursky
 
Java Puzzlers NG S03 a DevNexus 2018
Baruch Sadogursky
 
Where the Helm are your binaries? as presented at Canada Kubernetes Meetups
Baruch Sadogursky
 
Data driven devops as presented at Codemash 2018
Baruch Sadogursky
 
A Research Study into DevOps Bottlenecks as presented at Codemash 2018
Baruch Sadogursky
 
Best Practices for Managing Docker Versions as presented at JavaOne 2017
Baruch Sadogursky
 
Troubleshooting & Debugging Production Microservices in Kubernetes as present...
Baruch Sadogursky
 
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Devoxx 2017
Baruch Sadogursky
 
Amazon Alexa Skills vs Google Home Actions, the Big Java VUI Faceoff as prese...
Baruch Sadogursky
 
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at DevOps Days Be...
Baruch Sadogursky
 
Java Puzzlers NG S02: Down the Rabbit Hole as it was presented at The Pittsbu...
Baruch Sadogursky
 
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at The Pittsburgh...
Baruch Sadogursky
 
Let’s Wing It: A Study in DevRel Strategy
Baruch Sadogursky
 
Log Driven First Class Customer Support at Scale
Baruch Sadogursky
 
[Webinar] The Frog And The Butler: CI Pipelines For Modern DevOps
Baruch Sadogursky
 
Patterns and antipatterns in Docker image lifecycle as was presented at DC Do...
Baruch Sadogursky
 

Recently uploaded (20)

PDF
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
PPTX
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
PDF
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PDF
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
PDF
Software Development Methodologies in 2025
KodekX
 
PPTX
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
PDF
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
PDF
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
PPTX
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
PDF
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
PDF
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
PDF
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
PDF
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
PPTX
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PDF
Get More from Fiori Automation - What’s New, What Works, and What’s Next.pdf
Precisely
 
PPTX
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
PDF
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
PDF
Brief History of Internet - Early Days of Internet
sutharharshit158
 
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
Software Development Methodologies in 2025
KodekX
 
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
Get More from Fiori Automation - What’s New, What Works, and What’s Next.pdf
Precisely
 
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
Brief History of Internet - Early Days of Internet
sutharharshit158
 

From I/O To RAM