You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Jeff Genender <jg...@apache.org> on 2006/11/14 22:28:11 UTC

Clustering for OpenEJB

Hi Guys,

I need to get OpenEJB3 ready for some clustering.  Here is a plan...

I am going to add a multicast agent to openejb so that the containers
can "find each other".  The containers will create a list of endpoints
(other servers) and stuff the list in the ServerMetaData as a list of
URLs.  That list will go to the client for use in the proxy.  Currently
OEJB2 uses round robin, but I would like to port it up to OEJB3 with a
plugable strategy, so we can use "random" for EJB connectivity to
provide for load balancing, as well as round robin.

I would like to know about preferences for insertion points for the
multicast agent, deployment configuration (to turn it on and use it), etc.

All comments are welcome.

Thanks,

Jeff

Re: Clustering for OpenEJB

Posted by David Blevins <da...@visi.com>.
On Nov 14, 2006, at 1:28 PM, Jeff Genender wrote:

> Hi Guys,
>
> I need to get OpenEJB3 ready for some clustering.  Here is a plan...
>
> I am going to add a multicast agent to openejb so that the containers
> can "find each other".  The containers will create a list of endpoints
> (other servers) and stuff the list in the ServerMetaData as a list of
> URLs.  That list will go to the client for use in the proxy.   
> Currently
> OEJB2 uses round robin, but I would like to port it up to OEJB3 with a
> plugable strategy, so we can use "random" for EJB connectivity to
> provide for load balancing, as well as round robin.
>
> I would like to know about preferences for insertion points for the
> multicast agent, deployment configuration (to turn it on and use  
> it), etc.

Couple notes.  Go with URI instead of URL (don't know if that's what  
you meant).  As I described to Mark the ServerMetaData in 3 already  
uses a URI instead of the InetAddress object like 2 does.  2 has a  
list of ServerMetaData objects, but really there should be one  
ServerMetaData object with a list of URIs inside.

There are a couple ways too cook the round-robin or random type code  
into the client.  One is to create a new ConnectionFactory  
implementation.  The ConnectionFactory used should get selected by  
the ConnectionManager based on the URI scheme.  So you could pick  
some scheme of your choosing 'oejb+rr' or you could even use nested  
URIs and have your ConnectionFactory implementation delegate back to  
ConnectionManager round-robin or random style such as  
'random:oejb'... here the ConnectionManager will find the  
ConnectionFactory for 'random' then your RandomConnectionFactory  
would scrape of the "random:" part and try a connect to the inner  
URI, example "oejb:..." or "http:...".  That's kind of crazy, but if  
you like it it works.

The other way is to simply hack the plain "oejb" ConnectionFactory to  
accept a new URI param which states what cluster style you want if  
any 'oejb:...?cluster=round-robin' etc.  That's pretty simple, but  
the downside is you'd have to hack it in for each protocol 'oejb',  
'http' and anything else we use as an actual transport.

You could even just do a hybrid of the first two ideas and make a new  
ConnectionFactory, say ClusteredConnectionFactory that takes the URI  
scheme 'cluster:...' then use query params to configure that such as  
'cluster:...?style=round-robin', etc.  Now that I'm typing this, that  
seems like the best option.  It's all likely clear as mud as I'm more  
or less just rambling my thoughts :) .. but just trying to get the  
conversation started :)

-David

> All comments are welcome.
>
> Thanks,
>
> Jeff
>


Re: Clustering for OpenEJB

Posted by Paulo Lopes <pm...@scratchydreams.com>.
Another interesting idea (at least for me) would be adding some JMX
mbeans to OEJB to collect some statistics, say available resources and
use that to sort the ServerMetaData List. This way you could connect
to a server that looks like to be more idle than the crowd.

On 11/15/06, Daniel S. Haischt <me...@daniel.stefan.haischt.name> wrote:
> ah okay in that case my reply to your original answer
> is obsolote :)
>
> Jeff Genender schrieb:
> > Whoops...yes...they are using jmDNS.
>
> --
>
> Mit freundlichen Gruessen / With kind regards
>
> DAn.I.El S. Haischt | phone:    +49 -7032-992909
> Grabenstrasse 11    |           +49 -700-DHAISCHT
>                      | fax:      +49 -7032-992910
> D-71083 Herrenberg  | fax2mail: +49 -7032-7999738
> GERMANY             | cell:     +49 -172-7668936
>
> email: me@daniel.stefan.haischt.name
> web:   http://www.daniel.stefan.haischt.name/
>
>


