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
- 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
.. towncrier release notes start
v0.9.7 (2020-12-22)
Features
- Provide
repr()
of exceptions in RPC user/internal errors for better application-level error logging (#15)
v0.9.6 (2020-06-05)
Features
upper.rpc
: Support server-side cancellation and propagation to clients by adding theCANCELLED
RPC message type (#14)
Deprecations
- Drop use of aiojobs in favor of native semaphores for limiting the task concurrency and less clutters on job scheduling semantics (#14)
Fixes
- Stability updates for the RPC layer: (#14)
- Fix wrong message sequence calcuation with
SEQ_BITS
and clarify the roles ofcleanup()
andcancel()
methods in the schedulers. - Now we use the exit-ordered scheduler by default.
- Fix wrong message sequence calcuation with
v0.9.5 (2020-05-12)
Fixes
- lower.zeromq: Use destroy() for zmq context termination to improve stability and shutdown open socekts cleanly (#13)
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 torpc.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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file callosum-0.9.7.tar.gz
.
File metadata
- Download URL: callosum-0.9.7.tar.gz
- Upload date:
- Size: 23.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.0.post20201221 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71a80cfbe8139c99e84fe88158976b0670df1b8930e6524422eff8a214e618b4 |
|
MD5 | 8dec0ea7371986318a7d0ffd993f4572 |
|
BLAKE2b-256 | f6583a28b86f436c4223975767e2938fffd6f07bded466cd249d51519abd0b88 |
Provenance
File details
Details for the file callosum-0.9.7-py3-none-any.whl
.
File metadata
- Download URL: callosum-0.9.7-py3-none-any.whl
- Upload date:
- Size: 29.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.0.post20201221 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | da810bf5eaf7866c25ec34d2db4515f2c43ff7f750588741bd427ccff047a29c |
|
MD5 | e914b4819e0a21cbbe71f70a74b42fea |
|
BLAKE2b-256 | 078c9578117e2b53107cce28bee0b5e7b67aa7583ada4a0e142517811574d9a1 |