Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Speed differential between RESTFul webservices and RMI  RSS feed

Tim Sparg
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My company is gearing up to migrate our legacy application to Java - more specifically a Netbeans RCP frontend and a EJB 3 backend.

We are looking at using RESTful web services as communication layer, however their where some concerns raised about how much slower RESTful WS would be than RMI.
In the end I decided to run some tests to see how bad the times actually where as opposed to everybodies certified opinions!

The test was a 10 000 person(with contact Details) transfer from App Server to client.
(source code will follow at the bottom of the post)
My table headers doesn't seem to want to align and I have no idea why there is a massive gap in my post. If somebody knows how to fix it, please do so

RMI REST-xml REST-json
POI Actual Time Time btwn POI Actual Time Time btwn POI Actual Time Time btwn POI
startup 20:06:07.7 20:14:35.35 20:21:07.7
beforeInit 20:06:09.9 00:00:02.2 20:14:35.35 00:00:00.0 20:21:07.7 00:00:00.0
beforeFirst 20:06:16.16 00:00:07.7 20:14:36.36 00:00:01.1 20:21:08.8 00:00:01.1
AfterFirst 20:06:37.37 00:00:21.21 20:14:52.52 00:00:16.16 20:21:25.25 00:00:17.17
AfterSecond 20:06:55.55 00:00:18.18 20:15:00.0 00:00:08.8 20:21:36.36 00:00:11.11
Total Time 00:00:47.47 00:00:25.25 00:00:29.29

(My table headers doesn't seem to want to align, if somebody has better html editing skill than me, please fix it!)

These test results are completely out of whack with everything that I understand about RMI, how can web services be almost twice as fast?
Does the appServer interfere with the RMI, and if that is the case, why doesn't it interfere with the web services?

Here is the Entity that is being sent over the wire, note the multiple contactDetails beneath the Person



  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!