Kizuna-architecture
sequenceDiagram
rect rgb(0, 255, 0)
Kizuna_UI_SENDER-->>P2P Comm DNA:1. Create P2PCommDNA with DNA Property (initializeP2PDNA)
end
rect rgb(0, 255, 0)
Kizuna_UI_SENDER-->>P2P Comm DNA: 2. ensure that the agent was able to join the DNA
end
alt Failed to join DNA
loop Until DNA joined
rect rgb(0, 255, 0)
Kizuna_UI_SENDER-->>P2P Comm DNA: 3. limitedly retry joining DNA
end
end
end
P2P Comm DNA-->>P2P Comm DNA: 4. validate_agent() check if the address of the agent is in members property
Kizuna_UI_SENDER-->>Lobby_DNA_SENDER: 5. call request_to_chat zomeFunc in request zome
Lobby_DNA_SENDER-->>Lobby_DNA_RECEIVER: 6. HDK::API::SEND to receiver agent in lobby DNA to request the receiver to join p2pDNA
alt receiver online
par 7.1
Lobby_DNA_RECEIVER-->>Lobby_DNA_SENDER: receive callback: return request_received
and 7.2
Lobby_DNA_SENDER-->>Kizuna_UI_SENDER: return request_pending
and 7.3
Kizuna_UI_SENDER-->>Kizuna_UI_SENDER: render chat screen
and 7.4
alt sender exist in contact
Lobby_DNA_RECEIVER-->>Kizuna_UI_RECEIVER: receive callback: emit_signal with in_contact: true
else sender doesnt exist in contact
Lobby_DNA_RECEIVER-->>Kizuna_UI_RECEIVER: receive callback: emit_signal with in_contact: false
end
and 7.5
rect rgb(255,160,122)
Kizuna_UI_RECEIVER-->>P2P Comm DNA: onSignal: join the DNA (joinChatResolver)
end
end
else receiver offline
par 7.1
Lobby_DNA_RECEIVER-->>Lobby_DNA_SENDER: receive callback: return recipient_offline
and 7.2
Lobby_DNA_SENDER-->>Lobby_DNA_SENDER: commit request_notif entry and link it to receiver agent_address
and 7.3
Lobby_DNA_SENDER-->>Kizuna_UI_SENDER: return receiver_offline
and 7.4
Kizuna_UI_SENDER-->>Kizuna_UI_SENDER: render chat screen
and 7.5
Kizuna_UI_RECEIVER-->>Lobby_DNA_RECEIVER: call fetchRequestNotifs zomeFunc in request Zome when back online
and 7.6
rect rgb(255,160,122)
Kizuna_UI_RECEIVER-->>P2P Comm DNA: join the DNA (joinChatResolver)
end
end
end
rect rgb(255,160,122)
Kizuna_UI_RECEIVER-->>P2P Comm DNA: 8. ensure that the agent was able to join the DNA
end
alt Failed to join DNA
loop Until DNA joined
rect rgb(255,160,122)
Kizuna_UI_RECEIVER-->>P2P Comm DNA: 9. limitedly retry joining DNA
end
end
end
P2P Comm DNA-->>P2P Comm DNA: 10. validate_agent()
Kizuna_UI_RECEIVER-->>P2P Comm DNA: 11. getMessages()
alt messages exist
alt address in contact
Kizuna_UI_RECEIVER-->>Kizuna_UI_RECEIVER: 12. render chat in messages page
else address not in contact
Kizuna_UI_RECEIVER-->>Kizuna_UI_RECEIVER: 12. render chat in messages request page
end
end
or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Syncing