80 likes | 484 Views
Adobe AEM Meet-up Presentation 03/13/2014 Vijay Donthi. AEM Topology . 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.
E N D
Adobe AEM Meet-up Presentation 03/13/2014 Vijay Donthi AEM Topology
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 cluster- repository.getDescriptor("crx.cluster.master"); • Cluster Aware OSGiService: 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/topology • 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.sling.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/bundles/discovery-api-and-impl.html • http://helpx.adobe.com/experience-manager/kb/create-cluster-aware-osgi-service.html • https://dev.day.com/docs/en/cq/current/javadoc/org/apache/sling/discovery/package-summary.html