oval


Centre International de Mathİmatiques Pures et Appliquİes
International Center for Pure and Applied Mathematics


A CIMPA-UNSA-INRIA-UNESCO-VIETNAM SCHOOL ON


Objects and Network
Client/Server Exercises


Emmanuel Chailloux
Emmanuel.Chailloux@lip6.fr
http://www-spi.lip6.fr/~emmanuel



Exercises : Client/Server
Exercises

To try some Internet services

HTTP protocol and HTML language

  1. to run an HTML browser, and read a page from the local server.
  2. to put on your page your applet from Exercise 1.1
Telnet

The Telnet program (for remote connections) allows also to connect himself on another port (for exemple port 80 to connect you on an HTTP server). The command syntax is :
c:\windows\telnet http-server 80
At this moment, you can send to the HTTP server an HTTP request. You need to configure the telnet application in order to see a local echo and to save the answer on a log file.
  1. to try a GET request : GET index.html HTTP/1.0 <CrLf> <CrLf>
  2. to try a HEAD request : HEAD index.html HTTP/1.0 <CrLf> <CrLf>
Traceroute

The windows command tracert corresponds to the Unix command traceroute which indicates the route between your computer and the computer target.

CAPITALIZER server

To Write it ans to test it with several clients, on the same machine and on different machines.

Some Sources



HTTP reader

  1. To modify the HTTP reader in order to accept different kinds of HTTP requests. To try it with a HEAD request.

  2. To parse the answer to recuperate all the images URL. HTML simplified syntax for images is the following :
    <IMG SRC="path1/path2/name">
    
    To keep a URL list for images.

  3. How can you visualize this list?

Some Sources



To adapt the Producer/Consumer

The shop becomes a server. There are two kinds of clients : Producer and Consumer. Each client will be manage by a thread on the server.

  1. To define a small protocol to put and to get a product from the shop. You need to define also an acknowledgment to confirm to the Producer that its product will be well received by the server. A product can be viewed as a number.
To adapt the robots world

The world, where robots move, becomes the server. Each robot is a client. You need to define a protocol between server and clients.

This protocol must manage : The server will display the world state in text or graphic mode.
  1. To define the communication protocol.
  2. To write the server.
  3. To write a basic client (for example the random robot).
  4. To test them with three clients.
  5. To define others kinds of clients and to test them.

Example of using JDBC

A small example, which gets a connection to a ``yellow pages'' database. The {\tt{Access} class can send a ``generic'' request to the database.