2.0.14 • Published 5 years ago
dop-transports v2.0.14
CONNECTIVITY PROTOCOL PROPOSAL
SERVER
and CLIENT
are both nodes instances in the dop world.
STATUS
OPEN: 0
PRECONNECTED: 1
CONNECTED: 2
RECONNECTING: 3
DISCONNECTED: 4
CONNECTION
- Connection opened via WebSockets and this is the state for both nodes:
SERVER
- status: OPEN
- token_local: AAAA
- socket: 1
CLIENT
- status: OPEN
- token_local: BBBB
- socket: 1
- Both sends the instruction to start the connection
- Client sends
BBBB
- Server sends
AAAA
SERVER
- status: PRECONNECTED
- token_local: AAAA
- token_remote: BBBB
- socket: 1
CLIENT
- status: PRECONNECTED
- token_local: BBBB
- token_remote: AAAA
- socket: 1
- Both sends the local token again to confirm the connection
- Server sends
AAAA
- Client sends
BBBB
- Both nodes merge the local and remote token to create the final token (The merge must be in alphabetical order)
SERVER
- status: CONNECTED
- token: AAAABBBB
- socket: 1
CLIENT
- status: CONNECTED
- token: AAAABBBB
- socket: 1
RECONNECTION
- If the socket is closed CLIENT will try to reconnect opening a new Socket
- Server creates another node
SERVER1
- status: RECONNECTING
- token: AAAABBBB
- socket: 1 (closed)
SERVER2
- status: OPEN
- token_local: CCCC
- socket: 2
CLIENT
- status: RECONNECTING
- token: AAAABBBB
- socket: 2
- SERVER2 sends
CCCC
- CLIENT is PRECONNECTED
SERVER1
- status: RECONNECTING
- token: AAAABBBB
- socket: 1 (closed)
SERVER2
- status: OPEN
- token_local: CCCC
- socket: 2
CLIENT
- status: PRECONNECTED
- token: AAAABBBB
- socket: 2
- CLIENT sends
AAAABBBB
- SERVER1 becomes as CONNECTED
- SERVER1 gets socket from SERVER2
- We delete SERVER2
SERVER1
- status: CONNECTED
- token: AAAABBBB
- socket: 2
SERVER2 (deleted)
CLIENT
- status: PRECONNECTED
- token: AAAABBBB
- socket: 2
- SERVER1 sends
AAAABBBB
to confirm connection on CLIENT
SERVER1
- status: CONNECTED
- token: AAAABBBB
- socket: 2
CLIENT
- status: CONNECTED
- token: AAAABBBB
- socket: 2
RECONNECTION FAILS AND BECOME A NEW CONNECTION
- Socket is closed and SERVER1 is deleted because of the timeout/garbage collector.
- CLIENT will try to reconnect opening a new Socket
- Server creates another node
SERVER1 (deleted)
SERVER2
- status: OPEN
- token_local: DDDD
- socket: 3
CLIENT
- status: RECONNECTING
- token: AAAABBBB
- socket: 3
- SERVER2 sends
DDDD
- CLIENT is PRECONNECTING
- CLIENT sends
AAAABBBB
SERVER2
- status: OPEN
- token_local: DDDD
- token_remote: AAAABBBB
- socket: 3
CLIENT
- status: RECONNECTING
- token_local: AAAABBBB
- token_remote: DDDD
- socket: 3
- CLIENT is now PRECONNECTED
- SERVER2 is now PRECONNECTED
- SERVER2 sends again
DDDD
SERVER2
- status: PRECONNECTED
- token_local: DDDD
- token_remote: AAAABBBB
- socket: 3
CLIENT
- status: PRECONNECTED
- token_local: AAAABBBB
- token_remote: DDDD
- socket: 3
- CLIENT creates another node and transfer socket
- CLIENT2 sends again
AAAABBBB
SERVER2
- status: PRECONNECTED
- token_local: DDDD
- token_remote: AAAABBBB
- socket: 3
CLIENT1 (deleted)
- status: PRECONNECTED
- token_local: AAAABBBB
CLIENT2
- status: CONNECTED
- token: AAAADDDD
- socket: 3
- SERVER2 is now connected
SERVER2
- status: CONNECTED
- token: AAAADDDD
- socket: 3
CLIENT1 (deleted)
CLIENT2
- status: CONNECTED
- token: AAAADDDD
- socket: 3
DISCONNECTION
- If any node sends the
token
as instructions means is a formal disconnection. And can't be recovered. - CLIENT sends
AAAADDDD
SERVER2
- status: DISCONNECTED
- token: AAAADDDD
- socket: 3 (closed)
CLIENT2
- status: DISCONNECTED
- token: AAAADDDD
- socket: 3 (closed)
3.0.0-rc1
5 years ago
2.0.14
5 years ago
2.0.13
5 years ago
2.0.12
5 years ago
2.0.11
6 years ago
2.0.10
6 years ago
2.0.9
6 years ago
2.0.8
7 years ago
2.0.7
7 years ago
2.0.6
7 years ago
2.0.5
7 years ago
2.0.4
7 years ago
2.0.3
7 years ago
2.0.2
7 years ago
2.0.1
7 years ago
2.0.0
7 years ago
1.7.0
7 years ago
1.6.0
7 years ago
1.4.0
7 years ago
1.3.1
7 years ago
1.3.0
7 years ago
1.2.0
7 years ago
1.1.0
7 years ago
1.0.0
7 years ago