• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Socket vs RMI vs Servlets

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic