You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Carsten Ziegeler (JIRA)" <ji...@apache.org> on 2013/04/22 11:25:16 UTC

[jira] [Assigned] (SLING-2827) discovery.impl: a resource based implementation of the discovery.api

     [ https://issues.apache.org/jira/browse/SLING-2827?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler reassigned SLING-2827:
---------------------------------------

    Assignee: Carsten Ziegeler
    
> discovery.impl: a resource based implementation of the discovery.api
> --------------------------------------------------------------------
>
>                 Key: SLING-2827
>                 URL: https://issues.apache.org/jira/browse/SLING-2827
>             Project: Sling
>          Issue Type: New Feature
>          Components: Extensions
>            Reporter: Stefan Egli
>            Assignee: Carsten Ziegeler
>         Attachments: discovery.impl.bootstrap.patch, discovery.impl.loops.timeouts.webconsole.patch, discovery.impl.tar.gz
>
>
> This ticket is about contributing a resource based implementation of the discovery api (see [0]) named discovery.impl to Sling. The implementation is attached as a .tar.gz - its md5 hash is d8891e5401114b2a629d3ff01044a1d6
> Short description of the discovery.impl:
> The discovery.impl is an out-of-the-box implementation of the discovery.api using standard features of Sling. The discovery.api provides a view of a topology consisting of a number of individual sling-instances. The instances are loosely coupled, except for being part of the topology they do not implicitly or necessarily share anything else. For those instances though that form a cluster - ie when connected to the same repository - the api has an abstraction called ClusterView.
> The discovery.impl uses two mechanisms for discovering other instances:
>  * it stores information about the local instance at a unique location in the repository. Thus allowing other instances that access the same repository to see and recognize each other.
>  * it connects to 'remote' instances via a plain HTTP POST, announcing the instances that it can see, and getting back the instances of the counterpart
> All of the above is done regularly using a heart-beat - thus allowing to get a view of the currently live instances.
> The discovery.api additionally supports leader-election within a cluster: it ensures that one and only one instance is elected leader and stays leader until it disappears/shuts down/dies. The discovery.impl uses repository-based voting between the instances of a cluster to establish a common 'cluster view'. Based on an established view, the discovery.impl is then able to deterministically elect one of the instances of the view as the leader (namely the one with the lowest 'id').
> Also, to support the PropertyProvider concept of the discovery.api, the properties of each instance are propagated to the other instances using the heartbeat as piggyback (either via the repository or via HTTP POSTs for remote instances).
> To get an idea of the discovery.impl build and add and start the two bundles (org.apache.sling.discovery.api and org.apache.sling.discovery.impl) to your sling installation and open the browser to the provided, simplistic 'topology webconsole' at
> http://localhost:4502/system/console/topology
> Please let me know if anything needs further explanation, details. Looking forward to having this included in Sling!
> Cheers,
> Stefan
> --
> [0] http://svn.apache.org/repos/asf/sling/trunk/contrib/extensions/discovery/api

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira