RMI via JMS is a small java library that allows you to do Java Remote Method Invocations (RMI) via a Java Message Service (JMS) provider like ActiveMQ
Pull request Compare This branch is even with chirino:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
src
webgen
.gitignore
changelog.md
license.txt
pom.xml
readme.md

readme.md

RMI via JMS

Description

RMI via JMS is a small java library that allows you to do Java Remote Method Invocations (RMI) via a Java Message Service (JMS) provider like ActiveMQ.

Features

  • Supports the same development model that standard RMI uses.
  • Supports a simpler development model what works with any kind of java object.
  • Can issue asynchronous one way method invocations
  • Objects can explicitly be bound to user defined JMS destinations.
  • The JMS quality of service can be controlled via method level annotations.

Synopsis

RMI is simple and powerful distributed development technology. Unfortunately, the default Java implementation suffers from several shortcomings which are all associated with the fact method invocations over JRMP require the client's stubs/proxies to create TCP connections to the JVMs which have exported the objects. You might think, "So what?". But if you look at the properties of JRMP, you will notice that:

  • Connectivity is very brittle in larger network scenarios due to:
    • RMI servers using of random TCP ports
    • Proxies contain the server address and run into problems when the server can be address multiple ways.
    • Therefore, applications exposing RMI services do not typically setup firewalls and are usually only accessed in local network scenarios.
  • It is very hard to load balance client requests to multiple servers.
  • If the server fails, or the network fails then the method call fails.
  • It does not support broadcasting method invocations to multiple servers.

Lets compare that with the properties of using RMI over JMS:

  • Proxies do NOT connect directly to the servers.
  • Proxies and servers create TCP connections to the JMS provider.
  • The leading JMS providers run on well known ports, can federate on multiple hosts, and can optimize WAN traffic.
  • Servers bind to JMS destinations which decouples a proxies from having to know on what host/port the server bound to.
  • Multiple servers can bind to the same destination to achieve one of the following:
    • queue case: server load balancing and fail over
    • topic case: request broadcasting

Project Links