SlideShare uma empresa Scribd logo
1 de 22
Hazelcast in DX 7.2 1
Hazelcast
How to share Java objects in a cluster
Hazelcast in DX 7.2 2
DX 7.2
Sharing objects across servers
1
Hazelcast in DX 7.2 3
1 Why do we want to share objects?
‱ Replicated object = Highly Available object
o No Single Point of Failure
o Servers can be restarted and shutdown without data loss
‱ Better load balancing
o Load Balancer redirects traffic to the less busy server,
and not to the one containing the data
‱ Because we need it!
o Prevents race conditions between servers
o Some features simply need to share data cluster-wide
Hazelcast in DX 7.2 4
1 Why do we want to share objects?
Sticky Session Stateless
VS
Hazelcast in DX 7.2 5
What are the solutions?
1 ‱ Externalize objects to a dedicated backend
‱ Synchronize objects across the cluster
Digital Experience Manager offers out of the box support for both!
Hazelcast in DX 7.2 6
What are the solutions?
1
VS
Offloaded objects Synchronized objects
Hazelcast in DX 7.2 7
1
Pros & Cons
‱ Externalized objects to a dedicated backend:
- No development required for some objects (user sessions...)
- Specific development required when storing custom objects
- More complex architecture (additional servers)
- Highly scalable
‱ Synchronized objects across the cluster:
- Needs to be taken into account in the code
- No architecture change required
- Very granular: specific objects can be synchronized while others aren’t
- Very efficient with few servers, won’t scale to hundreds of nodes
Hazelcast in DX 7.2 8
1
Hazelcast
“The Leading Open Source In-Memory Data Grid”
There is much more to Hazelcast than what we are going to talk about today:
Hazelcast is Open Source under Apache license (we love open source!)
Hazelcast in DX 7.2 9
1
Hazelcast in Digital Experience Manager
7.2
‱ Hazelcast 3.7.3 is available out of the box in Digital Experience
Manager 7.2
‱ Available as a service: no custom integration required (Use it in less
than 5 minutes)
‱ Hazelcast is masterless: killing a server won’t alter the service
Hazelcast in DX 7.2 10
1
Hazelcast server discovery
How do servers know about each other?
‱ Multicast
‱ TCP
‱ EC2 Cloud
DX 7.2 uses the TCP option. Everything is done for you and you can
start using the service without worrying about the server discovery.
Hazelcast in DX 7.2 11
1
DX 7.2 server architecture with Hazelcast
Hazelcast in DX 7.2 12
1
Hazelcast usages in 7.2
Hazelcast is already widely used inside Digital Experience Manager 7.2:
‱ Clustered module deployment: shared module states across
the cluster
‱ Oauth authentification modules: authentication token shared
across the cluster to authenticate users on all servers at once
‱ More custom modules we haven’t heard of!
Hazelcast in DX 7.2 13
Technical Implementation
2
Hazelcast in DX 7.2 14
2
Hazelcast architecture
‱ Hazelcast uses TCP communication to replicate the objects
‱ Hazelcast is event-based
‱ Hazelcast handles concurrent access to objects out of the box
‱ Hazelcast is instantiated by DX and exposed as an OSGi Service
Any DX 7.2 module can import Hazelcast’s OSGi service and start using it right away.
Hazelcast in DX 7.2 15
How to use Hazelcast in DX7.2
Hazelcast in DX 7.2 16
2
OSGi Services
<osgi:reference id="com.hazelcast.core.HazelcastInstance" interface="com.hazelcast.core.HazelcastInstance"/>
<bean id="HazelcastExampleAction” class="org.jahia.modules.hazelcastexample.beans.HazelcastExampleBean">
<property name="hazelcastInstance" ref="com.hazelcast.core.HazelcastInstance"/>
</bean>
Spring file declaration:
Imports the Hazelcast OSGi Service and injects it in a Spring Bean.
Hazelcast in DX 7.2 17
2
Simple shared object declaration
Java class declaration:
public class HazelcastExampleBean {
}
First access to the getMap(String) method will instantiate the shared object
private HazelcastInstance hazelcastInstance;
public void setHazelcastInstance(HazelcastInstance hi) {
this.hazelcastInstance = hi;
}
public HazelcastExampleBean () {
Map<Integer, String> sharedData = hazelcastInstance.getMap("sharedObject");
sharedData.put(sharedData.size()+1, “myContent”);
}
Hazelcast in DX 7.2 18
2
That’s all. All the heavy lifting is handled internally by DX 7.2
Of course, there is much more to Hazelcast than sharing objects. If you want to know more,
more documentation is available at
http://docs.hazelcast.org/docs/3.7/manual/html-single/index.html
Hazelcast in DX 7.2 19
2
Distributed Events
‱ Membership Listener for cluster membership events.
‱ Distributed Object Listener for distributed object creation and destroy events.
‱ Migration Listener for partition migration start and complete events.
‱ Partition Lost Listener for partition lost events.
‱ Lifecycle Listener for HazelcastInstance lifecycle events.
‱ Entry Listener for IMap and MultiMap entry events.
‱ Item Listener for IQueue, ISet and IList item events.
‱ Message Listener for ITopic message events.
‱ Client Listener for client connection events.
Event distribution is a big part of Hazelcast. Even though you might not use
them at the beginning, listening to events might come in handy someday.
Hazelcast in DX 7.2 20
2
Configuration fine tuning
The configuration is stored in
/digital-factory-
data/karaf/etc/hazelcast.xml
Hazelcast in DX 7.2 21
2
Performances
‱ Hazelcast is designed to play well under high read and write load
‱ Network performance is a key aspect of Hazelcast’s perfs
If you are designing a highly demanding application with lots of
accesses, load performance testing is a key aspect of the project.
Hazelcast in DX 7.2 22
THE END!
THANKS FOR
LISTENING

