I’m looking for existing middleware solutions that address aspects of service clustering/distribution for load-balancing and availability. I’m looking into building up my own infrastructure for this based on a messaging system (more specifically, JMS). However, if possible I’d rather use something which already exists.
The system should have the ability to run various services on a number of computers. Based on service descriptions, the system should be able to figure out how many instances of a specific service to start in the cluster. Based on pending service requests, it should dynamically adjust the number of services running. Monitoring services and deploying new versions of services should also be handled by the system.
By services, I mean “independent units of functionality” that has a predefined interface. Clients would just know the interface and the middleware should take care of making sure that the service is running on enough nodes in order to answer incoming requests made through the interface.
It should be something that integrates well with Java. Some of my services are implemented as native code but I have a good solution for wrapping those into a Java based service.
I’ve looked at some middleware/ESB solutions like ICE and Mule but I didn’t find them to address the aspects of dynamic load service provisioning which I described above very well (if at all). So I’m wondering what else might be out there that somebody here would want to recommend taking a look at…
I would recommend you to look deeper into OSGi:
- it has a fairly dynamic module system that allows you to roam your services across the network
- there are existing open-source offerings that you can build-upon: Eclipse Equinox and Virgo, Apache Felix and Karaf, Knopflerfish, Concierge, Glassfish 3, etc (comparison)
- as for the remoting side, the OSGi 4.2 has Remote Services specification for which there are several implementations out there. More notably, ECF seems to be one implementation that could satisfy your needs, if you want to use JMS (article on dzone).
As a final note, you could take a look at Paremus Service Fabric – from the description it sounds quite similar to the beast that you are trying to build (except that it uses JINI instead of JMS). If nothing else, it could be a source for inspiration.
They also used to have an open-source version called Newton but that was closed due to lack of interest. It was mentioned that it lived on under the name of Service Fabric Community Edition but I currently I could not find any reference to it on their website (most probably it was just cancelled).
Finally, here is one more project for inspiration: Bundle-Bee – transparent, grid-distributed OSGi computing. Most probably there are more similar projects out there.