Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NX: RMI vs. Serialization

 
ulvi ugur
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I want to look at the assignment from RMI and serialization point of view. The Advanced Features of Java book from Sun says stg. like "Dont use RMI unless you see a significent benefit". So, the main adv. of RMI is clear that [BOLD]one doesn't need to encode/decode the request/response[/BOLD]; and the main disadvantage is [BOLD]being inefficient for transferring large amounts of data.[/BOLD].
I would like to hear about your insights about these two alternatives.
Cheers, Ulvi
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12014
220
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ulvi
Don't forget that RMI also hides the detail of networking from you. Because it appears that you are just calling a normal method on a normal class, it can be easier for that junior programmer to understand.
Using sockets will generally use fewer resources all round, not just bandwidth and numbers of messages sent, but also fewer processes on the server, and fewer maintenance threads running.
The disadvantages for RMI are not a big concern in this case - we are only shipping very small messages around, and we are not expecting to have thousands of users.
Have I totally failed to give you a clear idea of which one to use? Good
Regards, Andrew
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic