Skip to content

Commit 35828c6

Browse files
authored
fix: move concepts and message send/recieve flow (#62)
* fix: add ecrypted message flow * fix: typo * feat: added documentation to install from macos and source code (#63)
1 parent a854b4f commit 35828c6

File tree

10 files changed

+135
-50
lines changed

10 files changed

+135
-50
lines changed
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
## Message Sequence
2+
3+
This section describes the overall message flow when using the NodeX agent.
4+
5+
There are two possible message flows when using the NodeX agent.
6+
7+
1. Verifiable Message
8+
2. E2E Encrypted (VM)
9+
10+
#### Verifiable Message
11+
12+
NodeX Agent sends and receives verifiable messages between devices.
13+
Below is a sequence diagram of the message from transmission to reception.
14+
15+
```{mermaid}
16+
sequenceDiagram
17+
autonumber
18+
actor app1 as Your App1
19+
participant agent1 as NodeX Agent
20+
actor app2 as Your App2
21+
participant agent2 as NodeX Agent
22+
participant studio as NodeX Studio
23+
24+
app1->>+agent1: /create-verifiable-message
25+
agent1->>agent1: create verifiable message
26+
agent1->>+studio: /save-create-event(message-activity)
27+
studio->>studio: store message-activity
28+
studio-->>-agent1: response
29+
agent1-->>-app1: response(verifiable message)
30+
31+
app1->>app2: send(app message)
32+
app2->>+agent2: /verify-verifiable-message
33+
agent2->>agent2: verify received message
34+
agent2->>+studio: /save-verify-event
35+
studio->>studio: verify message-activity.message-id
36+
studio-->>-agent2: response
37+
agent2-->>-app2: response
38+
app2->>app2: processing received messsage...
39+
40+
```
41+
42+
43+
#### E2E Encrypted (VM)
44+
45+
NodeX Agent sends and receives E2E Ecrypted verifiable messages between devices.
46+
Below is a sequence diagram of the message from transmission to reception.
47+
48+
```{mermaid}
49+
sequenceDiagram
50+
autonumber
51+
actor app1 as Your App1
52+
participant agent1 as NodeX Agent
53+
actor app2 as Your App2
54+
participant agent2 as NodeX Agent
55+
participant studio as NodeX Studio
56+
57+
app1->>+agent1: /create-didcomm-message
58+
agent1->>agent1: create encrypted verifiable message
59+
agent1->>+studio: /save-create-event(message-activity)
60+
studio->>studio: store message-activity
61+
studio-->>-agent1: response
62+
agent1-->>-app1: response(encrypted verifiable message)
63+
64+
app1->>app2: send(app message)
65+
app2->>+agent2: /verify-didcomm-message
66+
agent2->>agent2: verify received message
67+
agent2->>+studio: /save-verify-event
68+
studio->>studio: verify message-activity.message-id
69+
studio-->>-agent2: response
70+
agent2-->>-app2: response
71+
app2->>app2: processing received messsage...
72+
73+
```
74+

source/concepts/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ In this section, we would like to discuss our thoughts, concepts, and goals for
55
```{toctree}
66
:hidden:
77
10-data-format.md
8+
30-message-sequence.md
89
```

source/getting-started/index.md

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -23,46 +23,6 @@ After configuring the agent, it typically takes approximately 30 minutes for the
2323
During this time, messages can't be sent and received. Kindly wait for a while and then spin up the agent.
2424
```
2525

26-
## Message Send/Receive Flow
27-
28-
This section shows how to send a message to NodeX Hub via NodeX Agent, receive a message from NodeX Hub, and notify that a message is read to NodeX Hub.
29-
30-
This is a simple sequence diagram of sending a message and receiving it.
31-
32-
```{mermaid}
33-
sequenceDiagram
34-
autonumber
35-
actor app1 as Your App1
36-
participant Agent1 as NodeX Agent
37-
participant Hub as NodeX Hub
38-
participant Agent2 as NodeX Agent
39-
actor app2 as Your App2
40-
41-
%% Send Message Flow
42-
app1->>Agent1: /transfer
43-
Note left of Agent1: Message
44-
45-
Agent1->>Hub: /send_message
46-
Note left of Hub: Message(DIDComm Encrypted)
47-
48-
%% Receive Message flow
49-
app2->>+Agent2: /receive (WebSocket connection)
50-
51-
Agent2->>Hub: /get_message_list
52-
Hub-->Agent2: /get_message_list response (if exists)
53-
Note left of Agent2: Message(DIDComm Encrypted)
54-
Agent2-->>app2: Message
55-
56-
%% Ack Message flow
57-
app2-->>Agent2: Ack message
58-
Note left of app2: MessageId
59-
Agent2-->>Hub: /ack_message
60-
Note left of Agent2: MessageId(DIDComm Encrypted)
61-
62-
Agent2->>-app2: /receive (WebSocket connection) closed
63-
64-
```
65-
6626
## How to Send Messages in NodeX
6727

6828
In this section, you will see where you can use NodeX to send and receive messages addressed to you.

source/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ NodeX is an open-source toolkit for building end-to-end secure messaging between
1818
```{toctree}
1919
:hidden:
2020
introduction/index.md
21+
concepts/index.md
2122
features/index.md
22-
getting-started/index.md
2323
installation/index.md
24+
getting-started/index.md
2425
configuration/index.md
2526
troubleshooting/index.md
2627
contributing/index.md
27-
concepts/index.md
2828
reference/index.md
2929
```

source/installation/00-overview.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,24 @@
11
# Overview
22

3+
The NodeX agent is currently available as a pre-built binary download from the release page in the GitHub repository. In the future, we are working on making it easier for developers to install the agent by using the distribution's official package management system to provide a better installation and development experience.
4+
5+
It is currently confirmed to work under Ubuntu, Debian, Yocto, and macOS.
6+
Future plans include providing pre-built binaries for Windows. In addition, we plan to provide C/C++/Rust SDK for Linux/macOS and C/C++ SDK for RTOS (FreeRTOS, AzureRTOS).
7+
38
Currently, NodeX officially offers the following types of pre-built binaries.
49

5-
- Linux OS (x86_64)
10+
- Linux (x86_64)
11+
- macOS (x86_64)
612

7-
The NodeX agent is currently available as a pre-built binary download from the release page in the GitHub repository. In the future, we are working on making it easier for developers to install the agent by using the distribution's official package management system to provide a better installation and development experience.
13+
It is also possible to build and install from source code instead of pre-built binaries.
14+
15+
## Supported OS
16+
17+
The following table shows the operating systems and versions on which the NodeX Agent has been tested.
818

9-
Future plans include providing pre-built binaries for WindowsOS and macOS. In addition, we plan to provide C/C++/Rust SDK for LinuxOS/WindowsOS/macOS and C/C++ SDK for RTOS (FreeRTOS, AzureRTOS).
19+
| OS | Versions |
20+
|--------|---------------------------------------------------------------|
21+
| [Ubuntu](https://wiki.ubuntu.com/Releases) | 20.04(LTS), 22.04(LTS) |
22+
| [Debian](https://www.debian.org/releases/) | Debian 12 (bookworm), Debian 11 (bullseye), Debian 10 (buster) |
23+
| [macOS](https://developer.apple.com/documentation/macos-release-notes) | macOS Monterey 12, macOS Ventura 13, macOS Sonoma 14 |
24+
| [Yocto](https://wiki.yoctoproject.org/wiki/Releases) | Mickledore 4.2 |

source/installation/20-install-on-linux-x86-64.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ NodeX officially provides pre-built binaries for the x86_64 architecture Linux.
44

55
```bash
66
% curl -OL https://github.com/nodecross/nodex/releases/latest/download/nodex-agent-x86_64.zip
7-
% unzip nodex-agent-x86_64.zip
7+
% unzip nodex-agent-mac.zip
88
% install nodex-agent
9-
```
9+
% nodex-agent --version
10+
```
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Install on macOS (x86_64)
2+
3+
NodeX officially provides pre-built binaries for the x86_64 architecture macOS.
4+
5+
```bash
6+
% curl -OL https://github.com/nodecross/nodex/releases/latest/download/nodex-agent-mac.zip
7+
% unzip nodex-agent-mac.zip
8+
% sudo mv nodex-agent /usr/local/bin/
9+
% sudo chmod +x /usr/local/bin/nodex-agent
10+
% nodex-agent --version
11+
```
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Install from Source Code
2+
3+
To install from source code, Rust must be installed.
4+
5+
If Rust is not installed, please refer [here](https://www.rust-lang.org/tools/install) to complete the Rust installation.
6+
7+
8+
```sh
9+
## Clone NodeX Agent
10+
$ git clone [email protected]:nodecross/nodex.git
11+
$ cd nodex/
12+
13+
## Build and Install NodeX Agent
14+
$ cargo build --release
15+
$ sudo mv target/release/nodex-agent /usr/local/bin/
16+
$ sudo chmod +x /usr/local/bin/nodex-agent
17+
% nodex-agent --version
18+
```
19+
20+

source/installation/90-next-step.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Next step
22

3-
After installing the pre-built binaries, you can refer to [Configuration](../configuration/index.md) to learn how to configure NodeX Agent to run.
3+
After installing the pre-built binary, you can follow [Getting Started](../getting-started/index.md) to learn the basic usage of NodeX Agent.

source/installation/index.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
# Installation
22

3-
This section describes how to install NodeX. As we have explained, NodeX consists of NodeX Hub/Studio, a service for administrators, and NodeX AGENT, which is installed on edge devices. No special procedures are required to start using NodeX Hub/Studio, and a single email address is all you need to start your trial right away. NodeX AGENT, on the other hand, must be embedded in an edge device and is now available in executable binaries for the x86_64 architectures of the Linux OS. NodeX AGENT consists of a single binary with no dependencies and can be easily installed.
3+
This section describes how to install NodeX Agent. NodeX Agent, must be embedded in an edge device and is now available in executable binaries for the x86_64 architectures of the Linux and the macOS. NodeX Agent consists of a single binary with no dependencies and can be easily installed.
44

55
```{note}
6-
You can register to NodeX Hub/Studio at [https://studio.nodecross.io](https://studio.nodecross.io) (under development).
6+
NodeX has a service for administrators, NodeX Studio, which requires installation of the NodeX Agent and setup to start using NodeX Studio.
7+
To start using NodeX Studio, please contact [CollaboGate Japan, Inc.](https://nodecross.io/#demo-request-form)
78
```
89

910
```{toctree}
1011
:hidden:
1112
00-overview.md
1213
20-install-on-linux-x86-64.md
14+
30-install-on-macos.md
15+
40-install-from-source-code.md
1316
90-next-step.md
1417
```

0 commit comments

Comments
 (0)