Adobe AEM Meet-up Presentation 03/13/2014 Vijay Donthi Detecting CQ/CRX Cluster Slave node or master node Using repository crx.cluster.master Create Cluster Aware OSGI Service Topology.
Download
Report
Transcript Adobe AEM Meet-up Presentation 03/13/2014 Vijay Donthi Detecting CQ/CRX Cluster Slave node or master node Using repository crx.cluster.master Create Cluster Aware OSGI Service Topology.
Adobe AEM Meet-up Presentation
03/13/2014
Vijay Donthi
Detecting CQ/CRX Cluster Slave
node or master node
Using repository crx.cluster.master
Create Cluster Aware OSGI Service
Topology API starting AEM 5.6.1
Why chose Topology
crx.cluster.master: the value could be
null if clustering is disabled-not much
information about the instance or
clusterrepository.getDescriptor("crx.cluster.master");
Cluster Aware OSGi Service: not
recommended in 5.6.1- uses
ClusterAware interface
Discovery API and Topology
Clustering- multiple instances sharing
one common repository
discovery-api provides access to the
current topology, and any changes in the
topology.
Interfaces to know topology events and
information.
Topology browser - Sling instances and
cluster view
Topology View
Topology browser can be accessed at:
http://localhost:4502/system/console/top
ology
The discovery API introduces support for
Cluster Leader within each cluster
The leader can be used to deal with
work that must be executed in one
instance of the cluster
Change events
TOPOLOGY_CHANGING: discovery
service detects that an instance is no
longer responding or has newly joined or
new leader instance
TOPOLOGY_CHANGED: once the change
is confirmed in the topology
PROPERTIES_CHANGED:sent when the
one or many properties have changed in
an instance in the current topology
https://gist.github.com/vdonthi/9533102
Configure Discover Service
/system/console/configMgr/org.apache.s
ling.discovery.impl.Config
Status updated with HTTP heart beats
The Discovery Service sends periodic
POST requests (heartbeats) to Topology
Connector services to establish and
maintain connections with the topology
References
http://sling.apache.org/documentation/b
undles/discovery-api-and-impl.html
http://helpx.adobe.com/experiencemanager/kb/create-cluster-aware-osgiservice.html
https://dev.day.com/docs/en/cq/current/j
avadoc/org/apache/sling/discovery/pack
age-summary.html