2007-03-19

RPC over JMS with Load Balancing

I've been working on putting together a very simple way to do RPC such that they're load balanced to a set of servers implementing the interface in question. After not to much reading, I realized that this path has been trod on before. It took me a little time, but I did manage to put together a test using ActiveMQ http://activemq.apache.org/, Lingo http://lingo.codehaus.org/, and Spring http://www.springframework.org/. ActiveMQ provides the JMS Queues and consequently the load balancing. Lingo provides a request/reply mechanisms using JMS Queues, which normally provide only oneway asynchronous messaging. (That's not 100% true, but we'll not get into the details.) On top of all that, Spring Remoting can export any POJO implementing a Java interface as a service. There are a few too many layers to this whole thing, coupled with a bit too much use of reflection for my taste, but it does work. Now to test its performance...

No comments: