Search code examples
javarmi

Sending very large Object over the network with RMI


I have to send a very large object of size > 100 MB over RMI

Which of these two approaches is best one ?

  1. Sending the Remote Object in RMI call

or

  1. Sending the byte array of the object in RMI call & re-creating the object at receiver?

Solution

  • There's hardly any difference, except that the second way you give yourself extra work and another source of error. The 100MB of data will totally dominate the serialization overhead.