From b577fd7a294287dff117b8525a3b589ccd136f69 Mon Sep 17 00:00:00 2001 From: mfahampshire Date: Mon, 30 Sep 2024 18:13:43 +0200 Subject: [PATCH] concepts overview for devporta --- documentation/docs/pages/_meta.json.bak.bak | 31 +++++++++++ .../docs/pages/developers/concepts.mdx | 6 ++- .../docs/pages/developers/concepts/_meta.json | 1 + .../developers/concepts/message-queue.md | 2 + .../pages/developers/concepts/messages.mdx | 2 + .../concepts/required-architecture.md | 6 +++ documentation/docs/pages/developers/index.mdx | 4 +- .../docs/pages/developers/rust/ffi.mdx | 51 +++++++++++++++++++ 8 files changed, 100 insertions(+), 3 deletions(-) create mode 100644 documentation/docs/pages/_meta.json.bak.bak create mode 100644 documentation/docs/pages/developers/concepts/message-queue.md create mode 100644 documentation/docs/pages/developers/concepts/required-architecture.md create mode 100644 documentation/docs/pages/developers/rust/ffi.mdx diff --git a/documentation/docs/pages/_meta.json.bak.bak b/documentation/docs/pages/_meta.json.bak.bak new file mode 100644 index 0000000000..721abb6e75 --- /dev/null +++ b/documentation/docs/pages/_meta.json.bak.bak @@ -0,0 +1,31 @@ +{ + "index": { + "display": "hidden" + }, + "network": { + "title": "Network", + "type": "page" + }, + "developers": { + "title": "Developers", + "type": "page" + }, + "sdk": { + "title": "SDKs", + "type": "menu", + "items": { + "rust": { + "title": "Rust SDK", + "href": "/sdk/rust" + }, + "typescript": { + "title": "Typescript SDK", + "href": "/sdk/typescript" + } + } + }, + "operators": { + "title": "Operators", + "type": "page" + } +} diff --git a/documentation/docs/pages/developers/concepts.mdx b/documentation/docs/pages/developers/concepts.mdx index 39802f6428..a186e7d819 100644 --- a/documentation/docs/pages/developers/concepts.mdx +++ b/documentation/docs/pages/developers/concepts.mdx @@ -1 +1,5 @@ -stub +# Core Concepts + +We are working on making the Mixnet as easy as possible to use; that said, it is at the moment still quite an unusual system in terms of how it works and the required parts. + +We are working on abstractions to emulate more traditional networking such as reading from / writing to TCP sockets, and have plans to modify the internals of the clients to remove some of the required architecture and slim down the parts required to use the Mixnet. diff --git a/documentation/docs/pages/developers/concepts/_meta.json b/documentation/docs/pages/developers/concepts/_meta.json index f9212fb292..4318425b5d 100644 --- a/documentation/docs/pages/developers/concepts/_meta.json +++ b/documentation/docs/pages/developers/concepts/_meta.json @@ -1,5 +1,6 @@ { "required-architecture": "Required Architecture", "messages": "Message Based Paradigm", + "message-queue": "Message Queue", "abstractions": "Connection Abstractions" } diff --git a/documentation/docs/pages/developers/concepts/message-queue.md b/documentation/docs/pages/developers/concepts/message-queue.md new file mode 100644 index 0000000000..fedaa03274 --- /dev/null +++ b/documentation/docs/pages/developers/concepts/message-queue.md @@ -0,0 +1,2 @@ + +2) actually waiting on messages: `send()` **just puts the message in the queue of cover traffic** so dropping a client before its actually sent is something that is possible and should be avoided (see the troubleshooting example TODO LINK) for more on this. diff --git a/documentation/docs/pages/developers/concepts/messages.mdx b/documentation/docs/pages/developers/concepts/messages.mdx index 39802f6428..f497f09702 100644 --- a/documentation/docs/pages/developers/concepts/messages.mdx +++ b/documentation/docs/pages/developers/concepts/messages.mdx @@ -1 +1,3 @@ stub + +1) working on messages not streaming / bytes which can be a pain : check the use of the bytecodec logic in the tcpproxy for looking @ how we handle this there diff --git a/documentation/docs/pages/developers/concepts/required-architecture.md b/documentation/docs/pages/developers/concepts/required-architecture.md new file mode 100644 index 0000000000..48e1d61940 --- /dev/null +++ b/documentation/docs/pages/developers/concepts/required-architecture.md @@ -0,0 +1,6 @@ +- what do i need? clients on both sides + - take a traditional client / server app setup: we need to put the mixnet betwen them to get the privacy properties, and each of them need a client in order to connect and authenticate with the mixnet to send and receive messages: since a lot of the functionality happens client-side and the sphinx of it all + +- what dont i need? to run your own infra + - you can basically use the mixnet as a black box + - maybe if you're expecting a load of traffic / dont want to rely on other people's gateways, you could run your own and then connect to them specifically (qu: can we configure the client to connect to a particular gateway?) diff --git a/documentation/docs/pages/developers/index.mdx b/documentation/docs/pages/developers/index.mdx index 22516055d6..9f27706c0d 100644 --- a/documentation/docs/pages/developers/index.mdx +++ b/documentation/docs/pages/developers/index.mdx @@ -1,7 +1,7 @@ # Introduction -Nym's developer documentation covering core concepts of integrating a Nym client, an overvie of the avaliable tools, and our SDK docs. +Nym's developer documentation covering core concepts of integrating with the Mixnet, interacting with the Nyx blockchain, an overview of the avaliable tools, and our SDK docs. ## Where to Start? If you are completely new to Nym, it is suggested to start with the top sections covering the core concepts, integration options, and the clients and tools available to you. -If you feel like starting with more practical examples, check out the SDK docs. +If you feel like starting with more practical examples, check out the relevent SDK docs in the sidebar to the left. diff --git a/documentation/docs/pages/developers/rust/ffi.mdx b/documentation/docs/pages/developers/rust/ffi.mdx new file mode 100644 index 0000000000..6e1834aa0a --- /dev/null +++ b/documentation/docs/pages/developers/rust/ffi.mdx @@ -0,0 +1,51 @@ +import { Callout } from 'nextra/components' + +# FFI Bindings + + + We are only working on the intitial versions of the FFI code to allow developers to experiment and get feedback. Please get in touch if you think the FFI bindings are lacking certain functionality. + + +We currently have FFI bindings for Go and C/C++. See the table below to check the coverage of functionality we expect devs would like to see. + +### Mixnet Module +This is the basic mixnet component of the SDK, exposing client functionality with which people can build custom interfaces with the Mixnet. + +| Rust Function | Go | C/C++ | +| :----------------------------------------------- | :--: | ----: | +| `MixnetClient::connect_new()` | ✔️ | ✔️ | +| `MixnetClientBuilder::new_with_default_storage` | ✔️ | ✔️ | +| `MixnetClientBuilder::OTHERS` | | | +| `MixnetClientBuilder::OTHERS` | | | +| | | | +| | | | +| | | | +| | | | +| | | | +| | | | +| | | | + + +> We have also implemented `listen_for_incoming()` which is a wrapper around the Mixnet client's `wait_for_messages()` which is exposed to Go and C/C++. This is a helper method for listening out for and handling incoming messages. + +### TcpProxy Module +A connection abstraction TODO LINK which exposes a local TCP socket which developers are able to interact with basically as expected, being able to read/write to/from a bytestream, without really having to take into account the workings of the Mixnet/Sphinx/the message-based TODO LINK format of the underlying client. + +| Rust Function | Go | C/C++ | +| :----------------- | :--: | ----: | +| | | | +| | | | +| | | | +| | | | +| | | | +| | | | +| | | | +| | | | +| | | | +| | | | + + +---------------- +for copypaste + ❌ ✔️ +----------------