Skip to content

This is a simple implementation of a Distributed Compute Network with the Deno Typescipt Runtime and no external dependencies.

Notifications You must be signed in to change notification settings

Wissotsky/SimpleDCN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SimpleDCN

This is a simple implementation of a Distributed Compute Network with the Deno Typescipt Runtime and no external dependencies. It utilizes gossip communication and a simple Datagram(UDP) based protocol to communicate between nodes.

Important notes

This implementation has no security measures whatsoever. This is created for teaching purposes only. As this is a decentralized network its main distinction is that it does not have a central server(aka c2) to communicate with. This means is that to control the network you have to be a part of it. This is a very important distinction to make.

Protocol Spec

Command Description Arguments
PING Used to check if a node is alive None
PONG Used to respond to a PING Size of PING Message
HELLO Used to join a Node Node Uuid
EVAL Forwards and executes JavaScript JavaScript code

Files

  • main.ts - The example implementation of a network node
  • lib.ts - Library of shared entities for nodes and controllers(modified nodes that send commands to the network)

Examples

netkill.ts

An example of a command that shuts down the whole network. This utilizes the fact that evaluations get passed onward before execution. This means that if a node receives a command to shut down it will pass it on to the next node before shutting itself down.

massconnect.ts

Requests all nodes to connect to the specified node. This will force all nodes to send a Hello message to the specified node.

regionconnect.ts

This requests all nodes in the specified region to connect to the specified node. The nodes will first check themselves to see if they are in the specified region before sending a Hello message to the specified node.

About

This is a simple implementation of a Distributed Compute Network with the Deno Typescipt Runtime and no external dependencies.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published