Mais conteĂșdo relacionado

Mais procurados

DevStack: A developers cloud in a box.
DevStack: A developers cloud in a box.DevStack: A developers cloud in a box.
DevStack: A developers cloud in a box.
openstackindia
 
An Introduction to Container Organization with Docker Swarm, Kubernetes, Meso...
An Introduction to Container Organization with Docker Swarm, Kubernetes, Meso...An Introduction to Container Organization with Docker Swarm, Kubernetes, Meso...
An Introduction to Container Organization with Docker Swarm, Kubernetes, Meso...
Neo4j
 
Cassandra on Mesos Across Multiple Datacenters at Uber (Abhishek Verma) | C* ...
Cassandra on Mesos Across Multiple Datacenters at Uber (Abhishek Verma) | C* ...Cassandra on Mesos Across Multiple Datacenters at Uber (Abhishek Verma) | C* ...
Cassandra on Mesos Across Multiple Datacenters at Uber (Abhishek Verma) | C* ...
DataStax
 

Mais procurados (20)

Working with kubernetes
Working with kubernetesWorking with kubernetes
Working with kubernetes
 
DevStack: A developers cloud in a box.
DevStack: A developers cloud in a box.DevStack: A developers cloud in a box.
DevStack: A developers cloud in a box.
 
Clocker and OpenStack
Clocker and OpenStackClocker and OpenStack
Clocker and OpenStack
 
What is Kubernets
What is  KubernetsWhat is  Kubernets
What is Kubernets
 
An Introduction to Container Organization with Docker Swarm, Kubernetes, Meso...
An Introduction to Container Organization with Docker Swarm, Kubernetes, Meso...An Introduction to Container Organization with Docker Swarm, Kubernetes, Meso...
An Introduction to Container Organization with Docker Swarm, Kubernetes, Meso...
 
Distributed Locking in Kubernetes
Distributed Locking in KubernetesDistributed Locking in Kubernetes
Distributed Locking in Kubernetes
 
Docker in OpenStack
Docker in OpenStackDocker in OpenStack
Docker in OpenStack
 
Cassandra on Mesos Across Multiple Datacenters at Uber (Abhishek Verma) | C* ...
Cassandra on Mesos Across Multiple Datacenters at Uber (Abhishek Verma) | C* ...Cassandra on Mesos Across Multiple Datacenters at Uber (Abhishek Verma) | C* ...
Cassandra on Mesos Across Multiple Datacenters at Uber (Abhishek Verma) | C* ...
 
Openstack swift - VietOpenStack 6thmeeetup
Openstack swift - VietOpenStack 6thmeeetupOpenstack swift - VietOpenStack 6thmeeetup
Openstack swift - VietOpenStack 6thmeeetup
 
Kubernetes Basics & Monitoring
Kubernetes Basics & MonitoringKubernetes Basics & Monitoring
Kubernetes Basics & Monitoring
 
Monitoring microservices: Docker, Mesos and Kubernetes visibility at scale
Monitoring microservices: Docker, Mesos and Kubernetes visibility at scaleMonitoring microservices: Docker, Mesos and Kubernetes visibility at scale
Monitoring microservices: Docker, Mesos and Kubernetes visibility at scale
 
Realm database
Realm databaseRealm database
Realm database
 
Kubernetes - Using Persistent Disks with WordPress and MySQL
Kubernetes - Using Persistent Disks with WordPress and MySQLKubernetes - Using Persistent Disks with WordPress and MySQL
Kubernetes - Using Persistent Disks with WordPress and MySQL
 
OpenStack Winfest2011
OpenStack Winfest2011OpenStack Winfest2011
OpenStack Winfest2011
 
Modern Web development and operations practices
Modern Web development and operations practicesModern Web development and operations practices
Modern Web development and operations practices
 
A Primer on Kubernetes and Google Container Engine
A Primer on Kubernetes and Google Container EngineA Primer on Kubernetes and Google Container Engine
A Primer on Kubernetes and Google Container Engine
 
Openstack 101
Openstack 101Openstack 101
Openstack 101
 
Building Clustered Applications with Kubernetes and Docker
Building Clustered Applications with Kubernetes and DockerBuilding Clustered Applications with Kubernetes and Docker
Building Clustered Applications with Kubernetes and Docker
 
DockerDay2015: Getting started with Google Container Engine
DockerDay2015: Getting started with Google Container EngineDockerDay2015: Getting started with Google Container Engine
DockerDay2015: Getting started with Google Container Engine
 
What is OpenStack and the added value of IBM solutions
What is OpenStack and the added value of IBM solutionsWhat is OpenStack and the added value of IBM solutions
What is OpenStack and the added value of IBM solutions
 

Destaque

Pramata Tech Dinosaurs ePaper - Social Sharing
Pramata Tech Dinosaurs ePaper - Social SharingPramata Tech Dinosaurs ePaper - Social Sharing
Pramata Tech Dinosaurs ePaper - Social Sharing
Tidemark Systems Inc.
 
Visual Studio 2013 - Recursos da IDE
Visual Studio 2013 - Recursos da IDEVisual Studio 2013 - Recursos da IDE
Visual Studio 2013 - Recursos da IDE
Stefanini
 
Running SagePFW in a Private Cloud
Running SagePFW in a Private CloudRunning SagePFW in a Private Cloud
Running SagePFW in a Private Cloud
Vertical Solutions
 

Destaque (18)

JahiaOne 2015 - How to automatically unit and integration test your Digital F...
JahiaOne 2015 - How to automatically unit and integration test your Digital F...JahiaOne 2015 - How to automatically unit and integration test your Digital F...
JahiaOne 2015 - How to automatically unit and integration test your Digital F...
 
JahiaOne - Software Quality at Jahia
JahiaOne - Software Quality at JahiaJahiaOne - Software Quality at Jahia
JahiaOne - Software Quality at Jahia
 
