MCPcopy Index your code
hub / github.com/8xFF/atm0s-sdn

github.com/8xFF/atm0s-sdn @v0.1.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.1.0 ↗ · + Follow
1,300 symbols 3,385 edges 130 files 97 documented · 7%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

License: MIT Discord

Atm0s SDN: Global-scaled Ultra-low latency Decentralized SDN

A SAN I/O driven, open-source decentralized network infrastructure that can deliver high-quality data with minimal latency and efficient cost, similar to what Cloudflare achieves for their network.

Features

  • Blazingly fast, powered by Rust.
  • High availability by being fully distributed, with no central controller.
  • Multi-zone support, high scalability.
  • Definable Metric based Adaptive routing: cost, latency, .etc...
  • Fixed size routing table.
  • Designed with large scale built-in PubSub service.
  • Automatic Network orchestration and discovery (also can be manual).
  • High extendibility by using Network Service.
  • Built-in features: PubSub, KeyValue, VPN.
  • Cross platform: Linux, MacOs, Windows.

Architecture

Each node in the network is embeded with Geo-Location data inside its ID. A Node ID consists of multiple layers, and every node will have multiple routing tables, each is correspond to a layer.

  • Layer1: Geo1 Table (Zone level)
  • Layer2: Geo2 Table (Country level)
  • Layer3: Inner Geo Group Table (City level)
  • Layer4: Inner Group Index Table (DC level)

TODO: Graphics instead of bulletlist TODO: an ARCHITECTURE.md with general information about: Project, System structure, Design philosophy, ...

Getting started

cargo add 8xff-sdn

Create a group chat application (Optional)

You can refer to the chat_example file here to get started on the basic of building an application for the network.

Demo group chat application

Running manual discovery multi nodes in single device

Start node1:

cargo run --example chat_example -- --node-id 0

Start node2:

cargo run --example chat_example --node-id 1 --neighbour /p2p/0/ip4/127.0.0.1/udp/50000

In node1

> router
[Registry 0] local services: [] remote services: [], nexts []
[Table 0/3/0] slots: []
[Table 0/2/0] slots: []
[Table 0/1/0] slots: []
[Table 0/0/0] slots: [1]
# Join the room using join command with room id
> join 1

In node2

> join 1
> send hello

Now, in node1 will received message from node2

Node 1 to room 1: hello

Available commands: - help: Show available commands and description - router: Print routing table - join: Join a room - send: Send a message to room - leave: Leave joined room

Running manual discovery multi nodes in multi devices

It also can start chat-example in multi nodes and connect over LAN or Internet

Start node1:

cargo run --example chat_example --node-id 0

Start node2:

cargo run --example chat_example --node-id 1 --neighbours /p2p/0/ip4/[IP_HERE]/udp/50000

Showcases

Contributing

The project is continuously being improved and updated. We are always looking for ways to make it better, whether that's through optimizing performance, adding new features, or fixing bugs. We welcome contributions from the community and are always looking for new ideas and suggestions.

For more information, you can join our Discord channel

Roadmap

First version will be released together with Media Server at end of 2023.

Details on our roadmap can be seen TBA.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

We would like to thank all the contributors who have helped in making this project successful.

Extension points exported contracts — how you extend this code

ConnectionHandler (Interface)
A trait representing a connection handler. [6 implementers]
packages/network/src/behaviour.rs
Awaker (Interface)
(no doc) [3 implementers]
packages/core/utils/src/awaker.rs
SingleFeedbackProcessor (Interface)
(no doc) [2 implementers]
packages/services/pub_sub/src/relay/feedback.rs
NetworkBehavior (Interface)
Defines the behavior of a network service. [6 implementers]
packages/network/src/behaviour.rs
RouterTable (Interface)
(no doc) [3 implementers]
packages/core/router/src/lib.rs
ExternalControl (Interface)
(no doc) [1 implementers]
packages/services/key_value/src/lib.rs
ConnectionSender (Interface)
(no doc) [4 implementers]
packages/network/src/transport.rs
Random (Interface)
(no doc) [2 implementers]
packages/core/utils/src/random.rs

Core symbols most depended-on inside this repo

clone
called by 299
packages/services/pub_sub/src/sdk.rs
push_back
called by 125
packages/core/utils/src/vec_dequeue.rs
push
called by 71
packages/core/multiaddr/src/lib.rs
iter
called by 62
packages/core/utils/src/hashmap.rs
insert
called by 56
packages/core/utils/src/hashmap.rs
get_mut
called by 56
packages/core/utils/src/hashmap.rs
remove
called by 48
packages/services/dht_discovery/src/connection_group.rs
print_error
called by 42
packages/core/utils/src/error_handle.rs

Shape

Method 682
Function 364
Class 133
Enum 103
Interface 18

Languages

Rust100%

Modules by API surface

packages/core/multiaddr/src/lib.rs34 symbols
packages/services/key_value/src/storage/hashmap.rs33 symbols
packages/services/key_value/src/behavior/simple_local.rs32 symbols
packages/services/key_value/src/behavior/hashmap_local.rs32 symbols
packages/services/key_value/src/storage/simple.rs31 symbols
packages/network/src/plane/internal.rs29 symbols
packages/core/utils/src/hashmap.rs28 symbols
packages/services/key_value/src/behavior.rs27 symbols
packages/services/dht_discovery/src/find_key_request.rs27 symbols
packages/network/src/msg.rs27 symbols
packages/core/multiaddr/src/from_url.rs27 symbols
packages/core/multiaddr/tests/lib.rs26 symbols

For agents

$ claude mcp add atm0s-sdn \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact