SlideShare a Scribd company logo
1 of 32
Download to read offline
Exploring Terracotta
Alex Miller (@puredanger)
Agenda

• Architecture and scale
• Examinator reference application

• What do people use it for?

• How does it work?

• Terracotta 3.0
Applications in Three Tiers


                      Client



                      Server



                    Database
How do we scale?


   Client           Client    Client



   Server           Server    Server



                   Database
But what about failover?
Option 1: Servers share state


    Client            Client    Client



   Server            Server     Server



                    Database
How?

• RMI


• JMS


• Custom (JGroups, etc)
Option 2: Database (“stateless”)


    Client            Client       Client



   Server            Server        Server



                    Database
Stateless == “State in the database”

• Database load


• Serialization to and from the database


• Network bandwidth


• Object / relational mapping due to impedance mismatch
Option 3: Terracotta!


   Client                Client       Client



   Server                Server      Server
  Terracotta            Terracotta   Terracotta



                                     Terracotta
                                      Terracotta
                        Database       Server
                                        Server
                                      Instance
                                       Instance
Why is this better?

• Hub and spoke vs peer to peer


• Avoid object / relational translation


• Avoid serialization


• Reduce database overload


• Programming model you already know


• Focus on your app, not scalability and high availability
Agenda

• Architecture and scale

• Examinator reference application
• What do people use it for?

• How does it work?

• Terracotta 3.0
Examinator

• Terracotta reference web application


• Online exams


• “Session” use case




• http://reference.terracotta.org
Examinator stack

• Spring-based stack
  • MVC
                                           View
  • Web Flow                                          Spring Web Flow
                                          Model       Spring MVC
  • Security                                          Sitemesh
                                         Controller
  • Transactions
                       Spring Security
• Open source                             Service     Freemarker

  • Tomcat / Jetty
                                           DAO
  • Hibernate / JPA        JPA
                           Hibernate
                                          Domain
  • Site Mesh
  • Freemarker
What state should go in Terracotta?

        Appropriateness   Memory     Terracotta    Database




                                   Data Lifetime
Examinator Terracotta Usage

• User registration codes

• Password reset codes

• Exam cache

• Session clustering

• Spring security (via session)

• Spring web flow (via session)

• Exam in progress session - answers, choice ordering, marked to review
Demo
Agenda

• Architecture and scale

• Examinator reference application

• What do people use it for?
• How does it work?

• Terracotta 3.0
Business Use Cases

• Distributed cache


• Clustered HTTP sessions


• Batch processing


• Grid


• Messaging and events
Terracotta Elements

• Replicated sessions


• Async processor


• Cache evictor


• ConcurrentStringMap


• Queues


• Master-worker


• TC Cache
Who Uses It?

• e-Commerce


• Online gaming


• Financial services


• Travel & leisure


• Social networking
Agenda

• Architecture and scale

• Examinator reference application

• What do people use it for?

• How does it work?

• Terracotta 3.0
Core Concepts

• Roots


• Instrumented Classes


• Locks


• Integration Modules
Clustered Heap

        App   App app = new App();
              app.run();
Clustered Heap

        App         EmployeeManager employeeMgr =
                       new EmployeeManager();


         Employee
         Manager
                         Object lock

                                       Object lock = new Object();
                                       Map<String,Employee> =
                                         new HashMap<String,Employee>();

                         HashMap
                        employees
Clustered Heap

        App




         Employee
                                                  quot;U99411quot;
         Manager
                    Object lock


                                                Employee.ACT
                                                  IVE == 1



                                     Employee     quot;Gandalfquot;

                     HashMap
                    employees


                                  Employee employee =
                                     new Employee(
                                        “U99411”,
                                        “Gandalf”,
                                        Employee.ACTIVE);
Clustered Heap

        App         employeeMgr.addEmployee(employee);



         Employee
                                                              quot;U99411quot;
         Manager
                        Object lock


                                                            Employee.ACT
                                                              IVE == 1



                                      quot;U99411quot;   Employee     quot;Gandalfquot;

                        HashMap
                       employees




              synchronized(lock) {
                employees.put(e.getId(), e);
              }
