Java Remoting – Benchmark

Recently, I am looking into Java remoting. I need to find the fastest protocol in remoting spectrum in order to ship a large number of objects across the net. Here I found a great article that experimented several popular remoting protocols and did a comparison. The protocols covered include:

  1. RMI - Java remoting standard, each method needs to throw a checked RemoteException and need to generate stubs and skeletons.
  2. Hessian 1 and 2 – Lightweight binary protocol from Caucho, HTTP-based, Custom binary serialization mechanism. Support for several platforms PHP / Python / C++ / C# / Objective C / Ruby / Java.
  3. HttpInvoke - Spring Java-to-Java remoting, HTTP-based, Java serialization just like RMI, easy to set up.
  4. Burlap – XML-based lightweight protocol from Caucho, HTTP-based, Custom XML based serialization mechanism, Do not know support different than for Java
  5. Apache XML-RPC

From the result, binary protocols are much faster than xml ones. HttpInvoke from Spring is great but you need to use Spring client. Hessian is good but it has known issues regarding the serialization of Hibernate objects in combination with lazily-initialized collections. The issue looks like being taken care of in Hessian 2. It is worth to take a look. If you want to ship xml across, burlap could be a good option.

Leave a comment

0 Comments.

Leave a Reply

You must be logged in to post a comment.