RMI, fault tolerance and load balancing without tomcat

A

apm35

I have just finished a project where I had to migrate a legacy C++
project and get rid of certain buggy, ancient, unsupported components
for modern java-centric equivalents. The last step in this process was
replacing CORBA with JMS. I was against this but got overruled so
we're now using JMS. The app was typical request-response for which I
think CORBA was ok. In my document of where we are, were we want to go
and how we are going to get there, I said that replacing it with RMI
would be sub-optimal because of the lack of fault tolerance and load
balancing. This is one of the reasons that JMS was chosen - no RMI, no
CORBA, what does that leave for IPC?

So my question is, "how does one get fault tolerance and load
balancing with RMI?". The FT and LB that comes with tomcat cannot be
used because I want a solution that does not require the app to run
inside a servlet container. Indeed the app might not even be a
servlet. I think that RMI is much closer to CORBA than JMS for this
particular app. There are already issues with the JMS approach because
of having to twist things around to make an asynchronous mechanism
appear to be synchronous.

Regards,

Andrew Marlow
 
A

Arne Vajhøj

I have just finished a project where I had to migrate a legacy C++
project and get rid of certain buggy, ancient, unsupported components
for modern java-centric equivalents. The last step in this process was
replacing CORBA with JMS. I was against this but got overruled so
we're now using JMS. The app was typical request-response for which I
think CORBA was ok. In my document of where we are, were we want to go
and how we are going to get there, I said that replacing it with RMI
would be sub-optimal because of the lack of fault tolerance and load
balancing. This is one of the reasons that JMS was chosen - no RMI, no
CORBA, what does that leave for IPC?

So my question is, "how does one get fault tolerance and load
balancing with RMI?". The FT and LB that comes with tomcat cannot be
used because I want a solution that does not require the app to run
inside a servlet container. Indeed the app might not even be a
servlet. I think that RMI is much closer to CORBA than JMS for this
particular app. There are already issues with the JMS approach because
of having to twist things around to make an asynchronous mechanism
appear to be synchronous.

If you want easy fault tolerance use an app server cluster and
EJB's. That is the designed solution for the problem.

You don't want a container ? You will have to write a lot more
code yourself !

BTW, you can do CORBA in Java.

Arne
 
T

Tony Winslow

I have just finished a project where I had to migrate a legacy C++
project and get rid of certain buggy, ancient, unsupported components
for modern java-centric equivalents. The last step in this process was
replacing CORBA with JMS. I was against this but got overruled so
we're now using JMS. The app was typical request-response for which I
think CORBA was ok. In my document of where we are, were we want to go
and how we are going to get there, I said that replacing it with RMI
would be sub-optimal because of the lack of fault tolerance and load
balancing. This is one of the reasons that JMS was chosen - no RMI, no
CORBA, what does that leave for IPC?

So my question is, "how does one get fault tolerance and load
balancing with RMI?". The FT and LB that comes with tomcat cannot be
used because I want a solution that does not require the app to run
inside a servlet container. Indeed the app might not even be a
servlet. I think that RMI is much closer to CORBA than JMS for this
particular app. There are already issues with the JMS approach because
of having to twist things around to make an asynchronous mechanism
appear to be synchronous.

Regards,

Andrew Marlow

Use some container or app server can save you a lot of time.
And you can keep using CORBA!
 
A

apm35

Use some container or app server can save you a lot of time.

The FT and LB that comes with tomcat cannot be used because I want a
solution that does not require the app to run inside a servlet
container.
And you can keep using CORBA!

Yes, I know. That is one of the reasons why I was against replacing
CORBA with JMS.
 
A

apm35

     Depending on the specifics of your system, Jini and JavaSpaces
(http://www.jini.org) might be a good fit.  It's certainly worth
looking into.

Thanks for mentioning JINI, I was not aware. Unfortunately, www.jini.org
documentation is in the form of a wiki that currently has two serious
problems: first, the pages are extremely light on detail, and second,
many of them give the error "The action you have requested is limited
to users in the group user".

It looks to me like JINI uses RMI as its basic IPC mechanism and
possibly adds services ontop to give FT and LB. But with the details
being so light it is hard to be sure of more.
 
A

apm35

On 14 Feb, 23:42, Patrick May <[email protected]> wrote:
It looks to me like JINI uses RMI as its basic IPC mechanism and
possibly adds services ontop to give FT and LB. But with the details
being so light it is hard to be sure of more.

I've done some more reading up on jini and javespaces and they just
seem like specs to me, which reminds me of JMS. Specs are all well and
good but until there is an open source implementation what good is it?
I have come across Blitz (http://www.dancres.org/blitz/blitz_js.html)
which is an open source implementation of javaspaces. Is this the kind
of thing you had in mind? I am not sure of it supports FT and LB yet.
 
P

Patrick May

I've done some more reading up on jini and javespaces and they just
seem like specs to me, which reminds me of JMS. Specs are all well
and good but until there is an open source implementation what good
is it? I have come across Blitz
(http://www.dancres.org/blitz/blitz_js.html) which is an open source
implementation of javaspaces. Is this the kind of thing you had in
mind? I am not sure of it supports FT and LB yet.

Blitz is a very good implementation of the JavaSpaces spec.
There is also a reference implementation of Jini, including an
implementation of JavaSpaces. Jini has been turned over to Apache and
is now the River project there:

http://incubator.apache.org/river/RIVER/index.html

The Jini Starter Kit is available from:

http://www.jini.org/wiki/Category:Jini_Starter_Kit

Regards,

Patrick
 
A

Arne Vajhøj

Yes, I know. That is one of the reasons why I was against replacing
CORBA with JMS.

It is not obvious to me how a component architecture can be
replaced by a message queue API ...

Arne
 
A

Arne Vajhøj

I've done some more reading up on jini and javespaces and they just
seem like specs to me, which reminds me of JMS. Specs are all well and
good but until there is an open source implementation what good is it?

Some companies actually use closed source software.

BTW, there are plenty of open source JMS implementations.

Arne
 
A

apm35

It is not obvious to me how a component architecture can be
replaced by a message queue API ...

Arne

Well, this is one the reasons why I charge the rate that I do. It can
be done, even though in my view it is inappropriate. This
inappropriate use of JMS does seem to crop up time and time again.
There is even a codehaus project for it called lingo. This uses a
different design to the root that I took. I use a JMS session pool,
which forces polling when the pool is exhausted. Lingo manages to
multiplex a single JMS session, which is obviously more resource
efficient but at the cost of increased code complexity.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top