-- 
Paulo Lopes
www.scratchydreams.com

Re: Clustering for OpenEJB

Posted by "Daniel S. Haischt" <me...@daniel.stefan.haischt.name>.
ah okay in that case my reply to your original answer
is obsolote :)

Jeff Genender schrieb:
> Whoops...yes...they are using jmDNS.

-- 

Mit freundlichen Gruessen / With kind regards

DAn.I.El S. Haischt | phone:    +49 -7032-992909
Grabenstrasse 11    |           +49 -700-DHAISCHT
                     | fax:      +49 -7032-992910
D-71083 Herrenberg  | fax2mail: +49 -7032-7999738
GERMANY             | cell:     +49 -172-7668936

email: me@daniel.stefan.haischt.name
web:   http://www.daniel.stefan.haischt.name/


Re: Clustering for OpenEJB

Posted by Jeff Genender <jg...@apache.org>.
Whoops...yes...they are using jmDNS.

Jeff Genender wrote:
> They use both  multicast and zeroconf ;-)
> 
> Daniel S. Haischt wrote:
>> Jeff Genender schrieb:
>>> Very similar ;-) In fact, I can rip the rendezvous code from AMQ (thanks
>>> again AMQ) and do just that.
>> BTW, it's called Zeroconf and Bonjour is an Apple trademark and their
>> current implementation of the Zeroconf framework. Because of trademark
>> issues the dropped the former Rendezvous trademark.
>>
>> And the multicast part within the Zerconf spec framework is done by
>> multicast DNS. So much about the gory details :)
>>
>> Is AMQ using jmdns as a mDNS implementation?
>>

Re: Clustering for OpenEJB

Posted by "Daniel S. Haischt" <me...@daniel.stefan.haischt.name>.
I am not quite convinced regarding the Zeroconf usage.

To use Zeroconf means to use the complete stack, and why
should a message queue implement for example APIPA?

Jeff Genender schrieb:
> They use both  multicast and zeroconf ;-)
> 
> Daniel S. Haischt wrote:
>> Jeff Genender schrieb:
>>> Very similar ;-) In fact, I can rip the rendezvous code from AMQ (thanks
>>> again AMQ) and do just that.
>> BTW, it's called Zeroconf and Bonjour is an Apple trademark and their
>> current implementation of the Zeroconf framework. Because of trademark
>> issues the dropped the former Rendezvous trademark.
>>
>> And the multicast part within the Zerconf spec framework is done by
>> multicast DNS. So much about the gory details :)
>>
>> Is AMQ using jmdns as a mDNS implementation?
>>
> 
> !DSPAM:455a7d29665091846111600!
> 
> 

-- 

Mit freundlichen Gruessen / With kind regards

DAn.I.El S. Haischt | phone:    +49 -7032-992909
Grabenstrasse 11    |           +49 -700-DHAISCHT
                     | fax:      +49 -7032-992910
D-71083 Herrenberg  | fax2mail: +49 -7032-7999738
GERMANY             | cell:     +49 -172-7668936

email: me@daniel.stefan.haischt.name
web:   http://www.daniel.stefan.haischt.name/


Re: Clustering for OpenEJB

Posted by Jeff Genender <jg...@apache.org>.
They use both  multicast and zeroconf ;-)

Daniel S. Haischt wrote:
> Jeff Genender schrieb:
>>
>> Very similar ;-) In fact, I can rip the rendezvous code from AMQ (thanks
>> again AMQ) and do just that.
> 
> BTW, it's called Zeroconf and Bonjour is an Apple trademark and their
> current implementation of the Zeroconf framework. Because of trademark
> issues the dropped the former Rendezvous trademark.
> 
> And the multicast part within the Zerconf spec framework is done by
> multicast DNS. So much about the gory details :)
> 
> Is AMQ using jmdns as a mDNS implementation?
> 

