The Artima Developer Community
Sponsored Link

Java Community News
Comparing Java Remoting Protocols

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Frank Sommers

Posts: 2642
Nickname: fsommers
Registered: Jan, 2002

Comparing Java Remoting Protocols Posted: Jan 8, 2008 8:15 PM
Reply to this message Reply
Summary
In a set of benchmarks, Daniel Gredler compares the performance of RMI/JRMP, Oracle’s ORMI, Spring’s HttpInvoker, Caucho’s Hessian and Burlap, and three flavors of Apache XML-RPC.
Advertisement

In the beginning there was Java RMI, soon to be followed by many other remote invocation protocols and frameworks for Java objects. The need to communicate with non-Java clients, as well as through the Web, produced XML-based protocols, such as XML-RPC, but binary protocols still rule when it comes to performance, concludes Daniel Gredler in a recent article, Java Remoting: Protocol Benchmarks.

In the article, Gredler compares the performance of RMI/JRMP, Oracle’s ORMI (with and without HTTP tunneling enabled), Spring’s HttpInvoker, Caucho’s Hessian and Burlap, and three flavors of Apache XML-RPC: Sun-based, HttpClient-based and Lite-based:

The test consisted of remote invocations to a single method which takes an integer size parameter and returns a list of the specified size. The objects in the returned list each contained 10 instance variables (4 strings of about 40 characters each, 2 dates, 1 long, 1 integer, 1 double and 1 float, none of which were null). The lists returned were static, so there was no list construction overhead.

The results of the first 10 invocations were thrown away, in order to allow the VMs to “warm up.” The next 100 invocations were tallied and averaged... The tests were performed on a Windows XP SP2 machine with 2GB of RAM and a 2Ghz Core 2 Duo CPU, using Sun’s JVM 1.5.0_09. The client and server were run in two separate VMs on the same host, in order to avoid spurious networking artifacts.

The following library versions were used: Spring 2.0.6, Jetty 6.1.5, OC4J 10.1.3.2.0, slf4j 1.4.3, log4j 1.2.14, Apache XML-RPC 3.1, Commons HttpClient 3.1, and Caucho Hessian 3.1.3.

Gredler concludes that:

  • The binary protocols (RMI, ORMI, HttpInvoker and Hessian) are always faster than the XML-based protocols (Burlap and the Apache XML-RPC variants) — except for ORMI with HTTP tunneling enabled.
  • Performance is pretty even amongst the binary protocols — except for Hessian, which performs well only when compared to the XML-based protocols, and ORMI with HTTP tunneling enabled, which performs on a par with the XML-RPC variants.
  • Burlap has much better performance than the XML-RPC variants. Native RMI and Hessian 2 have the best performance until the remote method invocations start returning larger lists, at which point vanilla ORMI takes a slight lead.
  • Changing Apache XML-RPC’s transport factory does not seem to have a very large effect on performance.
  • It’s amazing how fast standard ORMI is, compared to ORMI with HTTP tunneling enabled.
  • Hessian 2 bears watching!

What are your preferred remote object protocols? What do you think is the future of such protocols in the context of rich-client applications?

Topic: Yakov Fain on Flex's Remote Protocol Previous Topic   Next Topic Topic: Hibernate with Scala

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use