Skip to main content

Synchronize events between processes over the network

Project description

PyProcSync

https://img.shields.io/pypi/v/pyprocsync.svg https://img.shields.io/travis/marcsello/pyprocsync.svg Documentation Status

Synchronize events between processes over the network. This package provides similar behaviour as Python’s threading.Event but it is designed to be used with multiple processes running on different computers.

An example use-case might be controlling multiple industrial robots handling anomalous materials, where timing is critical.

Features

  • Uses Redis as a backend

  • About 1ms precision (see. perf_tests)

  • Synchronize events based on system clock (NTP is a must have)

  • Synchronize unlimited number of nodes with the same precision (Depends on the performance of Redis cluster)

Example

Simple example that synchronizes 4 nodes:

import redis
from pyprocsync import ProcSync

p = ProcSync(redis.from_url('redis://localhost:6379/0'))

# Do some work

p.sync("first", 4) # Block until all 4 nodes are reached the synchronization point

# Time sensitive work

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

0.1.0 (2021-04-05)

  • First release on PyPI.

Project details


Download files

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

Source Distribution

pyprocsync-0.1.0.tar.gz (15.5 kB view hashes)

Uploaded Source

Built Distribution

pyprocsync-0.1.0-py2.py3-none-any.whl (6.7 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page