Re: Clustering for OpenEJB

Posted by "Daniel S. Haischt" <me...@daniel.stefan.haischt.name>.
Jeff Genender schrieb:
> 
> Very similar ;-) In fact, I can rip the rendezvous code from AMQ (thanks
> again AMQ) and do just that.

BTW, it's called Zeroconf and Bonjour is an Apple trademark and their
current implementation of the Zeroconf framework. Because of trademark
issues the dropped the former Rendezvous trademark.

And the multicast part within the Zerconf spec framework is done by
multicast DNS. So much about the gory details :)

Is AMQ using jmdns as a mDNS implementation?

-- 

Mit freundlichen Gruessen / With kind regards

DAn.I.El S. Haischt | phone:    +49 -7032-992909
Grabenstrasse 11    |           +49 -700-DHAISCHT
                     | fax:      +49 -7032-992910
D-71083 Herrenberg  | fax2mail: +49 -7032-7999738
GERMANY             | cell:     +49 -172-7668936

email: me@daniel.stefan.haischt.name
web:   http://www.daniel.stefan.haischt.name/


Re: Clustering for OpenEJB

Posted by Jeff Genender <jg...@apache.org>.

Daniel S. Haischt wrote:
> This sounds a bit like announcing the container via mDNS, no?

Very similar ;-) In fact, I can rip the rendezvous code from AMQ (thanks
again AMQ) and do just that.
> 
> Matt Hogstrom schrieb:
>>
>> On Nov 14, 2006, at 6:16 PM, Jeff Genender wrote:
>>
>>>
>>> Yep, multicast for discovery and TCPIP for session communication for
>>> replication.  Have a look at gcache in the Geronimo sandbox.
>>>
>> Will there be other ways of configuring the cluster beyond
>> multi-cast.  MC is not universally available in some shops.
>>>
>>> Thanks,
>>>
>>> Jeff
>>>
>>>
>>>
>>>> Cheers,
>>>> Paulo
>>>>
>>>> On 11/14/06, Jeff Genender <jg...@apache.org> wrote:
>>>>> Hi Guys,
>>>>>
>>>>> I need to get OpenEJB3 ready for some clustering.  Here is a plan...
>>>>>
>>>>> I am going to add a multicast agent to openejb so that the containers
>>>>> can "find each other".  The containers will create a list of endpoints
>>>>> (other servers) and stuff the list in the ServerMetaData as a list of
>>>>> URLs.  That list will go to the client for use in the proxy. 
>>>>> Currently
>>>>> OEJB2 uses round robin, but I would like to port it up to OEJB3 with a
>>>>> plugable strategy, so we can use "random" for EJB connectivity to
>>>>> provide for load balancing, as well as round robin.
>>>>>
>>>>> I would like to know about preferences for insertion points for the
>>>>> multicast agent, deployment configuration (to turn it on and use it),
>>>>> etc.
>>>>>
>>>>> All comments are welcome.
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Jeff
>>>>>
>>>>
>>>>
>>>
>>
>> Matt Hogstrom
>> matt@hogstrom.org
>>
>> "Give a man a fish and he will eat for a day.
>> Teach a man to fish and he will sit in a boat all day."
>>
>>
>>
>> !DSPAM:455a6dbd606901093611833!
>>
>>
> 

Re: Clustering for OpenEJB

Posted by "Daniel S. Haischt" <me...@daniel.stefan.haischt.name>.
This sounds a bit like announcing the container via mDNS, no?

Matt Hogstrom schrieb:
> 
> On Nov 14, 2006, at 6:16 PM, Jeff Genender wrote:
> 
>>
>> Yep, multicast for discovery and TCPIP for session communication for
>> replication.  Have a look at gcache in the Geronimo sandbox.
>>
> Will there be other ways of configuring the cluster beyond multi-cast.  
> MC is not universally available in some shops.
>>
>> Thanks,
>>
>> Jeff
>>
>>
>>
>>> Cheers,
>>> Paulo
>>>
>>> On 11/14/06, Jeff Genender <jg...@apache.org> wrote:
>>>> Hi Guys,
>>>>
>>>> I need to get OpenEJB3 ready for some clustering.  Here is a plan...
>>>>
>>>> I am going to add a multicast agent to openejb so that the containers
>>>> can "find each other".  The containers will create a list of endpoints
>>>> (other servers) and stuff the list in the ServerMetaData as a list of
>>>> URLs.  That list will go to the client for use in the proxy.  Currently
>>>> OEJB2 uses round robin, but I would like to port it up to OEJB3 with a
>>>> plugable strategy, so we can use "random" for EJB connectivity to
>>>> provide for load balancing, as well as round robin.
>>>>
>>>> I would like to know about preferences for insertion points for the
>>>> multicast agent, deployment configuration (to turn it on and use it),
>>>> etc.
>>>>
>>>> All comments are welcome.
>>>>
>>>> Thanks,
>>>>
>>>> Jeff
>>>>
>>>
>>>
>>
> 
> Matt Hogstrom
> matt@hogstrom.org
> 
> "Give a man a fish and he will eat for a day.
> Teach a man to fish and he will sit in a boat all day."
> 
> 
> 
> !DSPAM:455a6dbd606901093611833!
> 
> 

-- 

Mit freundlichen Gruessen / With kind regards

DAn.I.El S. Haischt | phone:    +49 -7032-992909
Grabenstrasse 11    |           +49 -700-DHAISCHT
                     | fax:      +49 -7032-992910
D-71083 Herrenberg  | fax2mail: +49 -7032-7999738
GERMANY             | cell:     +49 -172-7668936

email: me@daniel.stefan.haischt.name
web:   http://www.daniel.stefan.haischt.name/


Re: Clustering for OpenEJB

Posted by Jeff Genender <jg...@apache.org>.
MC is the first pass.  We can easily make a static plugin too.  What I
will check in makes used of a DiscoveryAgent interface (thank you AMQ),
so with a small amount of code, we could do a statically specified list
of servers, or even do discovery via a "check in" server.

Matt Hogstrom wrote:
> 
> On Nov 14, 2006, at 6:16 PM, Jeff Genender wrote:
> 
>>
>> Yep, multicast for discovery and TCPIP for session communication for
>> replication.  Have a look at gcache in the Geronimo sandbox.
>>
> Will there be other ways of configuring the cluster beyond multi-cast. 
> MC is not universally available in some shops.
>>
>> Thanks,
>>
>> Jeff
>>
>>
>>
>>> Cheers,
>>> Paulo
>>>
>>> On 11/14/06, Jeff Genender <jg...@apache.org> wrote:
>>>> Hi Guys,
>>>>
>>>> I need to get OpenEJB3 ready for some clustering.  Here is a plan...
>>>>
>>>> I am going to add a multicast agent to openejb so that the containers
>>>> can "find each other".  The containers will create a list of endpoints
>>>> (other servers) and stuff the list in the ServerMetaData as a list of
>>>> URLs.  That list will go to the client for use in the proxy.  Currently
>>>> OEJB2 uses round robin, but I would like to port it up to OEJB3 with a
>>>> plugable strategy, so we can use "random" for EJB connectivity to
>>>> provide for load balancing, as well as round robin.
>>>>
>>>> I would like to know about preferences for insertion points for the
>>>> multicast agent, deployment configuration (to turn it on and use it),
>>>> etc.
>>>>
>>>> All comments are welcome.
>>>>
>>>> Thanks,
>>>>
>>>> Jeff
>>>>
>>>
>>>
>>
> 
> Matt Hogstrom
> matt@hogstrom.org
> 
> "Give a man a fish and he will eat for a day.
> Teach a man to fish and he will sit in a boat all day."
> 

Re: Clustering for OpenEJB

Posted by Matt Hogstrom <ma...@hogstrom.org>.
On Nov 14, 2006, at 6:16 PM, Jeff Genender wrote:

>
> Yep, multicast for discovery and TCPIP for session communication for
> replication.  Have a look at gcache in the Geronimo sandbox.
>
Will there be other ways of configuring the cluster beyond multi- 
cast.  MC is not universally available in some shops.
>
> Thanks,
>
> Jeff
>
>
>
>> Cheers,
>> Paulo
>>
>> On 11/14/06, Jeff Genender <jg...@apache.org> wrote:
>>> Hi Guys,
>>>
>>> I need to get OpenEJB3 ready for some clustering.  Here is a plan...
>>>
>>> I am going to add a multicast agent to openejb so that the  
>>> containers
>>> can "find each other".  The containers will create a list of  
>>> endpoints
>>> (other servers) and stuff the list in the ServerMetaData as a  
>>> list of
>>> URLs.  That list will go to the client for use in the proxy.   
>>> Currently
>>> OEJB2 uses round robin, but I would like to port it up to OEJB3  
>>> with a
>>> plugable strategy, so we can use "random" for EJB connectivity to
>>> provide for load balancing, as well as round robin.
>>>
>>> I would like to know about preferences for insertion points for the
>>> multicast agent, deployment configuration (to turn it on and use  
>>> it),
>>> etc.
>>>
>>> All comments are welcome.
>>>
>>> Thanks,
>>>
>>> Jeff
>>>
>>
>>
>

Matt Hogstrom
matt@hogstrom.org

"Give a man a fish and he will eat for a day.
Teach a man to fish and he will sit in a boat all day."



Re: Clustering for OpenEJB

Posted by Jeff Genender <jg...@apache.org>.

Paulo Lopes wrote:
> 
> How do you plan to design the endpoint list synchronization?
> 
> Lets say one OEJB node is started and it has no idea on the
> environment, it broadcasts a multicast message announcing it want to
> join a certain server group, the other online nodes just pick its ip
> address and some data from that announcement and they are aware of the
> new node.

Yep...code already done in gcache...I will be reusing that.

> 
> Now it is needed to send back to that node the current list of
> endpoints. Who will send it? 

The multicast is for servers to find each other.  The endpoint list is
placed in the ServerMetaData and sent to the client proxy, so the client
knows who to talk to via the list.  It picks one randomly or round robin
style.  If there is a dicsonnect, the client moves to the next server.
The server's stateful session beans are cached.

> A simple solution is to make it a Master
> Slave architecture and a node is designated a Master and the list is
> maintained by it, however if the master is down (crash or maintenance)
> the new node will never receive the list, so the master needs to be
> elected by the remaining online nodes.
> 

Master/Slave or full replication on the server side will be irrelevant
as they both should work.

> Also it is required to exist some kind of leave group message,
> otherwise dead nodes or undeployed nodes will be kept on that list.
> 

Not really, the beauty of multicast is the servers give a heartbeat.  If
a server has not been heard from within a certain time period, they are
removed from the endpoint list.

> Do you have any kind of protocol + API to do this? or am I just making
> things too complex?
> 

Yep, multicast for discovery and TCPIP for session communication for
replication.  Have a look at gcache in the Geronimo sandbox.


Thanks,

Jeff



> Cheers,
> Paulo
> 
> On 11/14/06, Jeff Genender <jg...@apache.org> wrote:
>> Hi Guys,
>>
>> I need to get OpenEJB3 ready for some clustering.  Here is a plan...
>>
>> I am going to add a multicast agent to openejb so that the containers
>> can "find each other".  The containers will create a list of endpoints
>> (other servers) and stuff the list in the ServerMetaData as a list of
>> URLs.  That list will go to the client for use in the proxy.  Currently
>> OEJB2 uses round robin, but I would like to port it up to OEJB3 with a
>> plugable strategy, so we can use "random" for EJB connectivity to
>> provide for load balancing, as well as round robin.
>>
>> I would like to know about preferences for insertion points for the
>> multicast agent, deployment configuration (to turn it on and use it),
>> etc.
>>
>> All comments are welcome.
>>
>> Thanks,
>>
>> Jeff
>>
> 
> 

Re: Clustering for OpenEJB

Posted by lichtner <li...@bway.net>.
I recommend Ken Birman's book "Building Secure and Reliable Network
Applications". He explains all major process group protocols.

On Tue, 14 Nov 2006, Paulo Lopes wrote:

