Skip to main content

Callosum RPC Library

Project description

Callosum

An RPC Transport Library

It provides an asynchronous multi-channel order-preserving message and data streaming transport for upper RPC layers (e.g., Apache Thrift) by wrapping lower transport implementations (e.g., ZeroMQ).

It aims to follow the latest coding style and conventions in Python asyncio.

Corpus callosum is a bundle of neuron fibers that connects two cerebral hemispheres of a human brain.

Prerequisite

Python 3.8 or higher.

Features

  • RPC
    • Native timeout and cancellation support
    • Explicit server-to-client error propagation including stringified tracebacks
    • Order preserving based on user-defined keys while keeping executions asynchronous
    • Concurrency limits based on aiojobs
  • Streaming
    • Broadcast & shared pipelines
  • Optional client authentication and encrypted communication
    • Currently supported for only ZeroMQ with its CURVE library
  • Optional message compression using snappy
  • Replacible and combinable lower/upper layers (ZeroMQ/Redis + JSON/msgpack/Thrift)

Planned features

  • Managed streaming (with acks)
  • Tunneling to bundle other channels and generic network traffic in a single connection
  • Bidirectional RPC
  • Chunked transfer of large messages

Installation

To install the core:

$ pip install -U pip setuptools
$ pip install callosum

You may add extra dependencies like:

$ pip install 'callosum[zeromq,redis,thrift,snappy]'

Examples

Please check out the examples directory.

Development

Use the editable installation of Python setuptools.

$ pip install -U pip setuptools
$ pip install -U -e '.[dev,build,test,zeromq,redis,thrift,snappy]'

Changes

v0.9.4 (2020-04-10)

Fixes

  • Fix a race condition due to overlapping RPC message sequence IDs by separating server/client message sequence IDs (#12)

Miscellaneous

  • Adopt towncrier for changelog management (#11)

v0.9.3 (2020-03-20)

  • FIX: Mitigate bogus KeyError when cleaning up task futures in RPC servers that has caused event loop spinning.

v0.9.2 (2020-02-28)

  • MAINTENANCE: Update dependencies and only specify the minimum versions since Callosum is a library.

v0.9.1 (2020-01-05)

  • FIX: wrong typing of RPCMessage.body field

  • IMPROVE: Add debug_rpc option to rpc.Peer for logging exceptions in RPC scheduler and user-defined handlers explicitly.

  • Update dependencies and remove unused ones.

v0.9.0 (2019-12-06)

  • First public release with a working RPC based on ZeroMQ DEALER/ROUTER sockets.

2018-05-02

  • Started the project.

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

callosum-0.9.4.tar.gz (22.4 kB view details)

Uploaded Source

Built Distribution

callosum-0.9.4-py3-none-any.whl (28.9 kB view details)

Uploaded Python 3

File details

Details for the file callosum-0.9.4.tar.gz.

File metadata

  • Download URL: callosum-0.9.4.tar.gz
  • Upload date:
  • Size: 22.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.0

File hashes

Hashes for callosum-0.9.4.tar.gz
Algorithm Hash digest
SHA256 a198c5d0825901a7d6b5aa07681bf0406fcb81d2ce19c525a0778a120883141c
MD5 cdeaf50c55ce179048a453bc78c2f6b9
BLAKE2b-256 1ee4835e0c364b4a3b8cf2bd7aa35aff10d452b16d8817e3734200d6e350c412

See more details on using hashes here.

Provenance

File details

Details for the file callosum-0.9.4-py3-none-any.whl.

File metadata

  • Download URL: callosum-0.9.4-py3-none-any.whl
  • Upload date:
  • Size: 28.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.0

File hashes

Hashes for callosum-0.9.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f765f4ca00e0c709bfb672939ae8809e5b58d160c4336f99c3c1485740d9a262
MD5 5c651346d8a160f706e07b1942f6f74f
BLAKE2b-256 75cdce1e79f20d4016dfbad7c3861cd8e6e957b7180748b5ce4765f18e8edd75

See more details on using hashes here.

Provenance

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