Clustered Heap

        App




         Employee
                                                          quot;U99411quot;
         Manager
                    Object lock


                                                        Employee.ACT
                                                          IVE == 1



                                  quot;U99411quot;   Employee     quot;Gandalfquot;

                     HashMap
                    employees
                                  quot;U23526quot;   Employee     quot;U23526quot;



                                                        Employee.ACT
                                                           IVE = 1



                                                          quot;U99411quot;
Let’s look at how to do that...
Agenda

• Architecture and scale

• Examinator reference application

• What do people use it for?

• How does it work?

• Terracotta 3.0
Terracotta 3.0

• Server Array Striping - server scalability


• Operations Center / Developer Console - new dashboard, DGC stats


• Cluster events API - topology, data locality


• Application groups - sharing data across heterogeneous applications


• Platform support - Oracle WebLogic 10.2, 10.3 and RHEL 5.0
Thanks!

• Terracotta Open Source JVM clustering:

   • http://www.terracotta.org

• Apress: “The Definitive Guide to Terracotta”

   • by Ari Zilka, Alex Miller, Geert Bevin, Jonas
     Boner, Orion Letizi, Taylor Gautier

• Alex Miller

   • @puredanger

   • http://tech.puredanger.com

More Related Content

What's hot

Reactive Fault Tolerant Programming with Hystrix and RxJava
Reactive Fault Tolerant Programming with Hystrix and RxJavaReactive Fault Tolerant Programming with Hystrix and RxJava
Reactive Fault Tolerant Programming with Hystrix and RxJavaMatt Stine
 
Distributed Real-Time Stream Processing: Why and How 2.0
Distributed Real-Time Stream Processing:  Why and How 2.0Distributed Real-Time Stream Processing:  Why and How 2.0
Distributed Real-Time Stream Processing: Why and How 2.0Petr Zapletal
 
A dive into akka streams: from the basics to a real-world scenario
A dive into akka streams: from the basics to a real-world scenarioA dive into akka streams: from the basics to a real-world scenario
A dive into akka streams: from the basics to a real-world scenarioGioia Ballin
 
Akka Persistence | Event Sourcing
Akka Persistence | Event SourcingAkka Persistence | Event Sourcing
Akka Persistence | Event SourcingKnoldus Inc.
 
Reactive Thinking in Java
Reactive Thinking in JavaReactive Thinking in Java
Reactive Thinking in JavaYakov Fain
 
Kogito: cloud native business automation
Kogito: cloud native business automationKogito: cloud native business automation
Kogito: cloud native business automationMario Fusco
 
Reactive programming in Angular 2
Reactive programming in Angular 2Reactive programming in Angular 2
Reactive programming in Angular 2Yakov Fain
 
What's Coming in Spring 3.0
What's Coming in Spring 3.0What's Coming in Spring 3.0
What's Coming in Spring 3.0Matt Raible
 
We Are All Testers Now: The Testing Pyramid and Front-End Development
We Are All Testers Now: The Testing Pyramid and Front-End DevelopmentWe Are All Testers Now: The Testing Pyramid and Front-End Development
We Are All Testers Now: The Testing Pyramid and Front-End DevelopmentAll Things Open
 
Tech Talks_25.04.15_Session 3_Tibor Sulyan_Distributed coordination with zook...
Tech Talks_25.04.15_Session 3_Tibor Sulyan_Distributed coordination with zook...Tech Talks_25.04.15_Session 3_Tibor Sulyan_Distributed coordination with zook...
Tech Talks_25.04.15_Session 3_Tibor Sulyan_Distributed coordination with zook...EPAM_Systems_Bulgaria
 
谷歌 Scott-lessons learned in testability
谷歌 Scott-lessons learned in testability谷歌 Scott-lessons learned in testability
谷歌 Scott-lessons learned in testabilitydrewz lin
 
Building Scalable Stateless Applications with RxJava
Building Scalable Stateless Applications with RxJavaBuilding Scalable Stateless Applications with RxJava
Building Scalable Stateless Applications with RxJavaRick Warren
 
Adding a modern twist to legacy web applications
Adding a modern twist to legacy web applicationsAdding a modern twist to legacy web applications
Adding a modern twist to legacy web applicationsJeff Durta
 
The Cloud-natives are RESTless @ JavaOne
The Cloud-natives are RESTless @ JavaOneThe Cloud-natives are RESTless @ JavaOne
The Cloud-natives are RESTless @ JavaOneKonrad Malawski
 
