Skip to content

Commit 8fac13a

Browse files
committed
Updated assignment and report
1 parent b85327f commit 8fac13a

File tree

2 files changed

+54
-13
lines changed

2 files changed

+54
-13
lines changed

Diff for: Assignment.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ We call clients of the Chitty-Chat service Participants.
3535
- [ ] Describe how you have implemented the calculation of the Lamport timestamps
3636
- [ ] Provide a diagram, that traces a sequence of RPC calls together with the Lamport timestamps, that corresponds to a chosen sequence of interactions: Client X joins, Client X Publishes, ..., Client X leaves. Include documentation (system logs) in your appendix.
3737
- [ ] Provide a link to a Git repo with your source code in the report
38-
- [ ] Include system logs, that document the requirements are met, in the appendix of your report
38+
- [x] Include system logs, that document the requirements are met, in the appendix of your report
3939
- [ ] Include a readme.md file that describes how to run your program.
4040

4141
## Grading notes

Diff for: REPORT.md

+53-12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# CHITTY-CHAT
22

3-
## 1 Streaming
3+
## 1. Streaming
44

55
When deciding between server-side streaming, client-side streaming, or bidirectional streaming,
66
it's important to understand the differences between each.
@@ -27,31 +27,72 @@ chat applications or collaborative tools.
2727

2828
Since this application is a chat server, bidirectional streaming is best for the purpose of the project.
2929

30-
## 2 System architecture
30+
## 2. System architecture
3131

3232
This project uses a client-server architecture for communication. The client connects to the chat server and messages
3333
is streamed between the server and the client. The clients are never directly exposed to eachother.
3434

35-
## 3 RPC methods
35+
## 3. RPC methods
3636

37-
- [ ] Describe what RPC methods are implemented, of what type, and what messages types are used for communication
37+
Only 1 RPC method is used called broadcast. It takes a stream of chat events and returns a stream of chat messages.
3838

39-
## 4 Lamport timestamps
39+
```proto
40+
service Chat {
41+
rpc Broadcast(stream ChatEvent) returns (stream ChatMessage);
42+
}
43+
```
44+
45+
A chat event is either a join, leave or message event.
46+
47+
```proto
48+
message ChatEvent {
49+
oneof event {
50+
UserJoin join = 2;
51+
UserLeave leave = 3;
52+
ChatMessage message = 4;
53+
}
54+
55+
message UserJoin {
56+
string username = 1;
57+
}
58+
59+
message UserLeave {
60+
string username = 1;
61+
}
62+
63+
message ChatMessage {
64+
string username = 1;
65+
string message = 2;
66+
}
67+
}
68+
```
69+
70+
The RPC then turns the event into a message and streams it back to the client.
71+
72+
```proto
73+
message ChatMessage {
74+
uint64 timestamp = 1;
75+
string username = 2;
76+
string message = 3;
77+
}
78+
```
79+
80+
## 4. Lamport timestamps
4081

4182
- [ ] Describe how you have implemented the calculation of the Lamport timestamps
4283

43-
## 5 Diagram of lamport
84+
## 5. Diagram of lamport
4485

4586
- [ ] Provide a diagram, that traces a sequence of RPC calls together with the Lamport timestamps, that corresponds to a chosen sequence of interactions: Client X joins, Client X Publishes, ..., Client X leaves. Include documentation (system logs) in your appendix.
4687

47-
## Github repository
88+
## 6. Github repository
4889

49-
- [ ] Provide a link to a Git repo with your source code in the report
90+
<https://github.com/Kanerix/chitty-chat>
5091

51-
## System logs
92+
## 7. System logs
5293

53-
- [ ] Include system logs, that document the requirements are met, in the appendix of your report
94+
The [systems logs](https://github.com/Kanerix/chitty-chat/blob/main/example.log) can be found in the GitHub repo.
5495

55-
## README.md
96+
## 8. README.md
5697

57-
- [ ] Include a readme.md file that describes how to run your program.
98+
The [README.md](https://github.com/Kanerix/chitty-chat/blob/main/readme.log) can be found in the GitHub repo.

0 commit comments

Comments
 (0)