You can get hold of the CarbonCluster using the exposed OSGi service of type org.wso2.carbon.core.clustering.api.CarbonCluster
On Wed, Jul 3, 2013 at 7:10 PM, Afkham Azeez <[email protected]> wrote: > I have added the following interface. Please let me know if this is > sufficient. > > > import java.util.List; > > /** > * TODO: class description > */ > public interface CarbonCluster { > > List getMembers(); > > List getMembers(String clusterDomain); > > void addMembershipListener(ClusterMembershipListener > membershipListener); > > void removeMembershipListener(ClusterMembershipListener > membershipListener); > > void sendMessage(ClusterMessage clusterMessage); > > void sendMessage(ClusterMessage clusterMessage, List<ClusterMember> > members); > } > > > > On Sat, Jun 29, 2013 at 7:00 AM, Afkham Azeez <[email protected]> wrote: > >> Thanks for the detailed explanation. I'm afraid it is too late to get >> this into 4.2.0. Let's try to get this in to 4.2.1 >> >> Azeez >> >> >> On Sun, Jun 23, 2013 at 10:36 AM, Anjana Fernando <[email protected]>wrote: >> >>> Hi Azeez, >>> >>> We basically need a concept of a Group, where we can discover members of >>> that specific group, send messages between peers, send broadcast messages >>> to all the members, and also get group member notifications, such as a >>> member arriving to a group, and a member leaving. >>> >>> A single server should be able to join multiple Groups basically, with a >>> given name, I guess this is the same concept of domains we have in the >>> current clustering API. This is required when a single server can act >>> multiple roles, so a server can join the groups it require. >>> >>> Also another requirement that is needed is, we need to be notified when >>> a specific group acquires a specific number of group members. This can be >>> either implemented using a blocking method (with a timeout possibly) which >>> waits for a specific number of members to arrive, or by registering a >>> callback. This type of functionality is required for a scenario like, when >>> scheduling tasks, we need a specific number of servers to be startup up, to >>> spread the tasks throughout the cluster, without giving all the tasks to >>> the 1'st server that starts up, I'm sure, this requirement would arise for >>> other components also. >>> >>> Please check for the Group API ([1],[2] I've created for the >>> coordination component to get the above functionality (ignore the >>> "clearGroupMessages" method there). There, in [2], for "onPeerMessage", I >>> guess it's useful for us to get the member id who would have sent the >>> message. Same for "onGroupMessage", and also, there we could possibly >>> return a result from that node, and give a accumulated result to the >>> sender, which I guess we already do in the current clustering API. >>> >>> [1] >>> https://svn.wso2.org/repos/wso2/carbon/platform/branches/4.0.0/components/coordination/org.wso2.carbon.coordination.core/4.0.5/src/main/java/org/wso2/carbon/coordination/core/sync/Group.java >>> [2] >>> https://svn.wso2.org/repos/wso2/carbon/platform/branches/4.0.0/components/coordination/org.wso2.carbon.coordination.core/4.0.5/src/main/java/org/wso2/carbon/coordination/core/sync/GroupEventListener.java >>> >>> Cheers, >>> Anjana. >>> >>> >>> On Sun, Jun 23, 2013 at 9:50 AM, Afkham Azeez <[email protected]> wrote: >>> >>>> Folks, >>>> Please let me know through this mail thread if you require any new >>>> clustering APIs. It would be good if you could give the required >>>> method signature or describe the scenarios you need to be covered. >>>> >>>> Azeez >>>> >>>> -- >>>> Afkham Azeez >>>> Director of Architecture; WSO2, Inc.; http://wso2.com >>>> Member; Apache Software Foundation; http://www.apache.org/ >>>> >>>> email: [email protected] cell: +94 77 3320919 >>>> blog: http://blog.afkham.org >>>> twitter: http://twitter.com/afkham_azeez >>>> linked-in <http://twitter.com/afkham_azeezlinked-in>: >>>> http://lk.linkedin.com/in/afkhamazeez >>>> >>>> Lean . Enterprise . Middleware >>>> >>> >>> >>> >>> -- >>> *Anjana Fernando* >>> Technical Lead >>> WSO2 Inc. | http://wso2.com >>> lean . enterprise . middleware >>> >> >> >> >> -- >> *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 >> 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* >> * >> * >> *Lean . Enterprise . Middleware* >> > > > > -- > *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 > 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* > * > * > *Lean . Enterprise . Middleware* > -- *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 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* * * *Lean . Enterprise . Middleware*
_______________________________________________ Architecture mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
