Phase II: Bank-Balance Computation

Due: 9:00am Monday, Oct. 15

General Instructions. Students are required to work together in teams. You may work in the team you used for Phase I or you may form a new team. An assignment submitted on behalf of a "team" having fewer than 3 or more than 5 students will receive a grade of F. All members of the team are responsible for understanding the entire assignment.

This assignment builds on work done in Phase I. Feel free to use any team's solution to Phase I as the basis for your solution to Phase II.

No late assignments will be accepted.

Academic Integrity. Collaboration between groups is prohibited and will be treated as a violation of the University's academic integrity code.

Background: Computing a Bank Balance

Once upon a time, banks opened at 9am and closed at 3pm. This left plenty of time each day for that day's transactions to be processed, and doing that processing was easy because the bank's accounts were not being changed by concurrent customer activity. A 21st Century bank will likely be open to its customers 24 hours a day. Networked computers should allow transactions to reach the bank's branches from anywhere in the world that is "wired". But, suitable protocols must be employed, so that customer transactions can run concurrently with the bank's back-office daily processing.

In this phase of the cs514 project, you will program a distributed snapshot algorithm that computes the assets of the distributed bank implemented for phase I. Doing the exercise should:

What to Build

Extend the branch GUI from Phase I with a "button" that allows a user to request an all-bank snapshot. Activating this button causes a message to be sent to the local branch server. That message should lead to taking a global snapshot of (i) all non-zero account balances at all branches and (ii) any in-process Transfer operations. This global snapshot should be displayed in pieces, with a separate piece being displayed by the (local) branch GUI for each of the branches. Specifically, at each branch, that branch's GUI should display:

Note that, for this application, snapshot information is not being sent from branch to branch and is not being assembled at a single process.

As mentioned in class, descriptions of the Chandy-Lamport snapshot algorithm can be found in:

S. Mullender (editor). Distributed Systems, Second Edition. ACM Press, Addison-Wesley Publishing Company, Reading Mass., 1994.

K.M. Chandy and L. Lamport. Distributed snapshots: Determining global states of distributed systems. ACM Transactions on Computer SystemsVol. 3, No. 1, pp 63-75.

C. Morgan. Global and logical time in distributed algorithms. Information Processing Letters Volume 20, pages 189-194.

Although you may continue to assume that message delivery is reliable (for purposes of this phase), any other guarantees you require about communications links that connect branches will have to be discharged by implementing suitable protocols.

Submission Procedure. Create a directory containing the files you wish us to grade. Call this directory xxxxx0, where xxxxx is the Cornell network id of the team member whose net id is alphabetically smallest of your team. Then copy this directory to the following folder:

\\Goose\courses\cs514-fall01\proj02.submit

Don't be disturbed by warnings informing you that the file cannot be accessed after it has been copied.

Should you wish to revise your submission after you have copied it to our folder, then simply correct the files and re-copy the entire directory---but this time use the name xxxxx1. Revisions to that should be named xxxxx2, and so on. We will grade only the largest-numbered file of a series. No late submissions will be accepted.

Your directory should contain the following files (at least):

TEAM which contains the names (and net-ids) for all team members. Also, for each team member give a 1 or 2 paragraph description of the tasks this team member performed and the number of hours this required.

README which contains

TOPO should specify an interesting interconnection topology for a multi-branch bank that will be used to illustrate the operation of your system.

TOPOexp should specify what requirements the topology must satisfy in order for your snapshot algorithm to work correctly. For example, do you require that every link be bi-directional? Obviously, imposing fewer restrictions is better.

TestPlan should describe the process and any tools (i.e. additional programs) you wrote in order to test your system.

JAVA source file that contain the Java source needed to compile and test your system.

Grading. Your grade will be based on the following elements: