| Author |
Speed differential between RESTFul webservices and RMI
|
Tim Sparg
Ranch Hand
Joined: Dec 29, 2006
Posts: 40
|
|
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
RMI SPECIFICS
REST WS SPECIFICS
|
There is no insanity so devastating in man's life as utter sanity
|
 |
 |
|
|
subject: Speed differential between RESTFul webservices and RMI
|
|
|