Intro to RxJava/RxAndroid - GDG Munich Android
Intro to RxJava/RxAndroid - GDG Munich AndroidIntro to RxJava/RxAndroid - GDG Munich Android
Intro to RxJava/RxAndroid - GDG Munich AndroidEgor Andreevich
 
Reactive programming with RxJava
Reactive programming with RxJavaReactive programming with RxJava
Reactive programming with RxJavaJobaer Chowdhury
 
Akka Actor presentation
Akka Actor presentationAkka Actor presentation
Akka Actor presentationGene Chang
 
Akka Streams in Action @ ScalaDays Berlin 2016
Akka Streams in Action @ ScalaDays Berlin 2016Akka Streams in Action @ ScalaDays Berlin 2016
Akka Streams in Action @ ScalaDays Berlin 2016Konrad Malawski
 
Gatling workshop lets test17
Gatling workshop lets test17Gatling workshop lets test17
Gatling workshop lets test17Gerald Muecke
 

What's hot (20)

Reactive Fault Tolerant Programming with Hystrix and RxJava
Reactive Fault Tolerant Programming with Hystrix and RxJavaReactive Fault Tolerant Programming with Hystrix and RxJava
Reactive Fault Tolerant Programming with Hystrix and RxJava
 
Distributed Real-Time Stream Processing: Why and How 2.0
Distributed Real-Time Stream Processing:  Why and How 2.0Distributed Real-Time Stream Processing:  Why and How 2.0
Distributed Real-Time Stream Processing: Why and How 2.0
 
A dive into akka streams: from the basics to a real-world scenario
A dive into akka streams: from the basics to a real-world scenarioA dive into akka streams: from the basics to a real-world scenario
A dive into akka streams: from the basics to a real-world scenario
 
Akka Persistence | Event Sourcing
Akka Persistence | Event SourcingAkka Persistence | Event Sourcing
Akka Persistence | Event Sourcing
 
Reactive Thinking in Java
Reactive Thinking in JavaReactive Thinking in Java
Reactive Thinking in Java
 
Kogito: cloud native business automation
Kogito: cloud native business automationKogito: cloud native business automation
Kogito: cloud native business automation
 
Reactive programming in Angular 2
Reactive programming in Angular 2Reactive programming in Angular 2
Reactive programming in Angular 2
 
What's Coming in Spring 3.0
What's Coming in Spring 3.0What's Coming in Spring 3.0
What's Coming in Spring 3.0
 
We Are All Testers Now: The Testing Pyramid and Front-End Development
We Are All Testers Now: The Testing Pyramid and Front-End DevelopmentWe Are All Testers Now: The Testing Pyramid and Front-End Development
We Are All Testers Now: The Testing Pyramid and Front-End Development
 
Tech Talks_25.04.15_Session 3_Tibor Sulyan_Distributed coordination with zook...
Tech Talks_25.04.15_Session 3_Tibor Sulyan_Distributed coordination with zook...Tech Talks_25.04.15_Session 3_Tibor Sulyan_Distributed coordination with zook...
Tech Talks_25.04.15_Session 3_Tibor Sulyan_Distributed coordination with zook...
 
谷歌 Scott-lessons learned in testability
谷歌 Scott-lessons learned in testability谷歌 Scott-lessons learned in testability
谷歌 Scott-lessons learned in testability
 
Building Scalable Stateless Applications with RxJava
Building Scalable Stateless Applications with RxJavaBuilding Scalable Stateless Applications with RxJava
Building Scalable Stateless Applications with RxJava
 
Adding a modern twist to legacy web applications
Adding a modern twist to legacy web applicationsAdding a modern twist to legacy web applications
Adding a modern twist to legacy web applications
 
The Cloud-natives are RESTless @ JavaOne
The Cloud-natives are RESTless @ JavaOneThe Cloud-natives are RESTless @ JavaOne
The Cloud-natives are RESTless @ JavaOne
 
Intro to RxJava/RxAndroid - GDG Munich Android
Intro to RxJava/RxAndroid - GDG Munich AndroidIntro to RxJava/RxAndroid - GDG Munich Android
Intro to RxJava/RxAndroid - GDG Munich Android
 
rx-java-presentation
rx-java-presentationrx-java-presentation
rx-java-presentation
 
Reactive programming with RxJava
Reactive programming with RxJavaReactive programming with RxJava
Reactive programming with RxJava
 
Akka Actor presentation
Akka Actor presentationAkka Actor presentation
Akka Actor presentation
 
Akka Streams in Action @ ScalaDays Berlin 2016
Akka Streams in Action @ ScalaDays Berlin 2016Akka Streams in Action @ ScalaDays Berlin 2016
Akka Streams in Action @ ScalaDays Berlin 2016
 
Gatling workshop lets test17
Gatling workshop lets test17Gatling workshop lets test17
Gatling workshop lets test17
 

Viewers also liked

Terracotta Java Scalability - Stateless Versus Stateful Apps
Terracotta Java Scalability - Stateless Versus Stateful AppsTerracotta Java Scalability - Stateless Versus Stateful Apps
Terracotta Java Scalability - Stateless Versus Stateful AppsMatthew McCullough
 
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 EhchacheColdFusionConference
 
Caching reboot: javax.cache & Ehcache 3
Caching reboot: javax.cache & Ehcache 3Caching reboot: javax.cache & Ehcache 3
Caching reboot: javax.cache & Ehcache 3Louis Jacomet
 
Building High Scalability Apps With Terracotta
Building High Scalability Apps With TerracottaBuilding High Scalability Apps With Terracotta
Building High Scalability Apps With TerracottaDavid Reines
 
Advanced caching techniques with ehcache, big memory, terracotta, and coldfusion
Advanced caching techniques with ehcache, big memory, terracotta, and coldfusionAdvanced caching techniques with ehcache, big memory, terracotta, and coldfusion
Advanced caching techniques with ehcache, big memory, terracotta, and coldfusionColdFusionConference
 
Introduction to Terracotta
Introduction to TerracottaIntroduction to Terracotta
Introduction to TerracottaCris Holdorph
 
Clustering Java applications with Terracotta and Hazelcast
Clustering Java applications with Terracotta and HazelcastClustering Java applications with Terracotta and Hazelcast
Clustering Java applications with Terracotta and Hazelcastb0ris_1
 
Scaling Hibernate with Terracotta
Scaling Hibernate with TerracottaScaling Hibernate with Terracotta
Scaling Hibernate with TerracottaAlex Miller
 
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
 
Terracotta And Hibernate
Terracotta And  HibernateTerracotta And  Hibernate
Terracotta And HibernateTaylor Gautier
 
Scalability, Availability & Stability Patterns
Scalability, Availability & Stability PatternsScalability, Availability & Stability Patterns
Scalability, Availability & Stability PatternsJonas Bonér
 

Viewers also liked (14)

Terracotta Java Scalability - Stateless Versus Stateful Apps
Terracotta Java Scalability - Stateless Versus Stateful AppsTerracotta Java Scalability - Stateless Versus Stateful Apps
Terracotta Java Scalability - Stateless Versus Stateful Apps
 
Aop clustering
Aop clusteringAop clustering
Aop clustering
 
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
 
5 Reasons to Upgrade Ehcache to BigMemory Go
5 Reasons to Upgrade Ehcache to BigMemory Go5 Reasons to Upgrade Ehcache to BigMemory Go
5 Reasons to Upgrade Ehcache to BigMemory Go
 
Caching reboot: javax.cache & Ehcache 3
Caching reboot: javax.cache & Ehcache 3Caching reboot: javax.cache & Ehcache 3
Caching reboot: javax.cache & Ehcache 3
 
Building High Scalability Apps With Terracotta
Building High Scalability Apps With TerracottaBuilding High Scalability Apps With Terracotta
Building High Scalability Apps With Terracotta
 
Terracotta Hadoop & In-Memory Webcast
Terracotta Hadoop & In-Memory WebcastTerracotta Hadoop & In-Memory Webcast
Terracotta Hadoop & In-Memory Webcast
 
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
 
Introduction to Terracotta
Introduction to TerracottaIntroduction to Terracotta
Introduction to Terracotta
 
Clustering Java applications with Terracotta and Hazelcast
Clustering Java applications with Terracotta and HazelcastClustering Java applications with Terracotta and Hazelcast
Clustering Java applications with Terracotta and Hazelcast
 
Scaling Hibernate with Terracotta
Scaling Hibernate with TerracottaScaling Hibernate with Terracotta
Scaling Hibernate with Terracotta
 
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...
 
Terracotta And Hibernate
Terracotta And  HibernateTerracotta And  Hibernate
Terracotta And Hibernate
 
Scalability, Availability & Stability Patterns
Scalability, Availability & Stability PatternsScalability, Availability & Stability Patterns
Scalability, Availability & Stability Patterns
 

Similar to Exploring Terracotta

Lightweight Grids With Terracotta
Lightweight Grids With TerracottaLightweight Grids With Terracotta
Lightweight Grids With TerracottaPT.JUG
 
Smart Client Development
Smart Client DevelopmentSmart Client Development
Smart Client DevelopmentTamir Khason
 
[Muir] Seam 2 in practice
[Muir] Seam 2 in practice[Muir] Seam 2 in practice
[Muir] Seam 2 in practicejavablend
 
Stateful streaming data pipelines
Stateful streaming data pipelinesStateful streaming data pipelines
Stateful streaming data pipelinesTimothy Farkas
 
Asynchronous Javascript and Rich Internet Aplications
Asynchronous Javascript and Rich Internet AplicationsAsynchronous Javascript and Rich Internet Aplications
Asynchronous Javascript and Rich Internet AplicationsSubramanyan Murali
 
Brian Oliver Pimp My Data Grid
Brian Oliver  Pimp My Data GridBrian Oliver  Pimp My Data Grid
Brian Oliver Pimp My Data Griddeimos
 
Google Back To Front: From Gears to App Engine and Beyond
Google Back To Front: From Gears to App Engine and BeyondGoogle Back To Front: From Gears to App Engine and Beyond
Google Back To Front: From Gears to App Engine and Beyonddion
 
Rails in the Cloud
Rails in the CloudRails in the Cloud
Rails in the Cloudiwarshak
 
OC Big Data Monthly Meetup #5 - Session 1 - Altiscale
OC Big Data Monthly Meetup #5 - Session 1 - AltiscaleOC Big Data Monthly Meetup #5 - Session 1 - Altiscale
OC Big Data Monthly Meetup #5 - Session 1 - AltiscaleBig Data Joe™ Rossi
 
Workflowsim escience12
Workflowsim escience12Workflowsim escience12
Workflowsim escience12Weiwei Chen
 
Data Analytics Service Company and Its Ruby Usage
Data Analytics Service Company and Its Ruby UsageData Analytics Service Company and Its Ruby Usage
Data Analytics Service Company and Its Ruby UsageSATOSHI TAGOMORI
 
Using Continuous Etl With Real Time Queries To Eliminate My Sql Bottlenecks
Using Continuous Etl With Real Time Queries To Eliminate My Sql BottlenecksUsing Continuous Etl With Real Time Queries To Eliminate My Sql Bottlenecks
Using Continuous Etl With Real Time Queries To Eliminate My Sql BottlenecksMySQLConference
 
Usability in the GeoWeb
Usability in the GeoWebUsability in the GeoWeb
Usability in the GeoWebDave Bouwman
 
Wide Open Spaces Using My Sql As A Web Mapping Service Backend
Wide Open Spaces Using My Sql As A Web Mapping Service BackendWide Open Spaces Using My Sql As A Web Mapping Service Backend
Wide Open Spaces Using My Sql As A Web Mapping Service BackendMySQLConference
 
Galaxy
GalaxyGalaxy
Galaxybosc
 
Buildingsocialanalyticstoolwithmongodb
BuildingsocialanalyticstoolwithmongodbBuildingsocialanalyticstoolwithmongodb
BuildingsocialanalyticstoolwithmongodbMongoDB APAC
 
When To Use Ruby On Rails
When To Use Ruby On RailsWhen To Use Ruby On Rails
When To Use Ruby On Railsdosire
 

Similar to Exploring Terracotta (20)

Lightweight Grids With Terracotta
Lightweight Grids With TerracottaLightweight Grids With Terracotta
Lightweight Grids With Terracotta
 
Smart Client Development
Smart Client DevelopmentSmart Client Development
Smart Client Development
 