Keep Calm & Open the Tools - Developers Meetup - February 2017
Keep Calm & Open the Tools - Developers Meetup - February 2017Keep Calm & Open the Tools - Developers Meetup - February 2017
Keep Calm & Open the Tools - Developers Meetup - February 2017
 
JahiaOne - Jahia7: Query and Search API under the Hood
JahiaOne - Jahia7: Query and Search API under the HoodJahiaOne - Jahia7: Query and Search API under the Hood
JahiaOne - Jahia7: Query and Search API under the Hood
 
Microservice monitoring
Microservice monitoringMicroservice monitoring
Microservice monitoring
 
Fault tolerance - look, it's simple!
Fault tolerance - look, it's simple!Fault tolerance - look, it's simple!
Fault tolerance - look, it's simple!
 
Introduction to hazelcast
Introduction to hazelcastIntroduction to hazelcast
Introduction to hazelcast
 
Memory Leaks on Android
Memory Leaks on AndroidMemory Leaks on Android
Memory Leaks on Android
 
Top 10 Business Continuity Disasters
Top 10 Business Continuity DisastersTop 10 Business Continuity Disasters
Top 10 Business Continuity Disasters
 
Dr Ravi Gupta
Dr Ravi GuptaDr Ravi Gupta
Dr Ravi Gupta
 
Pramata Tech Dinosaurs ePaper - Social Sharing
Pramata Tech Dinosaurs ePaper - Social SharingPramata Tech Dinosaurs ePaper - Social Sharing
Pramata Tech Dinosaurs ePaper - Social Sharing
 
Visual Studio 2013 - Recursos da IDE
Visual Studio 2013 - Recursos da IDEVisual Studio 2013 - Recursos da IDE
Visual Studio 2013 - Recursos da IDE
 
Getting started with performance testing
Getting started with performance testingGetting started with performance testing
Getting started with performance testing
 
Why Consider #FlashStorage in your #DataCenter
Why Consider #FlashStorage in your #DataCenterWhy Consider #FlashStorage in your #DataCenter
Why Consider #FlashStorage in your #DataCenter
 
Running SagePFW in a Private Cloud
Running SagePFW in a Private CloudRunning SagePFW in a Private Cloud
Running SagePFW in a Private Cloud
 
TXT Next Presentation
TXT Next Presentation TXT Next Presentation
TXT Next Presentation
 
Presence Agent y Presence Scripting para personas con limitaciones visuales
Presence Agent y Presence Scripting para personas con limitaciones visualesPresence Agent y Presence Scripting para personas con limitaciones visuales
Presence Agent y Presence Scripting para personas con limitaciones visuales
 
Wedia Social Media presentation at DigitalDays
Wedia Social Media presentation at DigitalDaysWedia Social Media presentation at DigitalDays
Wedia Social Media presentation at DigitalDays
 

Semelhante a Sharing of Distributed Objects in a DX Cluster, thanks to Hazelcast - Online Developers Meetup - March 2017

Clustering In The Wild
Clustering In The WildClustering In The Wild
Clustering In The Wild
Sergio Bossa
 
ç‚ș什éșŒMethod敞超過65535會build fail?
ç‚ș什éșŒMethod敞超過65535會build fail?ç‚ș什éșŒMethod敞超過65535會build fail?
ç‚ș什éșŒMethod敞超過65535會build fail?
Chih-Chung Lee
 
Gwt and rpc use 2007 1
Gwt and rpc use 2007 1Gwt and rpc use 2007 1
Gwt and rpc use 2007 1
Sam Muhanguzi
 
Painless ruby deployment on shelly cloud
Painless ruby deployment on shelly cloudPainless ruby deployment on shelly cloud
Painless ruby deployment on shelly cloud
Giedrius Rimkus
 

Semelhante a Sharing of Distributed Objects in a DX Cluster, thanks to Hazelcast - Online Developers Meetup - March 2017 (20)

Hazelcast
HazelcastHazelcast
Hazelcast
 
Clustering In The Wild
Clustering In The WildClustering In The Wild
Clustering In The Wild
 
Hazelcast
HazelcastHazelcast
Hazelcast
 
Support distributed computing and caching avec hazelcast
Support distributed computing and caching avec hazelcastSupport distributed computing and caching avec hazelcast
Support distributed computing and caching avec hazelcast
 
Pawan industrial training presentation on Hadoop, Clustering and Network virt...
Pawan industrial training presentation on Hadoop, Clustering and Network virt...Pawan industrial training presentation on Hadoop, Clustering and Network virt...
Pawan industrial training presentation on Hadoop, Clustering and Network virt...
 
2013-cloudconnect-OpenStack@BT
2013-cloudconnect-OpenStack@BT2013-cloudconnect-OpenStack@BT
2013-cloudconnect-OpenStack@BT
 
Hazelcast sunum
Hazelcast sunumHazelcast sunum
Hazelcast sunum
 
Hazelcast Jet v0.4 - August 9, 2017
Hazelcast Jet v0.4 - August 9, 2017Hazelcast Jet v0.4 - August 9, 2017
Hazelcast Jet v0.4 - August 9, 2017
 
JCConf 2016 - Cloud Computing Applications - Hazelcast, Spark and Ignite
JCConf 2016 - Cloud Computing Applications - Hazelcast, Spark and IgniteJCConf 2016 - Cloud Computing Applications - Hazelcast, Spark and Ignite
JCConf 2016 - Cloud Computing Applications - Hazelcast, Spark and Ignite
 
ç‚ș什éșŒMethod敞超過65535會build fail?
ç‚ș什éșŒMethod敞超過65535會build fail?ç‚ș什éșŒMethod敞超過65535會build fail?
ç‚ș什éșŒMethod敞超過65535會build fail?
 
Run Cloud Native MySQL NDB Cluster in Kubernetes
Run Cloud Native MySQL NDB Cluster in KubernetesRun Cloud Native MySQL NDB Cluster in Kubernetes
Run Cloud Native MySQL NDB Cluster in Kubernetes
 
I wanna talk about nsenter
I wanna talk about nsenterI wanna talk about nsenter
I wanna talk about nsenter
 
Designing and Building Multi-Region Swift Deployment
Designing and Building Multi-Region Swift DeploymentDesigning and Building Multi-Region Swift Deployment
Designing and Building Multi-Region Swift Deployment
 
Gwt and rpc use 2007 1
Gwt and rpc use 2007 1Gwt and rpc use 2007 1
Gwt and rpc use 2007 1
 
Where Django Caching Bust at the Seams
Where Django Caching Bust at the SeamsWhere Django Caching Bust at the Seams
Where Django Caching Bust at the Seams
 
Hazelcast 101
Hazelcast 101Hazelcast 101
Hazelcast 101
 
Painless ruby deployment on shelly cloud
Painless ruby deployment on shelly cloudPainless ruby deployment on shelly cloud
Painless ruby deployment on shelly cloud
 
DataStax | DSE Search 5.0 and Beyond (Nick Panahi & Ariel Weisberg) | Cassand...
DataStax | DSE Search 5.0 and Beyond (Nick Panahi & Ariel Weisberg) | Cassand...DataStax | DSE Search 5.0 and Beyond (Nick Panahi & Ariel Weisberg) | Cassand...
DataStax | DSE Search 5.0 and Beyond (Nick Panahi & Ariel Weisberg) | Cassand...
 
Hibernate
HibernateHibernate
Hibernate
 
Architectural patterns for high performance microservices in kubernetes
Architectural patterns for high performance microservices in kubernetesArchitectural patterns for high performance microservices in kubernetes
Architectural patterns for high performance microservices in kubernetes
 

Mais de Jahia Solutions Group

Mais de Jahia Solutions Group (20)