> is there any jsr for this? jxta is always an option...
>
> On 11/14/06, lichtner <li...@bway.net> wrote:
> >
> > There are published process group membership protocols that can be
> > re-used.
> >
> > On Tue, 14 Nov 2006, Paulo Lopes wrote:
> >
> > > How do you plan to design the endpoint list synchronization?
> > >
> > > Lets say one OEJB node is started and it has no idea on the
> > > environment, it broadcasts a multicast message announcing it want to
> > > join a certain server group, the other online nodes just pick its ip
> > > address and some data from that announcement and they are aware of the
> > > new node.
> > >
> > > Now it is needed to send back to that node the current list of
> > > endpoints. Who will send it? A simple solution is to make it a Master
> > > Slave architecture and a node is designated a Master and the list is
> > > maintained by it, however if the master is down (crash or maintenance)
> > > the new node will never receive the list, so the master needs to be
> > > elected by the remaining online nodes.
> > >
> > > Also it is required to exist some kind of leave group message,
> > > otherwise dead nodes or undeployed nodes will be kept on that list.
> > >
> > > Do you have any kind of protocol + API to do this? or am I just making
> > > things too complex?
> > >
> > > Cheers,
> > > Paulo
> > >
> > > On 11/14/06, Jeff Genender <jg...@apache.org> wrote:
> > > > Hi Guys,
> > > >
> > > > I need to get OpenEJB3 ready for some clustering.  Here is a plan...
> > > >
> > > > I am going to add a multicast agent to openejb so that the containers
> > > > can "find each other".  The containers will create a list of endpoints
> > > > (other servers) and stuff the list in the ServerMetaData as a list of
> > > > URLs.  That list will go to the client for use in the proxy.  Currently
> > > > OEJB2 uses round robin, but I would like to port it up to OEJB3 with a
> > > > plugable strategy, so we can use "random" for EJB connectivity to
> > > > provide for load balancing, as well as round robin.
> > > >
> > > > I would like to know about preferences for insertion points for the
> > > > multicast agent, deployment configuration (to turn it on and use it), etc.
> > > >
> > > > All comments are welcome.
> > > >
> > > > Thanks,
> > > >
> > > > Jeff
> > > >
> > >
> > >
> > > --
> > > Paulo Lopes
> > > www.scratchydreams.com
> > >
> >
>
>
> --
> Paulo Lopes
> www.scratchydreams.com
>

Re: Clustering for OpenEJB

Posted by Paulo Lopes <pm...@scratchydreams.com>.
is there any jsr for this? jxta is always an option...

On 11/14/06, lichtner <li...@bway.net> wrote:
>
> There are published process group membership protocols that can be
> re-used.
>
> On Tue, 14 Nov 2006, Paulo Lopes wrote:
>
> > How do you plan to design the endpoint list synchronization?
> >
> > Lets say one OEJB node is started and it has no idea on the
> > environment, it broadcasts a multicast message announcing it want to
> > join a certain server group, the other online nodes just pick its ip
> > address and some data from that announcement and they are aware of the
> > new node.
> >
> > Now it is needed to send back to that node the current list of
> > endpoints. Who will send it? A simple solution is to make it a Master
> > Slave architecture and a node is designated a Master and the list is
> > maintained by it, however if the master is down (crash or maintenance)
> > the new node will never receive the list, so the master needs to be
> > elected by the remaining online nodes.
> >
> > Also it is required to exist some kind of leave group message,
> > otherwise dead nodes or undeployed nodes will be kept on that list.
> >
> > Do you have any kind of protocol + API to do this? or am I just making
> > things too complex?
> >
> > Cheers,
> > Paulo
> >
> > On 11/14/06, Jeff Genender <jg...@apache.org> wrote:
> > > Hi Guys,
> > >
> > > I need to get OpenEJB3 ready for some clustering.  Here is a plan...
> > >
> > > I am going to add a multicast agent to openejb so that the containers
> > > can "find each other".  The containers will create a list of endpoints
> > > (other servers) and stuff the list in the ServerMetaData as a list of
> > > URLs.  That list will go to the client for use in the proxy.  Currently
> > > OEJB2 uses round robin, but I would like to port it up to OEJB3 with a
> > > plugable strategy, so we can use "random" for EJB connectivity to
> > > provide for load balancing, as well as round robin.
> > >
> > > I would like to know about preferences for insertion points for the
> > > multicast agent, deployment configuration (to turn it on and use it), etc.
> > >
> > > All comments are welcome.
> > >
> > > Thanks,
> > >
> > > Jeff
> > >
> >
> >
> > --
> > Paulo Lopes
> > www.scratchydreams.com
> >
>


