Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20

Thread: Distributed architecture using Spring remoting

  1. #11

    Default

    There's nothing in RMI that will help you locate processes that will handle the remote call. This is functionality that is added by app server vendors when you create a cluster configuration i.e. JBoss adds a kind of interceptor in the client stub (obtained from JNDI) that knows how to route the method invocation to specific nodes

  2. #12

    Default I see

    Thanks, Manuel. That's one piece I was missing.

    In fact, one other way this could have been achieved is via JMS, and I think there's also a library out there that provides Spring remoting via JMS (Lingo, is it not?).

  3. #13

    Thumbs up

    Quote Originally Posted by nlif View Post
    I think there's also a library out there that provides Spring remoting via JMS (Lingo, is it not?).
    Yes Lingo is kool

    From there site: http://lingo.codehaus.org/Clustering
    Lingo is an ideal technology to cluster your POJO services to achieve load balancing across many servers and automatic failover. Lingo is high performance and works great in server centric environments as it can work with JCA to cleanly integrate with thread, connection and session pooling as well as handing of transactions, retry and exception handling.



    You can use Lingo to cluster your POJO services across a number of different JVMs. Lingo will then provide
    • load balancing across each server
    • High Availability; if a server fails for whatever reason the pending requests are automatically dispatched to another server.
    • loose coupling between clients and services in terms of location and time
      • you can send one-way requests which can be persisted until the back end services are available
    • traffic shaping - you can use JMS wildcards and selectors to shape the traffic
      • e.g. have a rack of servers which only process gold customers using a JMS selector to filter them out
    I think you should consider this as a solution, I hope it'll work for you

    Imran

  4. #14

    Default Jms

    Truth is we knew this could be done with JMS, and personally, I thought it's a good approach, but others opposed it, because they felt it's too complicated. More specifically, they argue that since we don't need asynchronous use-cases it's an over-complication (we need RPC style invocations, but across a cluster). That's how we got to RMI (and also, because EJBs provide distribution, and they do it through RMI so we thought we could too).

  5. #15
    Join Date
    Feb 2007
    Location
    San Francisco, CA
    Posts
    8

    Default Re: Distributed Architecture using Spring Remoting

    hey nlif (?),

    I found your discussion on spring forum. We have implemented similar remoting and *might* be facing problems.

    We're using RMI (not http-invoker, but more than happy to move to it) and have a cluster of machines exposing remote services behind a high performance load balancer.

    Now the problem is while testing failure modes, we're facing problems like, even though we break client access to load balancer we see they can still communicate, giving me the feeling they are communicating directly with app servers. And if we block app server access (with load balancer access given) clients start failing.

    I'm not sure whats going on. I was hoping it would simply work with only lb access since the lb ip address is the only thing clients should be concerned with??

  6. #16

    Default

    You are using JRMP (Java Remote Method protocol). RMI stubs registered with the RMI registry are connected to a specific endpoint. So, the client looks it up and then the call will go to the server specified in the stub which is what you are seeing.

    The load balancer would need to understand this protocol and be able to open & modify the RMI packages for this approach to work as I understand it.

    Use EJB (or perhaps Terracotta) if you need non-HTTP load-balancing.
    Last edited by Manuel Palacio; May 25th, 2007 at 01:22 AM.

  7. #17
    Join Date
    Feb 2007
    Location
    San Francisco, CA
    Posts
    8

    Default Re: Distributed Architecture using Spring Remoting

    hi,

    Thanks for replying. So you mean to say that the endpoint cannot be a load balancer??

    Will I face the same problems if I move to http invoker ??

    cheers!
    Sumit.

  8. #18

    Default

    Usually the stubs provided by different app servers like WebLogic or JBoss have load-balancing "built-in" when you enable clustering but you don't get this with "plain" RMI which is what you are using unless the load balancer guarantees that it can work with the JRMP protocol. It seems that this is not the case. Which load balancer are you using btw?

    I think it should work as you expect if you use the HTTP invoker. Consider using Hessian for more efficiency.

  9. #19
    Join Date
    Feb 2007
    Location
    San Francisco, CA
    Posts
    8

    Default Re: Hessian / Load balancing

    hi Manuel,

    Thanks a lot for your reply. You're probably right that it may not be achievable. I will have to check which LB we're using.

    Will try moving to http invoker tomorrow (isn't it RMI over http happening really?).

    As for moving to Hessian, I think we're sort of committed to Java serialization for now. Might move to it if we face scalability issues (we've used Externalizable in places where we thought it might be inefficient to let Java do it for us)

    cheers!
    Sumit.

  10. #20

    Default

    isn't it RMI over http happening really?
    The object serialization part is the same. Both use Java serialization which requires strictly matching versions of the involved classes at both ends

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •