What is the difference between socket programming and RMI?
What is the difference between RMI and Servlet programming?
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:
You may want to have a look at this page also: http://martin.nobilitas.com/java/thruput.html