SlideShare une entreprise Scribd logo
1  sur  32
Télécharger pour lire hors ligne
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

Contenu connexe

Tendances

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
 

Tendances (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
 

En vedette

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
 

En vedette (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
 

Similaire à 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
 

Similaire à 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
 

Plus de 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
 

Plus de 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
 

Dernier

Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
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...apidays
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 

Dernier (20)

Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
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...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
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...
 

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