As per feedback and suggestions, the following are the defined methods for
ClusteringAgent. Also we have tried to remove the dependency on the
configuration-context model from clustering impl, as there was no need/use
for that. With these, we now have a basic working clustering
implementation, supporting multicast and wka membership schemes based on
hazelcast. We will next arrange the design and code review sessions.

*ClusteringAgent*

    /**
     * Initialize the agent which will initialize this node, and join the
cluster
     */
    void *init*() throws *ClusterInitializationException*;

    /**
     * Shutdown the agent which will remove this node from cluster
     */
    void *shutdown*();

    /**
     * Send a message to all members in the cluster
     */
    void *sendMessage*(ClusterMessage msg) throws
*MessageSendFailedException*;

    /**
     * Send a message to a set of specific members in the cluster
     */
    void *sendMessage*(ClusterMessage msg, List<ClusterMember> members)
throws *MessageSendFailedException*;


On Mon, Jan 20, 2014 at 2:49 PM, Kishanthan Thangarajah <[email protected]
> wrote:

>
>
>
> On Sun, Jan 19, 2014 at 3:22 PM, Afkham Azeez <[email protected]> wrote:
>
>>
>>
>>
>> On Sun, Jan 19, 2014 at 3:11 PM, Isuru Perera <[email protected]> wrote:
>>
>>> How about following change?
>>>
>>> s/ClusteringFault/ClusteringException
>>>
>>
>>
>> Yes, no more Fault in exception names. Those exception names were
>> inspired by SOAP. In addition, instead of ClusteringException, we need to
>> have some specific types; e.g. ClusterInitializationException,
>> MessageFailedException etc.
>>
>
> +1.
>
> Thanks,
> Kishanthan.
>
>>
>>
>>>
>>>
>>>
>>> On Sun, Jan 19, 2014 at 11:40 AM, Kishanthan Thangarajah <
>>> [email protected]> wrote:
>>>
>>>> Clustering SPI provides the ability to plug-in different clustering
>>>> implementation to carbon. By default, carbon will ship hazel-cast based
>>>> clustering impl. There will be a separate file (cluster.xml) for cluster
>>>> configuration.
>>>>
>>>> The SPI will contain the following main interfaces.
>>>>
>>>> *ClusteringAgent* - is responsible for initializing and managing this
>>>> node in the cluster.
>>>> *MembershipScheme* - a representation of a membership scheme such as
>>>> "multicast" or "well-known address (wka) used in the cluster.
>>>>
>>>> A high-level view can be as follows
>>>>
>>>> [image: Inline image 1]
>>>>
>>>> When the cluster agent is successfully initialized, it will also
>>>> register the Cluster Service (being discussed at "[C5] Clustering API").
>>>> The Cluster Service will use the clustering agent underneath at
>>>> implementation level for its required operations. Based on previous
>>>> experiences, we have defined the following methods for clustering agent and
>>>> membership scheme for now. Based on the final outcome of this discussion,
>>>> they may get changed.
>>>>
>>>> *ClusteringAgent*
>>>>
>>>>     /**
>>>>      * Initialize the agent which will initialize this node, and join
>>>> the cluster
>>>>      */
>>>>     void *init*() throws ClusteringFault;
>>>>
>>>>     /**
>>>>      * Shutdown the agent which will remove this node from cluster
>>>>      */
>>>>     void *shutdown*() throws ClusteringFault;
>>>>
>>>>     /**
>>>>      * Set carbon configuration context to this agent to be used in the
>>>> clustering impl
>>>>      */
>>>>     void *setConfigurationContext*(CarbonConfigurationContext
>>>> configurationContext);
>>>>
>>>>     /**
>>>>      * Get the list of static members
>>>>      */
>>>>     List<ClusterMember> *getStaticMembers*();
>>>>
>>>>     /**
>>>>      * Get the number of members alive.
>>>>      */
>>>>     int *getAliveMemberCount*();
>>>>
>>>>     /**
>>>>      * Send a message to all members in the cluster
>>>>      */
>>>>     List<ClusteringCommand> *sendMessage*(ClusterMessage msg, boolean
>>>> isSync)
>>>>             throws ClusteringFault;
>>>>
>>>>     /**
>>>>      * Send a message to a set of specific members in the cluster
>>>>      */
>>>>     List<ClusteringCommand> *sendMessage*(ClusterMessage msg,
>>>> List<ClusterMember> members, boolean isSync)
>>>>             throws ClusteringFault;
>>>>
>>>>
>>>> *MembershipScheme*
>>>>
>>>>     void *init*() throws ClusteringFault;
>>>>
>>>>     void *joinGroup*() throws ClusteringFault;
>>>>
>>>>
>>>> Thoughts?
>>>>
>>>> Thanks,
>>>> Kishanthan.
>>>> --
>>>>  *Kishanthan Thangarajah*
>>>> Senior Software Engineer,
>>>> Platform Technologies Team,
>>>> WSO2, Inc.
>>>> lean.enterprise.middleware
>>>>
>>>> Mobile - +94773426635
>>>> Blog - *http://kishanthan.wordpress.com
>>>> <http://kishanthan.wordpress.com>*
>>>> Twitter - *http://twitter.com/kishanthan
>>>> <http://twitter.com/kishanthan>*
>>>>
>>>> _______________________________________________
>>>> Architecture mailing list
>>>> [email protected]
>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>>>
>>>>
>>>
>>>
>>> --
>>> Isuru Perera
>>> Senior Software Engineer | WSO2, Inc. | http://wso2.com/
>>> Lean . Enterprise . Middleware
>>>
>>> about.me/chrishantha
>>>
>>> _______________________________________________
>>> Architecture mailing list
>>> [email protected]
>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>>
>>>
>>
>>
>> --
>> *Afkham Azeez*
>> Director of Architecture; WSO2, Inc.; http://wso2.com
>> Member; Apache Software Foundation; http://www.apache.org/
>> * <http://www.apache.org/>*
>> *email: **[email protected]* <[email protected]>
>> * cell: +94 77 3320919 <%2B94%2077%203320919> blog: *
>> *http://blog.afkham.org* <http://blog.afkham.org>
>> *twitter: **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez>
>> * linked-in: **http://lk.linkedin.com/in/afkhamazeez
>> <http://lk.linkedin.com/in/afkhamazeez>*
>>
>>
>> *Lean . Enterprise . Middleware*
>>
>> _______________________________________________
>> Architecture mailing list
>> [email protected]
>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>
>>
>
>
> --
> *Kishanthan Thangarajah*
> Senior Software Engineer,
> Platform Technologies Team,
> WSO2, Inc.
> lean.enterprise.middleware
>
> Mobile - +94773426635
> Blog - *http://kishanthan.wordpress.com <http://kishanthan.wordpress.com>*
> Twitter - *http://twitter.com/kishanthan <http://twitter.com/kishanthan>*
>



-- 
*Kishanthan Thangarajah*
Senior Software Engineer,
Platform Technologies Team,
WSO2, Inc.
lean.enterprise.middleware

Mobile - +94773426635
Blog - *http://kishanthan.wordpress.com <http://kishanthan.wordpress.com>*
Twitter - *http://twitter.com/kishanthan <http://twitter.com/kishanthan>*

<<C5 - Clustering.png>>

_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to