CPE 4001 Distributed Programming using Java

Assignment One
Semester 2, 2002

Introduction

The Chapstick shopping centre is one of Australia's largest shopping centres and hosts a large number of shops of different kinds. Chapstick already has an extensive Web site, but is contemplating moving towards an online system to support ecommerce activities.

Their new system will require a complete separation of presentation from logical aspects, so they are looking at a traditional client/server system that can later be modified to use other middleware technologies. They expect a system to be structured so that changes to clients, servers or middleware technology can be done as easily as possible.

This assignment has graded levels. The simplest version will be given a Pass if done satisfactorily, but to gain higher grades more features will have to be added.

Details

You will need to implement a client and one or more servers using a socket-based protocol.

The client will need to be able to make the following requests to the Chapstick central server:

Deliverables

You should hand in the following

You will be asked to demonstrate your system during a tutorial.

Assignment levels

General comments:

Pass level

A client talking to a single server. The server handles all of the Chapstick requests. The server keeps lists of the shops, of their types and has a catalogue for each shop. All of this can be done using local files and/or lists and tables kept in memory.

All clients and servers will be written in Java. However, you should not assume that the other end of a communication channel will be in Java - it could be in some other language such as C# or Perl. So do not use any Java-specific techniques such as serialising Java objects.

This level demonstrates that you can specify a protocol for communication between a client and a single server and implement this protocol in a simple way.

Extra level

The specification given above will gain a Pass grade if done satisfactorily. Higher grades will be given on completion of additional functionality. Each additional function will gain an extra grade (to a maximum of HD). The additional functions are

JDBC
All databases are managed by a database system such as Access, Oracle or MySQL. The server communicates with the database by JDBC calls.
This level shows that you can manage a typical 3-tier system with presentation, logic and database handled separately.
Multiple servers
Each shop runs its own server. Chapstick will forward certain requests (such as catalogue) directly to the shop's server rather than maintaining information on its own server.
This level demonstrates that you can deal with a multi-tier system with many servers at the backend
Security
All sensitive accesses are performed using security mechanisms, such as encryption and validation. Each server should be able to validate its identity using certificates
This level shows that you can handle the authorisation, security and privacy issues that can arise
Web access
Web access to the Chapstick service should be made available. This will mean a CGI script/Java servlet/etc that can act as a client to the Chapstick server. This will involve a set of Web pages and HTTP backends to handle form requests.
This is in addition to an ordinary client, not as a replacement
This level will add alternative access mechanisms to the service, which makes it Web-accessible to humans
Version control
The client should be downloadable from a Web page as a JNLP (Java Network Loader Protocol) application. This will allow the client code to be downloaded/upgraded and run.
This level will help with version control issues. In order to use it, you will need to understand and use a formal specification document.
XML
Messages should be sent as XML messages, using JAXB (or equivalent such as XStream) to marshal and unmarshal them. In this case, you will also have to specify the DTD or schema of each document.
This will give practice in using XML, including writing DTDs or schema.

Final level

The final level will be the sum of all extensions. For example, adding separate shop servers with JDBC backends and a Web frontend will be worth a High Distinction - unless things like code quality pull it down. Similarly, separate shop servers (using local files), a client downloaded by JNLP and authorisation and encryption security would also be worth an HD.

Group size

This assignment (and the next one) may be done in a group of two. While you may do this assignment individually, the marking scheme will be the same as for a group of two. You are encouraged to work in a group, with each partner doing one side each of the protocol, in order to discover the value of clear protocol specification.

Due date

The assignment is due by 12 noon, Monday 12 September, the beginning of week 9.


Jan Newmarch (http://jan.newmarch.name)
jan@newmarch.name
Last modified: Sun Jul 24 18:18:46 EST 2005
Copyright ©Jan Newmarch
Copyright © Jan Newmarch, Monash University, 2007
Creative Commons License This work is licensed under a Creative Commons License
The moral right of Jan Newmarch to be identified as the author of this page has been asserted.