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.2.tar.gz (8.2 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.2-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pydevts-0.0.2.tar.gz
  • Upload date:
  • Size: 8.2 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.2.tar.gz
Algorithm Hash digest
SHA256 ae5b7dde7ac2f4b170c3b60c25e52855b00bdff4c7aa02a986a746841dd0d0bf
MD5 06ab3d3d0f5a1c5c3e7e630946d6583e
BLAKE2b-256 6ef092eaebdc83a8cf8d80ba20e70666d6a0cea4f2529e84ec75f675632e9cef

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pydevts-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.9 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4b2ac5869da568869cc0964c1928907ad295345e5fd4bb6db0302527f346f8e5
MD5 a8f8e352ce4269d71cf177690de8d234
BLAKE2b-256 772e1bf0c7008350c84860e50e09813b471ea9a28d8bee6b3fc6dd481c501deb

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.1

2 files

0.1.0

2 files

0.0.3

2 files

This release

0.0.2 This release

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