[Muir] Seam 2 in practice
[Muir] Seam 2 in practice[Muir] Seam 2 in practice
[Muir] Seam 2 in practice
 
Stateful streaming data pipelines
Stateful streaming data pipelinesStateful streaming data pipelines
Stateful streaming data pipelines
 
Asynchronous Javascript and Rich Internet Aplications
Asynchronous Javascript and Rich Internet AplicationsAsynchronous Javascript and Rich Internet Aplications
Asynchronous Javascript and Rich Internet Aplications
 
Brian Oliver Pimp My Data Grid
Brian Oliver  Pimp My Data GridBrian Oliver  Pimp My Data Grid
Brian Oliver Pimp My Data Grid
 
Google Back To Front: From Gears to App Engine and Beyond
Google Back To Front: From Gears to App Engine and BeyondGoogle Back To Front: From Gears to App Engine and Beyond
Google Back To Front: From Gears to App Engine and Beyond
 
Rails in the Cloud
Rails in the CloudRails in the Cloud
Rails in the Cloud
 
OC Big Data Monthly Meetup #5 - Session 1 - Altiscale
OC Big Data Monthly Meetup #5 - Session 1 - AltiscaleOC Big Data Monthly Meetup #5 - Session 1 - Altiscale
OC Big Data Monthly Meetup #5 - Session 1 - Altiscale
 
Workflowsim escience12
Workflowsim escience12Workflowsim escience12
Workflowsim escience12
 
Os Ramani
Os RamaniOs Ramani
Os Ramani
 
Data Analytics Service Company and Its Ruby Usage
Data Analytics Service Company and Its Ruby UsageData Analytics Service Company and Its Ruby Usage
Data Analytics Service Company and Its Ruby Usage
 
Using Continuous Etl With Real Time Queries To Eliminate My Sql Bottlenecks
Using Continuous Etl With Real Time Queries To Eliminate My Sql BottlenecksUsing Continuous Etl With Real Time Queries To Eliminate My Sql Bottlenecks
Using Continuous Etl With Real Time Queries To Eliminate My Sql Bottlenecks
 
Usability in the GeoWeb
Usability in the GeoWebUsability in the GeoWeb
Usability in the GeoWeb
 
Wide Open Spaces Using My Sql As A Web Mapping Service Backend
Wide Open Spaces Using My Sql As A Web Mapping Service BackendWide Open Spaces Using My Sql As A Web Mapping Service Backend
Wide Open Spaces Using My Sql As A Web Mapping Service Backend
 
Galaxy
GalaxyGalaxy
Galaxy
 
Buildingsocialanalyticstoolwithmongodb
BuildingsocialanalyticstoolwithmongodbBuildingsocialanalyticstoolwithmongodb
Buildingsocialanalyticstoolwithmongodb
 
Ajax
AjaxAjax
Ajax
 
Orcale Presentation
Orcale PresentationOrcale Presentation
Orcale Presentation
 
When To Use Ruby On Rails
When To Use Ruby On RailsWhen To Use Ruby On Rails
When To Use Ruby On Rails
 

More from Alex Miller

Clojure/West Overview (12/1/11)
Clojure/West Overview (12/1/11)Clojure/West Overview (12/1/11)
Clojure/West Overview (12/1/11)Alex Miller
 
Concurrent Stream Processing
Concurrent Stream ProcessingConcurrent Stream Processing
Concurrent Stream ProcessingAlex Miller
 
Stream Execution with Clojure and Fork/join
Stream Execution with Clojure and Fork/joinStream Execution with Clojure and Fork/join
Stream Execution with Clojure and Fork/joinAlex Miller
 
Cracking clojure
Cracking clojureCracking clojure
Cracking clojureAlex Miller
 
Releasing Relational Data to the Semantic Web
Releasing Relational Data to the Semantic WebReleasing Relational Data to the Semantic Web
Releasing Relational Data to the Semantic WebAlex Miller
 
Clojure: The Art of Abstraction
Clojure: The Art of AbstractionClojure: The Art of Abstraction
Clojure: The Art of AbstractionAlex Miller
 
Tree Editing with Zippers
Tree Editing with ZippersTree Editing with Zippers
Tree Editing with ZippersAlex Miller
 
Groovy concurrency
Groovy concurrencyGroovy concurrency
Groovy concurrencyAlex Miller
 
Java Concurrency Gotchas
Java Concurrency GotchasJava Concurrency Gotchas
Java Concurrency GotchasAlex Miller
 
Innovative Software
Innovative SoftwareInnovative Software
Innovative SoftwareAlex Miller
 
Scaling Your Cache
Scaling Your CacheScaling Your Cache
Scaling Your CacheAlex Miller
 
Caching In The Cloud
Caching In The CloudCaching In The Cloud
Caching In The CloudAlex Miller
 
Scaling Your Cache And Caching At Scale
Scaling Your Cache And Caching At ScaleScaling Your Cache And Caching At Scale
Scaling Your Cache And Caching At ScaleAlex Miller
 
Marshmallow Test
Marshmallow TestMarshmallow Test
Marshmallow TestAlex Miller
 
Strange Loop Conference 2009
Strange Loop Conference 2009Strange Loop Conference 2009
Strange Loop Conference 2009Alex Miller
 
Project Fortress
Project FortressProject Fortress
Project FortressAlex Miller
 
Java Collections API
Java Collections APIJava Collections API
Java Collections APIAlex Miller
 
Java Concurrency Idioms
Java Concurrency IdiomsJava Concurrency Idioms
Java Concurrency IdiomsAlex Miller
 

More from Alex Miller (20)

Clojure/West Overview (12/1/11)
Clojure/West Overview (12/1/11)Clojure/West Overview (12/1/11)
Clojure/West Overview (12/1/11)
 
Concurrent Stream Processing
Concurrent Stream ProcessingConcurrent Stream Processing
Concurrent Stream Processing
 
Stream Execution with Clojure and Fork/join
Stream Execution with Clojure and Fork/joinStream Execution with Clojure and Fork/join
Stream Execution with Clojure and Fork/join
 
Cracking clojure
Cracking clojureCracking clojure
Cracking clojure
 
Releasing Relational Data to the Semantic Web
Releasing Relational Data to the Semantic WebReleasing Relational Data to the Semantic Web
Releasing Relational Data to the Semantic Web
 
Clojure: The Art of Abstraction
Clojure: The Art of AbstractionClojure: The Art of Abstraction
Clojure: The Art of Abstraction
 
Tree Editing with Zippers
Tree Editing with ZippersTree Editing with Zippers
Tree Editing with Zippers
 
Groovy concurrency
Groovy concurrencyGroovy concurrency
Groovy concurrency
 
Java Concurrency Gotchas
Java Concurrency GotchasJava Concurrency Gotchas
Java Concurrency Gotchas
 
Blogging ZOMG
Blogging ZOMGBlogging ZOMG
Blogging ZOMG
 
Innovative Software
Innovative SoftwareInnovative Software
Innovative Software
 
Scaling Your Cache
Scaling Your CacheScaling Your Cache
Scaling Your Cache
 
Caching In The Cloud
Caching In The CloudCaching In The Cloud
Caching In The Cloud
 
Scaling Your Cache And Caching At Scale
Scaling Your Cache And Caching At ScaleScaling Your Cache And Caching At Scale
Scaling Your Cache And Caching At Scale
 
Marshmallow Test
Marshmallow TestMarshmallow Test
Marshmallow Test
 
Strange Loop Conference 2009
Strange Loop Conference 2009Strange Loop Conference 2009
Strange Loop Conference 2009
 
Cold Hard Cache
Cold Hard CacheCold Hard Cache
Cold Hard Cache
 
Project Fortress
Project FortressProject Fortress
Project Fortress
 
Java Collections API
Java Collections APIJava Collections API
Java Collections API
 
Java Concurrency Idioms
Java Concurrency IdiomsJava Concurrency Idioms
Java Concurrency Idioms
 

Recently uploaded

DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
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
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
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
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
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
 
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
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - 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
 

Recently uploaded (20)

DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
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
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
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
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
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
 
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
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - 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)
 

Exploring Terracotta

  • 2. Agenda • Architecture and scale • Examinator reference application • What do people use it for? • How does it work? • Terracotta 3.0
  • 3. Applications in Three Tiers Client Server Database
  • 4. How do we scale? Client Client Client Server Server Server Database
  • 5. But what about failover?
  • 6. Option 1: Servers share state Client Client Client Server Server Server Database
  • 7. How? • RMI • JMS • Custom (JGroups, etc)
  • 8. Option 2: Database (“stateless”) Client Client Client Server Server Server Database
  • 9. Stateless == “State in the database” • Database load • Serialization to and from the database • Network bandwidth • Object / relational mapping due to impedance mismatch
  • 10. Option 3: Terracotta! Client Client Client Server Server Server Terracotta Terracotta Terracotta Terracotta Terracotta Database Server Server Instance Instance
  • 11. Why is this better? • Hub and spoke vs peer to peer • Avoid object / relational translation • Avoid serialization • Reduce database overload • Programming model you already know • Focus on your app, not scalability and high availability
  • 12. Agenda • Architecture and scale • Examinator reference application • What do people use it for? • How does it work? • Terracotta 3.0
  • 13. Examinator • Terracotta reference web application • Online exams • “Session” use case • http://reference.terracotta.org
  • 14. Examinator stack • Spring-based stack • MVC View • Web Flow Spring Web Flow Model Spring MVC • Security Sitemesh Controller • Transactions Spring Security • Open source Service Freemarker • Tomcat / Jetty DAO • Hibernate / JPA JPA Hibernate Domain • Site Mesh • Freemarker
  • 15. What state should go in Terracotta? Appropriateness Memory Terracotta Database Data Lifetime
  • 16. Examinator Terracotta Usage • User registration codes • Password reset codes • Exam cache • Session clustering • Spring security (via session) • Spring web flow (via session) • Exam in progress session - answers, choice ordering, marked to review
  • 17. Demo
  • 18. Agenda • Architecture and scale • Examinator reference application • What do people use it for? • How does it work? • Terracotta 3.0
  • 19. Business Use Cases • Distributed cache • Clustered HTTP sessions • Batch processing • Grid • Messaging and events
  • 20. Terracotta Elements • Replicated sessions • Async processor • Cache evictor • ConcurrentStringMap • Queues • Master-worker • TC Cache
  • 21. Who Uses It? • e-Commerce • Online gaming • Financial services • Travel & leisure • Social networking
  • 22. Agenda • Architecture and scale • Examinator reference application • What do people use it for? • How does it work? • Terracotta 3.0
  • 23. Core Concepts • Roots • Instrumented Classes • Locks • Integration Modules
  • 24. Clustered Heap App App app = new App(); app.run();
  • 25. Clustered Heap App EmployeeManager employeeMgr = new EmployeeManager(); Employee Manager Object lock Object lock = new Object(); Map<String,Employee> = new HashMap<String,Employee>(); HashMap employees
  • 26. Clustered Heap App Employee quot;U99411quot; Manager Object lock Employee.ACT IVE == 1 Employee quot;Gandalfquot; HashMap employees Employee employee = new Employee( “U99411”, “Gandalf”, Employee.ACTIVE);
  • 27. Clustered Heap App employeeMgr.addEmployee(employee); Employee quot;U99411quot; Manager Object lock Employee.ACT IVE == 1 quot;U99411quot; Employee quot;Gandalfquot; HashMap employees synchronized(lock) { employees.put(e.getId(), e); }
  • 28. Clustered Heap App Employee quot;U99411quot; Manager Object lock Employee.ACT IVE == 1 quot;U99411quot; Employee quot;Gandalfquot; HashMap employees quot;U23526quot; Employee quot;U23526quot; Employee.ACT IVE = 1 quot;U99411quot;
  • 29. Let’s look at how to do that...
  • 30. Agenda • Architecture and scale • Examinator reference application • What do people use it for? • How does it work? • Terracotta 3.0
  • 31. Terracotta 3.0 • Server Array Striping - server scalability • Operations Center / Developer Console - new dashboard, DGC stats • Cluster events API - topology, data locality • Application groups - sharing data across heterogeneous applications • Platform support - Oracle WebLogic 10.2, 10.3 and RHEL 5.0
  • 32. Thanks! • Terracotta Open Source JVM clustering: • http://www.terracotta.org • Apress: “The Definitive Guide to Terracotta” • by Ari Zilka, Alex Miller, Geert Bevin, Jonas Boner, Orion Letizi, Taylor Gautier • Alex Miller • @puredanger • http://tech.puredanger.com