120 likes | 243 Views
Programming Project #2 Distributed Game of Life. Due Tuesday, April 10. Assignment. Implement a distributed version of the Game of Life based on the concurrent version of Project #1. Objective. Build a non-trivial distributed application
E N D
Programming Project #2Distributed Game of Life Due Tuesday, April 10 Project 2
Assignment • Implement a distributed version of the Game of Life based on the concurrent version of Project #1 Project 2
Objective • Build a non-trivial distributed application • Learn to use remote procedure call or remote objects Project 2
Distributed Game of Life • Divide grid into fixed-size subgrids • 3232 cells for this project • Each subgrid is computed by a process on a physically separate machine • Called a player • Each player must get information about cells on boundary from neighboring players • Each player must tell neighboring players about its cells on its boundary Project 2
Distributed Game of Life (continued) • First, start player services on remote hosts! • Invoking Distributed Life Dlife X Y gen initPattern hostList logFile pause • X, Y are number of players in x- and y-dimension • gen is number of generations to play • initPattern is file with initial grid pattern • hostList is a file containing the names of the hosts for distributed players • logFile, pause for debugging Project 2
Distributed Game of Life (continued) • File initPattern • Same as file of Project #1 • File hostList • List of hosts on which to services are found • One line per host • Each line contains host name • File logFile • File to which log method or function writes log entries Project 2
Distributed Game of Life (continued) • Parent process starts each player by remote function or method call • Initial value of subgrid (3232 array) • Array of objects denoting nearest neighbors • Null object player is on a boundary • Waits for players to call it with results from each generation • Also implements remote logging service Project 2
Testing • Distributed programs are harder than concurrent ones • Logging is common technique to look at sequence of remote function or method calls • Remote logging function • Callable from anywhere • By parent process or any player Project 2
Testing (continued) • What to log • Identity of player • Player’s timestamp • Other information — e.g., • about to invoke method m of player p (include args) • just returned from invocation, result was … • waiting for … • Hint: develop the remote logging function first, before anything else! Project 2
Submission • Submit via myWPI dropbox • Source code & header files • Makefile • Script for starting services • Test patterns and output • Write-up • We will • Compile/build using make • Run your test cases • Run our test cases Project 2
Grading • Successful submission — 10% • Clear, cogent write-up — 15% • Success build on Fossil Lab machines with no errors or warnings — 10% • Successful operation of remote logging function — 15% • Successful run of your test patterns — 25% • Successful run of our test patterns — 25% Project 2
Questions? Project 2