-
Notifications
You must be signed in to change notification settings - Fork 0
/
outline.txt
64 lines (59 loc) · 1.43 KB
/
outline.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
C = Client
H = Handshake
lguid = Last Guid
l8r = Later Rows
aR: android
iS: apple
--------
/ \
------- | Server | ------- C
\ /
--------
_ || _
|-----H---->||<----H---- |
| || |
db|<--lguid---||<--lguid---|something else
| || |
|----l8r--->db----l8r--->|
X X
Serv:
-->
| check for connections
| thread
|-|| Handshake
|-|| Get device info
|-|| if iS:
|-||-||| send last guuid
|-||-||| -->
|-||-|||=| receive rows(1 per conn)
|-||-|||=| on exit signal; break
|-||-|||=|-------------------------
|-||-||| send confirm exit signal
|-|| if aR:
|-||-||| receive guuid
|-||-||| -->
|-||-|||=| send rows(1 per conn)
|-||-|||=| at end of db; break
|-||-|||=|--------------------------
|-||-||| send exit signal ### We wroted something different but im not sure about that
|-||-||| receive exit signal
|-------------------------------------------
:
-->When get message:
| Send handshake
| Receive latest guid
| -->
|=| Send next row (starting with after guid)
|=| @ end; break
|=|-----------------------------------------
| Send exit
| Receive exit
|----------------------
C:
-->Every "so often":
| Send handshake
| Send latest guid
| Receive message row(one per conn)
| Send exit
| Receive exit
|------------------------------------