Skip to main content

DecCom-Python

DecCom - Decentralised communication with Python made easy.

DecCom provides an easy interface to stack modular protocols on top of each other to create the application you need. The package comes with several protocols you can already use in your development.

THE PROJECT IS STILL A WORK IN PROGRESS!! ALL BINDINGS ARE SUBJECT TO CHANGE! USE AT YOUR OWN RISK!

Install

You can download with pip

pip install deccom
end

or build from source:

git clone git@github.com:NikolayBlagoev/DecCom-Python.git
cd DecCom-Python
pip install .
end

Why DecCom?

Many popular frameworks for distributed applications are often overly complex, poorly maintained, or straight up not working. IPv8 has an incredibly rigid structure and poor throughput. LibP2P has a tidiously slow developmental cycle and for many languages the repositories are no longer maintained. It is incredibly difficult to build your desired application on any of these.

This is where DecCom comes in. With just a few lines of code you too can build a complex distributed application ready for a production environment. The modular nature of the protocols means that you can modify and add functionality without needing to rewrite your entire codebase. DecCom comes prepackaged with several common protocols which take care of the boring stuff for you - processing large messages, reliable communication, peer discovery, security, etc.

But why "DecCom"? - DecCom is short for Decentralised Communication. There isn't much more to it.

DecCom's philosophy

Many protocol architectures have a very rigid structure - one layer binds to all ports of a lower layer and provides some ports to the layer above it. DecCom violates this strucutre by allowing for any layer to connect to any set of bindings of layers under it. This may sometimes result in very ugly looking diagrams such as the one below.

DecCom protocol stack

DecCom works with two types of bindings (see wrappers.py)- bindto and bindfrom. Bindto refers to methods a protocol calls from a lower protocol. For example, in the TCP/IP protocol stack, an application would call a "send" method to send to some other IP their message. Bindfrom are methods a lower protocol can call in an upper protocol. In the TCP/IP analogy an application would have a receive method which the lower layer would call when the entire message has been received. Thus bindto goes down, bindfrom goes up the stack. Typically your application should stand at the top.

Identity

Within DecCom each node has an identifier and a public identity. The identifier is a SHA256 has of their public identity. Their public identity can be a public key (currently we support eliptic curve algorithms on the Ed25519 curve) or strings of arbitrary length. Public key identities are used in security layers for encrypting or signing messages. String identities are useful if you want to test an application with a small set of known nodes with specific ids.

Discovery

Discovery can be performed with any of the available methods (currently a Kademlia DHT or a Gossip protocol). It is important to note that depending on the nodes you choose to connect to initially you can have many different peer networks built on DecCom, which do not communicate with each other. Unlike applications built on top of IPFS which use the IPFS network at all times, with DecCom you can create your own private group without ever contacting any of the publicly available ones.

Protocols

DecCom currently has the following protocols implemented:

  1. UDP transport defaultprotocol.py
  2. TCP transport streamprotocol.py
  3. UDP hole punching holepuncher.py
  4. TCP hole punching tcpholepuncher.py
  5. Reliable UDP reliableudp.py
  6. Noise protocol noiseprotocol.py - establishes a common secret between two nodes
  7. Kademlia DHT kademliadiscovery.py - for discovery
  8. Gossip gossipdiscovery.py - for discovery
  9. BigGossip biggossip.py - for discovery
  10. Delay protocol delayprotocol.py - for testing purposes as one might want to add artificial delay between nodes
  11. Keep Alive protocol keepalive.py
  12. Faulty UDP transport faultytransport.py - for simulating random message drops (useful for testing your programs)

Metadata

Release files for deccom 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for deccom 0.1.0
File Size Uploaded Provenance Actions
deccom-0.1.0.tar.gz 37.0 kB Without provenance Details for deccom-0.1.0.tar.gz

Release files / deccom-0.1.0.tar.gz

Download URL deccom-0.1.0.tar.gz
Size 37.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a115d8b4bce5cef853719af13dd8a10103d87f86d4d539696b7f637d803adc38
BLAKE2b-256 checksum
How to use checksums
80f4e407be1f2255feaa2b4178b65ad600a8193382a65fdaa6e3d26afc0d7f49
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Security for deccom 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page