Tuesday, July 24, 2007

Spontaneous Remote Method Invocation (SRMI)

What will you do if you want some components to communicate over a network ?
Well, you can use sockets and write your own protocol. You can use some Remote Procedure Call framework, like Remote Method Invocation (RMI) or CORBA (for Java software).
Of course in order to use them you have to learn them first, which takes precious time if you have a tight deadline. The other thing is that you will modify your code to be RMI aware (if you use RMI) and
to extract some interface, and write extra logic related to RMI registry and object querying and other stuff. For that reason we invented a new remote procedure call framework based on RMI that you can spontaneously. Meaning you don't need to be aware that it exists, and the code doesn't need to change at all.
The main goal was that we will develop our clustering server as a single unit and split it up on multiple servers with minimum of fuss.
It's approach was to create wrapper classes that imitates the expected class hierarchy of the RMI in run time. They would wrap your classes and abstract all remoting-related issues from them such that the classes would be remoted as RMI remote objects without knowing or changing the code (not even changing the byte-code).
It is hosted on google code hosting http://code.google.com/p/srmi .