Basic binary socket based rpc for Python
Project description
basic_rpc
It's in the name, basic RPC implementation with just enough functionality to solve my own problem.
Currently implemented a threaded server and a blocking client though there's no reason an async server/client couldn't be added.
See greet_server.py and greet_client.py for example usage.
Constraints:
- Supports up to 16k registered commands (due to low level command id represented as a 16 bit integer)
- Runs on Python 3.6+.
Pros:
- No dependencies
- Support for managing amount of concurrent users of the RPC service. (I need exclusive access).
- Client/Server decoupled from user code.
- Some basic support for exceptions.
Cons:
- No encryption/authentication
- user code responsible for serializing/deserializing messages.
The RPC protocol is not aware of the type of arguments/responses being sent.
I.e. the message payload is tightly coupled with user code.
The tediousness of this is mitigated somewhat by using composable
serializer/deserializer functions such as
make_serializer. See conftest.py for an example of this. The serialization helper functions reside in rpc_serialization_functions. - No autogeneration logic to generate RPC APIs.
- parsing of large messages slow due to inefficient copying
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file basic_socket_rpc-0.5.0.tar.gz.
File metadata
- Download URL: basic_socket_rpc-0.5.0.tar.gz
- Upload date:
- Size: 14.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d3b8e243c23611759bb58cf2283108d521ddf071c2fd06d8f2cd9fbe8a89a3f
|
|
| MD5 |
740419b604032eda6d8caea3eb3ffb72
|
|
| BLAKE2b-256 |
6677a48bb655157a3625194a48ad3b2da2da37939a51688423b1f84acdad576c
|
File details
Details for the file basic_socket_rpc-0.5.0-py3-none-any.whl.
File metadata
- Download URL: basic_socket_rpc-0.5.0-py3-none-any.whl
- Upload date:
- Size: 14.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b06d9d1c0419d719631ed3403baef6561805e40cd1934ecc89d4dc9730dd3a41
|
|
| MD5 |
da65026220e5dc54ee1c2c9c0e9eec3c
|
|
| BLAKE2b-256 |
257c9e3d751a98f229b303e1a5729ea5b6dce4a113a9d762a0e5e9e7b5ac2c62
|