Skip to content

Commit

Permalink
Update clockwall instructions
Browse files Browse the repository at this point in the history
Signed-off-by: Obed Muñoz <[email protected]>
  • Loading branch information
obedmr committed Oct 7, 2020
1 parent 158bed8 commit ffc8b28
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions labs/clockwall/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,27 @@ Lab - ClockWall

Modify the [`clock2.go`](./clock2.go) to accept a port number, and write a program `clockWall.go`, that acts as a client of several clock servers at once, reading the times from each one and displaying the results in a table, akin to the wall of clocks seen in some business offices. If you have access to geographically distributed computers, run instances remotely; otherwise run local instances on different ports with fake time zones.

On this lab, it's recommended to run your programs in 2 or more terminals; 1 for the `clock servers` and 1 or more for the `clients`.
On this lab, it's recommended to run your programs in 2 or more terminals; 1 for per `clock server` and 1 or more for the `clients`.

- **Terminal 1 :** Clock Servers (initializing 3 clock servers)
- **Terminal 1 :** Clock Server 1 - TZ=US/Easterm
```
# Clock Servers initialization
# The following 3 commands are setting up 3 clock2 processes in the same terminal.
$ TZ=US/Eastern go run clock2.go -port 8010 &
$ TZ=Asia/Tokyo go run clock2.go -port 8020 &
$ TZ=Europe/London go run clock2.go -port 8030 &
# Clock Server initialization
$ TZ=US/Eastern go run clock2.go -port 8010
```

- **Terminal 2:** ClockWall Client
- **Terminal 2 :** Clock Server 2 - TZ=Asia/Tokyo
```
# Clock Server initialization
$ TZ=Asia/Tokyo go run clock2.go -port 8020
```

- **Terminal 3 :** Clock Server 3 - TZ=Europe/London
```
# Clock Server initialization
$ TZ=Europe/London go run clock2.go -port 8030
```

- **Terminal 4:** ClockWall Client
```
# Starting clockWall client
$ go run clockWall.go NewYork=localhost:8010 Tokyo=localhost:8020 London=localhost:8030
Expand Down

0 comments on commit ffc8b28

Please sign in to comment.