It's not a secret anymore!*
The moose likes Distributed Java and the fly likes Socket vs RMI vs Servlets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "Socket vs RMI vs Servlets" Watch "Socket vs RMI vs Servlets" New topic
Author

Socket vs RMI vs Servlets

Vidyashri Badiger
Greenhorn

Joined: Aug 30, 2005
Posts: 1
What is the difference between socket programming and RMI?
What is the difference between RMI and Servlet programming?

Which is benificial and in what domain?
What are the advantages of each in which domain?
Sudha Rams
Greenhorn

Joined: May 13, 2005
Posts: 12
Hi,

Ahem! You have casually asked a few major questions in one go!

To quickly answer your questions:

RMI is about communication between objects residing in different JVMs where the JVMs can be located in different machines too i.e. it is a distributed environment. You can invoke methods on an object residing in another JVM using RMI. RMI uses socket programming behind the scenes to achieve this i.e. the developer need not worry about the n/w programming details when s/he codes to achieve RMI.

A servlet is a Java class used to extend the capabilities of a server where the server hosts applications and allows them to be accessed using a request-response type of approach. A servlet is mostly used in web applications where the client and the server communicate using the HTTP protocol. The order of communication of the HTTP request will be client -> web server -> web container -> servlet. Every HTTP servlet has a life cycle of its own.

If possible, buy yourself a copy of the Head First series of books.

You can learn more using these links:

http://java.sun.com/j2se/1.4.2/docs/guide/rmi/spec/rmiTOC.html
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/

You may want to have a look at this page also: http://martin.nobilitas.com/java/thruput.html

Hope this helps!

Regards,
Sudha
[ August 30, 2005: Message edited by: Sudha Rams ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Socket vs RMI vs Servlets
 
Similar Threads
Object Oriented Programming Vs Structured Programming
What is the difference between RMI and Socket programming?
When to use IIOP vs IDL
RMI vs Socket Programming
port vs socket