SlideShare ist ein Scribd-Unternehmen logo
1 von 15
Terracotta
Agenda ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Scaling applications Scale-out Web app Business Logic Framework Framework JVM Web app Business Logic Framework Framework JVM Web app Business Logic Framework Framework JVM Database For Stateless applications In order for these servers to work in a clustered fashion a developer has to concentrate on how to integrate them and learn the apis and consider the infrastructure things. Also there is learning curve involved.
Problems with Scale-out ,[object Object],[object Object],[object Object]
Enter Terracotta Scale-out Web app Business Logic Framework Framework Web app Business Logic Framework Framework Web app Business Logic Framework Framework JVM JVM JVM Terracotta JVM JVM JVM
Defining Terracotta    ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Logical Model Application Instance Application Instance Application Instance Terracotta Process JVM JVM JVM
Cluster wide visible changes JVM JVM JVM Change ACK ACK Terracotta Update and broadcast
Similarities to NAS ,[object Object],[object Object]
Deployment Model Your JVM Terracotta Libs Your JVM Terracotta Libs Your JVM Terracotta Libs Terracotta Server Disk Terracotta Server Disk
Availability ,[object Object],[object Object]
Terracotta Optimizations ,[object Object],[object Object],[object Object],[object Object],[object Object]
HelloClusteredWorld public class HelloClusteredWorld { private static final String message = "Hello Clustered World!"; private static final int length = message.length(); private static char[] buffer = new char [length ]; private static int loopCounter; public static void main( String args[] ) throws Exception { while( true ) { synchronized( buffer ) { int messageIndex = loopCounter++ % length; if(messageIndex == 0) java.util.Arrays.fill(buffer, '¥u0000'); buffer[messageIndex] = message.charAt(messageIndex); System.out.println( buffer ); Thread.sleep( 100 ); } } } }
<?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?> <tc:tc-config xmlns:tc=&quot;http://www.terracotta.org/config&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation=&quot;http://www.terracotta.org/schema/terracotta-4.xsd&quot;> <!-- servers and clients stanzas ommitted --> <application> <dso> <roots> <root> <field-name> HelloClusteredWorld.buffer </field-name> </root> <root> <field-name> HelloClusteredWorld.loopCounter </field-name> </root> </roots>
<instrumented-classes> <include> <class-expression>HelloClusteredWorld</class-expression> </include> </instrumented-classes> <locks> <autolock> <lock-level>write</lock-level> <method-expression>void HelloClusteredWorld.main(..)</method-expression> </autolock> </locks> </dso> </application> </tc:tc-config>

Weitere ähnliche Inhalte

Was ist angesagt?

Using RabbitMQ and Netty library to implement RPC protocol
Using RabbitMQ and Netty library to implement RPC protocolUsing RabbitMQ and Netty library to implement RPC protocol
Using RabbitMQ and Netty library to implement RPC protocolTho Q Luong Luong
 
Hands on with CoAP and Californium
Hands on with CoAP and CaliforniumHands on with CoAP and Californium
Hands on with CoAP and CaliforniumJulien Vermillard
 
Asynchronous Python with Twisted
Asynchronous Python with TwistedAsynchronous Python with Twisted
Asynchronous Python with TwistedAdam Englander
 
RESTLess Design with Apache Thrift: Experiences from Apache Airavata
RESTLess Design with Apache Thrift: Experiences from Apache AiravataRESTLess Design with Apache Thrift: Experiences from Apache Airavata
RESTLess Design with Apache Thrift: Experiences from Apache Airavatasmarru
 
Netty @Apple: Large Scale Deployment/Connectivity
Netty @Apple: Large Scale Deployment/ConnectivityNetty @Apple: Large Scale Deployment/Connectivity
Netty @Apple: Large Scale Deployment/ConnectivityC4Media
 
API Facade Pattern with Apache Synapse
API Facade Pattern with Apache SynapseAPI Facade Pattern with Apache Synapse
API Facade Pattern with Apache SynapseHiranya Jayathilaka
 
