Lecture Notes Twenty-Two: Java Networking

This lecture I'd like to help a bit with the homework and also discuss Java networking. A discussion of what's needed for the homework (or what might be needed, depending on your progress) will be part of the lecture today. Java networking is not part of A201 or A202 usually so we need to look at it first in this class. There are three networking methodologies we will be looking at:

  1. regular sockets
  2. remote method invocation
  3. specialized classes for HTTP
For all of these I will be using notes that I wrote before the semester started. So dates will vary, and you will see that they have been used in various courses over time.

Now (today) I would like to go through a relatively new (1998) method of networking that is Java specific: remote method invocation. This relates to other standards by fitting in between RPC and CORBA. Regardless we just want to illustrate the simplicity and power of the method.

Our development will be in three stages.

  1. Review the RMI Recipe
  2. Describe the Essence of RMI
  3. Implement callbacks, and a simple (standalone) Chat Application
The recipe is very parsimonious (and good). I am particularly proud of the smaller document (the essence of RMI), at least that's how I feel now. The implementation of the chat application with callbacks also makes me feel a bit elated, and I hope you will like it. We need it as a reference before we move to the web based applet servlet chat application next week.


Last updated: Nov 6, 2001 by Adrian German for A348/A548