[Beds] Java RMI vs TCP Sockets

Darren Parkinson darren.parkinson at gmail.com
Wed Dec 14 12:46:54 GMT 2005


Obviously it is tricky to compare since RMI is running over TCP anyway, but
the following provides some interesting information regarding differences in
bandwidth usage and response times between the two approaches:

http://lisas.de/~adrian/master/rmi.pdf

Also, interesting bit at the end of this article regarding sockets
programming with serialisation against RMI:

http://java.sun.com/developer/technicalArticles/ALT/sockets/

RMI would be used in a Java only environment and presents a more simple
environment for developers who are not familiar with sockets programming.
It is automatically thread safe, whereas if you were doing sockets
programming, you'd have to do this yourself.

As in the first URL, I would definitely recommend the use of something like
Ethereal/tcpdump to look at the packets and see exactly what traffic is
going backwards and forwards -- especially if this is the level at which you
are investigating how connections are established/carried out/terminated.

Hope this helps.
Darren.




On 12/14/05, Stephen Elliott <techweb at ntlworld.com> wrote:
>
> Hi,
>
> Thanks for everyones help with the Java programs I was writing.
>
> I now need to explain in my report the differences between RMI and TCP
> Sockets with regards to the following.
>
> How connections are establisbed
> How conversations are carried out
> How connections are terminated
>
> So far I have came up with the fact that RMI is a tidy but slower way of
> implementing this. Hides most from the user. TCP Sockets are the DIY
> approach and is faster and programmer has more control.
>
> In TCP you need to open and close sockets which you son't need to do in
> RMI
> as you are calling a remote method.
>
> Are there any additional points that anyone can think of?
>
> Many Thanks
> Steve...
> --
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.1.371 / Virus Database: 267.13.13/199 - Release Date:
> 13/12/2005
>
>
> _______________________________________________
> Beds mailing list
> Beds at mailman.lug.org.uk
> http://mailman.lug.org.uk/mailman/listinfo/beds
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.lug.org.uk/pipermail/beds/attachments/20051214/519c4417/attachment.html


More information about the Beds mailing list