-- 
Paulo Lopes
www.scratchydreams.com

Re: Clustering for OpenEJB

Posted by lichtner <li...@bway.net>.
There are published process group membership protocols that can be
re-used.

On Tue, 14 Nov 2006, Paulo Lopes wrote:

> How do you plan to design the endpoint list synchronization?
>
> Lets say one OEJB node is started and it has no idea on the
> environment, it broadcasts a multicast message announcing it want to
> join a certain server group, the other online nodes just pick its ip
> address and some data from that announcement and they are aware of the
> new node.
>
> Now it is needed to send back to that node the current list of
> endpoints. Who will send it? A simple solution is to make it a Master
> Slave architecture and a node is designated a Master and the list is
> maintained by it, however if the master is down (crash or maintenance)
> the new node will never receive the list, so the master needs to be
> elected by the remaining online nodes.
>
> Also it is required to exist some kind of leave group message,
> otherwise dead nodes or undeployed nodes will be kept on that list.
>
> Do you have any kind of protocol + API to do this? or am I just making
> things too complex?
>
> Cheers,
> Paulo
>
> On 11/14/06, Jeff Genender <jg...@apache.org> wrote:
> > Hi Guys,
> >
> > I need to get OpenEJB3 ready for some clustering.  Here is a plan...
> >
> > I am going to add a multicast agent to openejb so that the containers
> > can "find each other".  The containers will create a list of endpoints
> > (other servers) and stuff the list in the ServerMetaData as a list of
> > URLs.  That list will go to the client for use in the proxy.  Currently
> > OEJB2 uses round robin, but I would like to port it up to OEJB3 with a
> > plugable strategy, so we can use "random" for EJB connectivity to
> > provide for load balancing, as well as round robin.
> >
> > I would like to know about preferences for insertion points for the
> > multicast agent, deployment configuration (to turn it on and use it), etc.
> >
> > All comments are welcome.
> >
> > Thanks,
> >
> > Jeff
> >
>
>
> --
> Paulo Lopes
> www.scratchydreams.com
>

Re: Clustering for OpenEJB

Posted by Paulo Lopes <pm...@scratchydreams.com>.
How do you plan to design the endpoint list synchronization?

Lets say one OEJB node is started and it has no idea on the
environment, it broadcasts a multicast message announcing it want to
join a certain server group, the other online nodes just pick its ip
address and some data from that announcement and they are aware of the
new node.

Now it is needed to send back to that node the current list of
endpoints. Who will send it? A simple solution is to make it a Master
Slave architecture and a node is designated a Master and the list is
maintained by it, however if the master is down (crash or maintenance)
the new node will never receive the list, so the master needs to be
elected by the remaining online nodes.

Also it is required to exist some kind of leave group message,
otherwise dead nodes or undeployed nodes will be kept on that list.

Do you have any kind of protocol + API to do this? or am I just making
things too complex?

Cheers,
Paulo

On 11/14/06, Jeff Genender <jg...@apache.org> wrote:
> Hi Guys,
>
> I need to get OpenEJB3 ready for some clustering.  Here is a plan...
>
> I am going to add a multicast agent to openejb so that the containers
> can "find each other".  The containers will create a list of endpoints
> (other servers) and stuff the list in the ServerMetaData as a list of
> URLs.  That list will go to the client for use in the proxy.  Currently
> OEJB2 uses round robin, but I would like to port it up to OEJB3 with a
> plugable strategy, so we can use "random" for EJB connectivity to
> provide for load balancing, as well as round robin.
>
> I would like to know about preferences for insertion points for the
> multicast agent, deployment configuration (to turn it on and use it), etc.
>
> All comments are welcome.
>
> Thanks,
>
> Jeff
>


-- 
Paulo Lopes
www.scratchydreams.com