Testing Kafka components with Kafka for JUnit
Testing Kafka components with Kafka for JUnitTesting Kafka components with Kafka for JUnit
Testing Kafka components with Kafka for JUnitMarkus Günther
 
Understanding kafka
Understanding kafkaUnderstanding kafka
Understanding kafkaAmitDhodi
 
Apache Kafka
Apache KafkaApache Kafka
Apache Kafkaemreakis
 
TorqueBox at GNUnify 2012
TorqueBox at GNUnify 2012TorqueBox at GNUnify 2012
TorqueBox at GNUnify 2012Saleem Ansari
 

Was ist angesagt? (20)

Using RabbitMQ and Netty library to implement RPC protocol
Using RabbitMQ and Netty library to implement RPC protocolUsing RabbitMQ and Netty library to implement RPC protocol
Using RabbitMQ and Netty library to implement RPC protocol
 
kafka
kafkakafka
kafka
 
Hands on with CoAP and Californium
Hands on with CoAP and CaliforniumHands on with CoAP and Californium
Hands on with CoAP and Californium
 
Asynchronous Python with Twisted
Asynchronous Python with TwistedAsynchronous Python with Twisted
Asynchronous Python with Twisted
 
Kafka tutorial
Kafka tutorialKafka tutorial
Kafka tutorial
 
RESTLess Design with Apache Thrift: Experiences from Apache Airavata
RESTLess Design with Apache Thrift: Experiences from Apache AiravataRESTLess Design with Apache Thrift: Experiences from Apache Airavata
RESTLess Design with Apache Thrift: Experiences from Apache Airavata
 
Apache Kafka Demo
Apache Kafka DemoApache Kafka Demo
Apache Kafka Demo
 
Netty @Apple: Large Scale Deployment/Connectivity
Netty @Apple: Large Scale Deployment/ConnectivityNetty @Apple: Large Scale Deployment/Connectivity
Netty @Apple: Large Scale Deployment/Connectivity
 
Kafka ops-new
Kafka ops-newKafka ops-new
Kafka ops-new
 
Apache ActiveMQ
Apache ActiveMQ Apache ActiveMQ
Apache ActiveMQ
 
Storm - SpaaS
Storm - SpaaSStorm - SpaaS
Storm - SpaaS
 
Java performance tuning
Java performance tuningJava performance tuning
Java performance tuning
 
Introduction to Apache Synapse
Introduction to Apache SynapseIntroduction to Apache Synapse
Introduction to Apache Synapse
 
Apache kafka
Apache kafkaApache kafka
Apache kafka
 
API Facade Pattern with Apache Synapse
API Facade Pattern with Apache SynapseAPI Facade Pattern with Apache Synapse
API Facade Pattern with Apache Synapse
 
Testing Kafka components with Kafka for JUnit
Testing Kafka components with Kafka for JUnitTesting Kafka components with Kafka for JUnit
Testing Kafka components with Kafka for JUnit
 
Apache kafka
Apache kafkaApache kafka
Apache kafka
 
Understanding kafka
Understanding kafkaUnderstanding kafka
Understanding kafka
 
Apache Kafka
Apache KafkaApache Kafka
Apache Kafka
 
TorqueBox at GNUnify 2012
TorqueBox at GNUnify 2012TorqueBox at GNUnify 2012
TorqueBox at GNUnify 2012
 

Ähnlich wie Terracotta DSO

Shopzilla On Concurrency
Shopzilla On ConcurrencyShopzilla On Concurrency
Shopzilla On ConcurrencyWill Gage
 
Breaking The Clustering Limits @ AlphaCSP JavaEdge 2007
Breaking The Clustering Limits @ AlphaCSP JavaEdge 2007Breaking The Clustering Limits @ AlphaCSP JavaEdge 2007
Breaking The Clustering Limits @ AlphaCSP JavaEdge 2007Baruch Sadogursky
 
Clustering In The Wild
Clustering In The WildClustering In The Wild
Clustering In The WildSergio Bossa
 
Ijaprr vol1-2-13-60-64tejinder
Ijaprr vol1-2-13-60-64tejinderIjaprr vol1-2-13-60-64tejinder
Ijaprr vol1-2-13-60-64tejinderijaprr_editor
 
Building High Scalability Apps With Terracotta
Building High Scalability Apps With TerracottaBuilding High Scalability Apps With Terracotta
Building High Scalability Apps With TerracottaDavid Reines
 
Introduction to Real Time Java
Introduction to Real Time JavaIntroduction to Real Time Java
Introduction to Real Time JavaDeniz Oguz
 
Shopzilla On Concurrency
Shopzilla On ConcurrencyShopzilla On Concurrency
Shopzilla On ConcurrencyRodney Barlow
 
Open Source XMPP for Cloud Services
Open Source XMPP for Cloud ServicesOpen Source XMPP for Cloud Services
Open Source XMPP for Cloud Servicesmattjive
 
Tc Server Glance Over
Tc Server Glance OverTc Server Glance Over
Tc Server Glance OverIwein Fuld
 
Taming Deployment With Smart Frog
Taming Deployment With Smart FrogTaming Deployment With Smart Frog
Taming Deployment With Smart FrogSteve Loughran
 
B2 2006 tomcat_clusters
B2 2006 tomcat_clustersB2 2006 tomcat_clusters
B2 2006 tomcat_clustersSteve Feldman
 
Java Servlets
Java ServletsJava Servlets
Java ServletsNitin Pai
 
Dalvik Vm &amp; Jit
Dalvik Vm &amp; JitDalvik Vm &amp; Jit
Dalvik Vm &amp; JitAnkit Somani
 
Dalvik Vm &amp; Jit
Dalvik Vm &amp; JitDalvik Vm &amp; Jit
Dalvik Vm &amp; JitAnkit Somani
 

Ähnlich wie Terracotta DSO (20)

Shopzilla On Concurrency
Shopzilla On ConcurrencyShopzilla On Concurrency
Shopzilla On Concurrency
 
Breaking The Clustering Limits @ AlphaCSP JavaEdge 2007
Breaking The Clustering Limits @ AlphaCSP JavaEdge 2007Breaking The Clustering Limits @ AlphaCSP JavaEdge 2007
Breaking The Clustering Limits @ AlphaCSP JavaEdge 2007
 
Clustering In The Wild
Clustering In The WildClustering In The Wild
Clustering In The Wild
 
Aop clustering
Aop clusteringAop clustering
Aop clustering
 
Dev381.Pp
Dev381.PpDev381.Pp
Dev381.Pp
 
bjhbj
bjhbjbjhbj
bjhbj
 
Ijaprr vol1-2-13-60-64tejinder
Ijaprr vol1-2-13-60-64tejinderIjaprr vol1-2-13-60-64tejinder
Ijaprr vol1-2-13-60-64tejinder
 
Building High Scalability Apps With Terracotta
Building High Scalability Apps With TerracottaBuilding High Scalability Apps With Terracotta
Building High Scalability Apps With Terracotta
 
Introduction to Real Time Java
Introduction to Real Time JavaIntroduction to Real Time Java
Introduction to Real Time Java
 
Shopzilla On Concurrency
Shopzilla On ConcurrencyShopzilla On Concurrency
Shopzilla On Concurrency
 
Open Source XMPP for Cloud Services
Open Source XMPP for Cloud ServicesOpen Source XMPP for Cloud Services
Open Source XMPP for Cloud Services
 
What is Java? Presentation On Introduction To Core Java By PSK Technologies
What is Java? Presentation On Introduction To Core Java By PSK TechnologiesWhat is Java? Presentation On Introduction To Core Java By PSK Technologies
What is Java? Presentation On Introduction To Core Java By PSK Technologies
 
Internship report
Internship reportInternship report
Internship report
 
Tc Server Glance Over
Tc Server Glance OverTc Server Glance Over
Tc Server Glance Over
 
Taming Deployment With Smart Frog
Taming Deployment With Smart FrogTaming Deployment With Smart Frog
Taming Deployment With Smart Frog
 
Oracle Coherence
Oracle CoherenceOracle Coherence
Oracle Coherence
 
B2 2006 tomcat_clusters
B2 2006 tomcat_clustersB2 2006 tomcat_clusters
B2 2006 tomcat_clusters
 
Java Servlets
Java ServletsJava Servlets
Java Servlets
 
Dalvik Vm &amp; Jit
Dalvik Vm &amp; JitDalvik Vm &amp; Jit
Dalvik Vm &amp; Jit
 
Dalvik Vm &amp; Jit
Dalvik Vm &amp; JitDalvik Vm &amp; Jit
Dalvik Vm &amp; Jit
 

Kürzlich hochgeladen

Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
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
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 

Kürzlich hochgeladen (20)

Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
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
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 

Terracotta DSO

  • 2.
  • 3. Scaling applications Scale-out Web app Business Logic Framework Framework JVM Web app Business Logic Framework Framework JVM Web app Business Logic Framework Framework JVM Database For Stateless applications In order for these servers to work in a clustered fashion a developer has to concentrate on how to integrate them and learn the apis and consider the infrastructure things. Also there is learning curve involved.
  • 4.
  • 5. Enter Terracotta Scale-out Web app Business Logic Framework Framework Web app Business Logic Framework Framework Web app Business Logic Framework Framework JVM JVM JVM Terracotta JVM JVM JVM
  • 6.
  • 7. Logical Model Application Instance Application Instance Application Instance Terracotta Process JVM JVM JVM
  • 8. Cluster wide visible changes JVM JVM JVM Change ACK ACK Terracotta Update and broadcast
  • 9.
  • 10. Deployment Model Your JVM Terracotta Libs Your JVM Terracotta Libs Your JVM Terracotta Libs Terracotta Server Disk Terracotta Server Disk
  • 11.
  • 12.
  • 13. HelloClusteredWorld public class HelloClusteredWorld { private static final String message = &quot;Hello Clustered World!&quot;; private static final int length = message.length(); private static char[] buffer = new char [length ]; private static int loopCounter; public static void main( String args[] ) throws Exception { while( true ) { synchronized( buffer ) { int messageIndex = loopCounter++ % length; if(messageIndex == 0) java.util.Arrays.fill(buffer, '¥u0000'); buffer[messageIndex] = message.charAt(messageIndex); System.out.println( buffer ); Thread.sleep( 100 ); } } } }
  • 14. <?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?> <tc:tc-config xmlns:tc=&quot;http://www.terracotta.org/config&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation=&quot;http://www.terracotta.org/schema/terracotta-4.xsd&quot;> <!-- servers and clients stanzas ommitted --> <application> <dso> <roots> <root> <field-name> HelloClusteredWorld.buffer </field-name> </root> <root> <field-name> HelloClusteredWorld.loopCounter </field-name> </root> </roots>
  • 15. <instrumented-classes> <include> <class-expression>HelloClusteredWorld</class-expression> </include> </instrumented-classes> <locks> <autolock> <lock-level>write</lock-level> <method-expression>void HelloClusteredWorld.main(..)</method-expression> </autolock> </locks> </dso> </application> </tc:tc-config>

Hinweis der Redaktion

  1. Virtualization takes physical machine and slices them into logical chunks so it does exact inverse of virtualization. JVM-level clustering provides an ambience which is simple,scalable and highly available. NAM enables Terracotta to cluster Java Virtual Machines (JVMs) directly underneath applications, and is a proven runtime approach to providing Java applications both high availability and scalability. Transparency does not mean that TC works for everything and its invisible and does not require code change but  it means that freedom and purity of design. Clustering service move clustering from architecture concept to a service on which applications can 
  2. Example directory and file remotely. Clients is completely transparent of whether its doing changes on local file or remote file.
  3. 1) Caching inside the application&apos;s memory is po ssible through terracotta&apos;s transparency. This significantly lessens the workload from terracotta server. 2) Terrcotta stores the object&apos;s fields near each others and since tarracotta reads entire disk block in one disk I/O operation.   3) Since tarracotta writes in batches so if multiple objects change their changes are written together to the  disk.