RMI, fault tolerance and load balancing without tomcat

Discussion in 'Java' started by apm35@student.open.ac.uk, Feb 14, 2008.

  1. Guest

    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
    , Feb 14, 2008
    #1
    1. Advertising

  2. Arne Vajhøj Guest

    wrote:
    > 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
    Arne Vajhøj, Feb 14, 2008
    #2
    1. Advertising

  3. Patrick May Guest

    writes:
    > So my question is, "how does one get fault tolerance and load
    > balancing with RMI?".


    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.

    Regards,

    Patrick

    ------------------------------------------------------------------------
    S P Engineering, Inc. | Large scale, mission-critical, distributed OO
    | systems design and implementation.
    | (C++, Java, Common Lisp, Jini, middleware, SOA)
    Patrick May, Feb 14, 2008
    #3
  4. Tony Winslow Guest

    wrote:
    > 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!
    Tony Winslow, Feb 15, 2008
    #4
  5. Guest

    On 14 Feb, 22:57, Arne Vajhøj <> wrote:
    > wrote:
    > > 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.


    > BTW, you can do CORBA in Java.


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


    > Arne
    , Feb 15, 2008
    #5
  6. Guest

    On 15 Feb, 06:18, Tony Winslow <> wrote:
    > > 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.


    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.
    , Feb 15, 2008
    #6
  7. Guest

    On 14 Feb, 23:42, Patrick May <> wrote:
    > writes:
    > > So my question is, "how does one get fault tolerance and load
    > > balancing with RMI?".

    >
    >      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.
    , Feb 15, 2008
    #7
  8. Guest

    On 15 Feb, 11:03, wrote:
    > On 14 Feb, 23:42, Patrick May <> 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.
    , Feb 15, 2008
    #8
  9. Patrick May Guest

    writes:
    > On 15 Feb, 11:03, wrote:
    >> On 14 Feb, 23:42, Patrick May <> 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.


    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

    ------------------------------------------------------------------------
    S P Engineering, Inc. | Large scale, mission-critical, distributed OO
    | systems design and implementation.
    | (C++, Java, Common Lisp, Jini, middleware, SOA)
    Patrick May, Feb 15, 2008
    #9
  10. Arne Vajhøj Guest

    wrote:
    > On 14 Feb, 22:57, Arne Vajhøj <> wrote:
    >> wrote:
    >>> 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.

    >
    >> BTW, you can do CORBA in Java.

    >
    > 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
    Arne Vajhøj, Feb 19, 2008
    #10
  11. Arne Vajhøj Guest

    wrote:
    > 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
    Arne Vajhøj, Feb 19, 2008
    #11
  12. Guest

    On 19 Feb, 03:23, Arne Vajhøj <> wrote:

    > >> BTW, you can do CORBA in Java.

    >
    > > 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


    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.
    , Feb 19, 2008
    #12
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. SamIAm
    Replies:
    0
    Views:
    442
    SamIAm
    Nov 11, 2003
  2. Replies:
    6
    Views:
    11,387
  3. Vijay Bajwa

    TIBCO EMS Fault Tolerance

    Vijay Bajwa, Jun 12, 2007, in forum: Java
    Replies:
    0
    Views:
    1,393
    Vijay Bajwa
    Jun 12, 2007
  4. Astan Chee
    Replies:
    0
    Views:
    266
    Astan Chee
    Feb 20, 2009
  5. Phlip

    YAML::Syck fault tolerance

    Phlip, Jan 19, 2007, in forum: Ruby
    Replies:
    2
    Views:
    125
    Phlip
    Jan 21, 2007
Loading...

Share This Page