The Road ahead: What we see as the future of digital. By Elie Auvray
The Road ahead: What we see as the future of digital. By Elie AuvrayThe Road ahead: What we see as the future of digital. By Elie Auvray
The Road ahead: What we see as the future of digital. By Elie Auvray
 
Monitoring and Data-Driven Decision Making with Daniel Maher
Monitoring and Data-Driven Decision Making with Daniel MaherMonitoring and Data-Driven Decision Making with Daniel Maher
Monitoring and Data-Driven Decision Making with Daniel Maher
 
The ultimate search of the perfect customer experience By Brian Solis
The ultimate search of the perfect customer experience By Brian SolisThe ultimate search of the perfect customer experience By Brian Solis
The ultimate search of the perfect customer experience By Brian Solis
 
Docker, Kubernetes, Openshift: Jahia on steroids in production with Julian Ma...
Docker, Kubernetes, Openshift: Jahia on steroids in production with Julian Ma...Docker, Kubernetes, Openshift: Jahia on steroids in production with Julian Ma...
Docker, Kubernetes, Openshift: Jahia on steroids in production with Julian Ma...
 
Data for Dummies by Dan Katz, CDO at Safran
Data for Dummies by Dan Katz, CDO at SafranData for Dummies by Dan Katz, CDO at Safran
Data for Dummies by Dan Katz, CDO at Safran
 
Content and commerce: The perfect combo. By Catherine Barba
Content and commerce: The perfect combo. By Catherine BarbaContent and commerce: The perfect combo. By Catherine Barba
Content and commerce: The perfect combo. By Catherine Barba
 
The power of great customer experience in today’s world. Olivier Mourrieras &...
The power of great customer experience in today’s world. Olivier Mourrieras &...The power of great customer experience in today’s world. Olivier Mourrieras &...
The power of great customer experience in today’s world. Olivier Mourrieras &...
 
Making Digital simpler. Occam’s Razor, Horses, Zebras, and Evolution
Making Digital simpler. Occam’s Razor, Horses, Zebras, and EvolutionMaking Digital simpler. Occam’s Razor, Horses, Zebras, and Evolution
Making Digital simpler. Occam’s Razor, Horses, Zebras, and Evolution
 
Elasticsearch powered EDP by Cedric Mailleux
Elasticsearch powered EDP by Cedric MailleuxElasticsearch powered EDP by Cedric Mailleux
Elasticsearch powered EDP by Cedric Mailleux
 
Jahia Cloud Offerings by Julian Maurel & Abass Safoutou
Jahia Cloud Offerings by Julian Maurel & Abass SafoutouJahia Cloud Offerings by Julian Maurel & Abass Safoutou
Jahia Cloud Offerings by Julian Maurel & Abass Safoutou
 
Learn how to go headless with Jahia DX by Serge Huber
Learn how to go headless with Jahia DX by Serge HuberLearn how to go headless with Jahia DX by Serge Huber
Learn how to go headless with Jahia DX by Serge Huber
 
Making the life of patients easier in the healthcare sector thanks to digital...
Making the life of patients easier in the healthcare sector thanks to digital...Making the life of patients easier in the healthcare sector thanks to digital...
Making the life of patients easier in the healthcare sector thanks to digital...
 
Impletementing Analytics - Stop talking, Start doing! by Ben Salmon, We are C...
Impletementing Analytics - Stop talking, Start doing! by Ben Salmon, We are C...Impletementing Analytics - Stop talking, Start doing! by Ben Salmon, We are C...
Impletementing Analytics - Stop talking, Start doing! by Ben Salmon, We are C...
 
Strategy for content with local and global sites by Romain Gauthier
Strategy for content with local and global sites by Romain GauthierStrategy for content with local and global sites by Romain Gauthier
Strategy for content with local and global sites by Romain Gauthier
 
Apache Unomi presentation and update. By Serge Huber, CTO Jahia
Apache Unomi presentation and update. By Serge Huber, CTO JahiaApache Unomi presentation and update. By Serge Huber, CTO Jahia
Apache Unomi presentation and update. By Serge Huber, CTO Jahia
 
Personalisation and Headless in a business context by Lars Petersen
Personalisation and Headless in a business context by Lars PetersenPersonalisation and Headless in a business context by Lars Petersen
Personalisation and Headless in a business context by Lars Petersen
 
Digital Revolution from Silo to Platform by Gilles Babinet
Digital Revolution from Silo to Platform by Gilles BabinetDigital Revolution from Silo to Platform by Gilles Babinet
Digital Revolution from Silo to Platform by Gilles Babinet
 
A customer journey with AI by Xavier Vaccari, Softeam Group
A customer journey with AI by Xavier Vaccari, Softeam GroupA customer journey with AI by Xavier Vaccari, Softeam Group
A customer journey with AI by Xavier Vaccari, Softeam Group
 
Using CX to unlock Total Experience by David Balko, Tribal
Using CX to unlock Total Experience by David Balko, TribalUsing CX to unlock Total Experience by David Balko, Tribal
Using CX to unlock Total Experience by David Balko, Tribal
 
AI-monitor & Marketing Factory, customer case study by Valerie Voci
AI-monitor & Marketing Factory, customer case study by Valerie VociAI-monitor & Marketing Factory, customer case study by Valerie Voci
AI-monitor & Marketing Factory, customer case study by Valerie Voci
 

Último

Abortion Pills In Pretoria ](+27832195400*)[ đŸ„ Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ đŸ„ Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ đŸ„ Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ đŸ„ Women's Abortion Clinic In Pre...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
chiefasafspells
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
masabamasaba
 

Último (20)

WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
Abortion Pills In Pretoria ](+27832195400*)[ đŸ„ Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ đŸ„ Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ đŸ„ Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ đŸ„ Women's Abortion Clinic In Pre...
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 

Sharing of Distributed Objects in a DX Cluster, thanks to Hazelcast - Online Developers Meetup - March 2017

  • 1. Hazelcast in DX 7.2 1 Hazelcast How to share Java objects in a cluster
  • 2. Hazelcast in DX 7.2 2 DX 7.2 Sharing objects across servers 1
  • 3. Hazelcast in DX 7.2 3 1 Why do we want to share objects? ‱ Replicated object = Highly Available object o No Single Point of Failure o Servers can be restarted and shutdown without data loss ‱ Better load balancing o Load Balancer redirects traffic to the less busy server, and not to the one containing the data ‱ Because we need it! o Prevents race conditions between servers o Some features simply need to share data cluster-wide
  • 4. Hazelcast in DX 7.2 4 1 Why do we want to share objects? Sticky Session Stateless VS
  • 5. Hazelcast in DX 7.2 5 What are the solutions? 1 ‱ Externalize objects to a dedicated backend ‱ Synchronize objects across the cluster Digital Experience Manager offers out of the box support for both!
  • 6. Hazelcast in DX 7.2 6 What are the solutions? 1 VS Offloaded objects Synchronized objects
  • 7. Hazelcast in DX 7.2 7 1 Pros & Cons ‱ Externalized objects to a dedicated backend: - No development required for some objects (user sessions...) - Specific development required when storing custom objects - More complex architecture (additional servers) - Highly scalable ‱ Synchronized objects across the cluster: - Needs to be taken into account in the code - No architecture change required - Very granular: specific objects can be synchronized while others aren’t - Very efficient with few servers, won’t scale to hundreds of nodes
  • 8. Hazelcast in DX 7.2 8 1 Hazelcast “The Leading Open Source In-Memory Data Grid” There is much more to Hazelcast than what we are going to talk about today: Hazelcast is Open Source under Apache license (we love open source!)
  • 9. Hazelcast in DX 7.2 9 1 Hazelcast in Digital Experience Manager 7.2 ‱ Hazelcast 3.7.3 is available out of the box in Digital Experience Manager 7.2 ‱ Available as a service: no custom integration required (Use it in less than 5 minutes) ‱ Hazelcast is masterless: killing a server won’t alter the service
  • 10. Hazelcast in DX 7.2 10 1 Hazelcast server discovery How do servers know about each other? ‱ Multicast ‱ TCP ‱ EC2 Cloud DX 7.2 uses the TCP option. Everything is done for you and you can start using the service without worrying about the server discovery.
  • 11. Hazelcast in DX 7.2 11 1 DX 7.2 server architecture with Hazelcast
  • 12. Hazelcast in DX 7.2 12 1 Hazelcast usages in 7.2 Hazelcast is already widely used inside Digital Experience Manager 7.2: ‱ Clustered module deployment: shared module states across the cluster ‱ Oauth authentification modules: authentication token shared across the cluster to authenticate users on all servers at once ‱ More custom modules we haven’t heard of!
  • 13. Hazelcast in DX 7.2 13 Technical Implementation 2
  • 14. Hazelcast in DX 7.2 14 2 Hazelcast architecture ‱ Hazelcast uses TCP communication to replicate the objects ‱ Hazelcast is event-based ‱ Hazelcast handles concurrent access to objects out of the box ‱ Hazelcast is instantiated by DX and exposed as an OSGi Service Any DX 7.2 module can import Hazelcast’s OSGi service and start using it right away.
  • 15. Hazelcast in DX 7.2 15 How to use Hazelcast in DX7.2
  • 16. Hazelcast in DX 7.2 16 2 OSGi Services <osgi:reference id="com.hazelcast.core.HazelcastInstance" interface="com.hazelcast.core.HazelcastInstance"/> <bean id="HazelcastExampleAction” class="org.jahia.modules.hazelcastexample.beans.HazelcastExampleBean"> <property name="hazelcastInstance" ref="com.hazelcast.core.HazelcastInstance"/> </bean> Spring file declaration: Imports the Hazelcast OSGi Service and injects it in a Spring Bean.
  • 17. Hazelcast in DX 7.2 17 2 Simple shared object declaration Java class declaration: public class HazelcastExampleBean { } First access to the getMap(String) method will instantiate the shared object private HazelcastInstance hazelcastInstance; public void setHazelcastInstance(HazelcastInstance hi) { this.hazelcastInstance = hi; } public HazelcastExampleBean () { Map<Integer, String> sharedData = hazelcastInstance.getMap("sharedObject"); sharedData.put(sharedData.size()+1, “myContent”); }
  • 18. Hazelcast in DX 7.2 18 2 That’s all. All the heavy lifting is handled internally by DX 7.2 Of course, there is much more to Hazelcast than sharing objects. If you want to know more, more documentation is available at http://docs.hazelcast.org/docs/3.7/manual/html-single/index.html
  • 19. Hazelcast in DX 7.2 19 2 Distributed Events ‱ Membership Listener for cluster membership events. ‱ Distributed Object Listener for distributed object creation and destroy events. ‱ Migration Listener for partition migration start and complete events. ‱ Partition Lost Listener for partition lost events. ‱ Lifecycle Listener for HazelcastInstance lifecycle events. ‱ Entry Listener for IMap and MultiMap entry events. ‱ Item Listener for IQueue, ISet and IList item events. ‱ Message Listener for ITopic message events. ‱ Client Listener for client connection events. Event distribution is a big part of Hazelcast. Even though you might not use them at the beginning, listening to events might come in handy someday.
  • 20. Hazelcast in DX 7.2 20 2 Configuration fine tuning The configuration is stored in /digital-factory- data/karaf/etc/hazelcast.xml
  • 21. Hazelcast in DX 7.2 21 2 Performances ‱ Hazelcast is designed to play well under high read and write load ‱ Network performance is a key aspect of Hazelcast’s perfs If you are designing a highly demanding application with lots of accesses, load performance testing is a key aspect of the project.
  • 22. Hazelcast in DX 7.2 22 THE END! THANKS FOR LISTENING