Skip to main content

PYDEVTS

PYDEVTS (Python Distributed EVenT System) is a distributed event system written in python and based on the concept of nodes that is designed for the implementation of data stores and other replicated systems.

PYDEVTS is based upon a simple concept: A cluster of nodes that can send and recieve events.

PYDEVTS is also lightweight, requiring only the external library trio although some examples may require additional libraries (these will be detailed in the examples description)

How do I use this?

While more in-depth documentation will come in the future, currently there are several examples in the examples/ folder.

Each example takes some command line arguments, which are detailed below. But first, we must define a few terms.

Terms

Cluster Ports

A cluster port is a port with which a client will try to connect to a cluster. If the port is not reachable, the node starts as the first node in a cluster. A cluster port is any public port of a node in a cluster. Cluster ports are printed when a node starts and log level is INFO or DEBUG.

Host Ports

Sometimes PYDEVTS Nodes will run another application alongside themselves when running. If this application is a server of some kind, it's public facing port is called a Host Port.

Examples

Listed below are some of the examples found in the examples/ directory. All examples assume localhost.

fastapi_example.py

External Requirements:

  • fastapi
  • hypercorn

This example details how to run another async application (FastAPI with hypercorn) alongside PYDEVTS.

It takes two arguments:

  • The cluster port to attempt to connect to
  • The host port to host the fastapi application on

picklenode.py

External Requirements:

  • None

NOTICE: This should never be used with untrusted data, as pickle can be used to execute untrusted code.

This example shows how to create a custom node type. This node stores a single pickled object, and can get and set the object in the cluster.

This example takes two arguments:

  • The cluster port to attempt to connect to
  • The literal string 'w' (without the quotes) if we want the cluster to update the value. If we do not provide this, the cluster will simply read the value every second and print it.

picklenodewriter.py

External Requirements:

  • None

NOTICE: This should never be used with untrusted data, as pickle can be used to execute untrusted code.

This example works in conjunction with picklenode.py to show two different nodes types can work together. Every time the stored value in a picklenode.py node is updated, it writes the string representation of it to a file called pickleoutput.txt

This example takes one argument:

  • The cluster port to attempt to connect to

Collaboration and Questions

If you find a bug, report it on github issues. If, however, you have questions or are not sure how something works, post it on github discussions.

If you see some room for improvement and you wish to help out, create a github issue describing the problem and stating that you can work on it. If you do not wish to help out, or can not for some reason, then still leave the issue, as any feedback is appreciated. Usability and efficiency feedback is appreciated even more.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pydevts-0.0.3.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pydevts-0.0.3-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file pydevts-0.0.3.tar.gz.

File metadata

  • Download URL: pydevts-0.0.3.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.8.5 Linux/5.8.0-53-generic

File hashes

Hashes for pydevts-0.0.3.tar.gz
Algorithm Hash digest
SHA256 df5d05c1025591a5076519f0f1d817cf5adb77529df05e715c9615294458cafd
MD5 1a74e841426dc5203f8dacac84a89c4d
BLAKE2b-256 658e93a09850c193dc256a3cb6f6321cc052f63afc4dcdc62f2e72f89db58536

See more details on using hashes here.

File details

Details for the file pydevts-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: pydevts-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.8.5 Linux/5.8.0-53-generic

File hashes

Hashes for pydevts-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 fff49d3ca47406ee867a507b35b6cbd0df6808c434c5206d8e11f4e9f9a66c58
MD5 260d6af560406adefc047071befa6cee
BLAKE2b-256 aef9492a22c78d80fbbbe477ba07b9ad4e61f56611562bac77ed3163ba785e14

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.1

2 files

0.1.0

2 files

This release

0.0.3 This release

2 files

0.0.2

2 files

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