Assignment 3 - Variant A

This is one of the possible choices for assignment 3.

The goal of this assignment is an exercise of implementing the Broker pattern in order to understand the role of Middleware for distributed object-oriented applications.

Deadlines: This assignment puts together 3 lab sessions (corresponding weeks 7,8 and 9). Results should be presented no later than week 10. Delays bring a penalty of 1 point for each weeek of delay after the deadline. Optional parts have an extended deadline - week 11. Extensions of this deadline only by individual request.

General grading policy: Grades reflect your individual knowledge and contribution. Each student must complete and present their own solutions. The solutions developed "in group" or copied will be assigned 0(zero) points. Not presenting the assignment is assigned 4 points.

Problem description

Design and implement ToyORB - a minimalist toy Object Request Broker.

ToyOrb supports the development of distributed object oriented applications.

In the simplified ToyOrb model, the remote objects have operations with parameters and return types only int, float and String (no other objects). Also, it is outside the scope of this assignment to handle concurrent accesses to a remote object.

In order to show that your ToyORB implementation is working, develop with its help two different applications - InfoServer and MathServer. InfoServer offers operations get_road_info(int road_ID) and get_temp(string city). MathServer offers operations such as do_add(float a, float b) which returns the computed sum and do_sqr(float a) which returns the square root.

Detailed discussion of ToyORB: lecture notes of week 7 !

Support for network communication

You can use the code provided for transmitting bytes over a network connection. ( ByteCommunication.zip ). You can use this code as it is or freely modify it. Description of the ByteSender/ByteReceiver, ByteRequester/ByteReplyer APIs and examples of using them can be found at link with examples with ByteCommunication.

When you implement ToyORB you do not use other Middleware technologies for remote method invocation! (these are your ToyOrb's competitors ;-)

In order to see how the "competition" works, you can look at some small examples:

The bibliography is mainly in Lecture notes of week 6 and week 7 see course web page. Additional reading: The Broker Revisited. link

Incremental requirements

The requirements for this assignment are given incrementally, starting from basic requirements up to the more complex requirements. Solving the assignment up to a lower degree of complexity will bring you the partial credit for this assignment.

Standard requirements and grading milestones

  1. Minimal requirements (grade 5): Write a simple InfoClient - InfoServer application, directly over ByteSender-ByteReceiver or over Requestor/Replyer, using message communication between client and server. You can use the code given in Byte6Communication.zip
  2. Client-Dispatcher-Server (grade 6): For the InfoClient-InfoServer above, add a NamingService (Dispatcher) which is able to locate a server by its name. The NamingService (Dispatcher) will be implemented as a server with a unique fixed address which is known to all participating clients and servers.
  3. Writing clientside and serverside proxies (grade 8): for the InfoClient-InfoServer application developed as before, add clientside and serverside proxies. Proxies are implemented directly, you write their code.
  4. Complete standard broker but with directly implemented proxies (grade 10): You implement the library providing the broker API to clients and servers. Make sure that your broker library does not depend on any application-speciffic code. Demonstrate the capabilities of your broker implementing a second application (MathServer-MathClient). You still may have the application developer implementing the proxies.

Advanced optional features (Bonus points)

You can implement one or more advanced optional features to improve your ToyORB: