Starway UCX P2P communication lib.
Project description
Starway
Starway aims to be an ultra-fast communication library, which features:
- Zero Copy, supports sending from pointer and receiving into pre-allocated buffer.
- RDMA support, by utilizing OpenMPI/OpenUCX for transportation.
- Ease of use, generally should work out of the box, and don't require much configuration efforts.
- Full-duplex, asynchronous API.
Current Python alternatives are lacking core features:
- ZeroMQ, no support for RDMA.
- MPI, hard to use, hard to setup environment properly.
Full-Duplex Communication
Starway now supports full-duplex communication, allowing for simultaneous, two-way data exchange between the client and server. This feature significantly improves the library's responsiveness and efficiency in handling real-time data streams.
Usage
Here's an example of how to use the full-duplex communication feature:
import asyncio
import time
import numpy as np
from starway import Client, Server
async def tester():
server = Server("127.0.0.1", 19198)
client = Client("127.0.0.1", 19198)
# Client to Server
send_buf_c2s = np.arange(10, dtype=np.uint8)
recv_buf_c2s = np.empty(10, dtype=np.uint8)
# Server to Client
send_buf_s2c = np.arange(20, dtype=np.uint8)
recv_buf_s2c = np.empty(10, dtype=np.uint8)
# Wait for client to connect
while not (clients := server.list_clients()):
time.sleep(0.1)
client_ep = clients[0]
# Perform concurrent send and receive
client_send_future = client.asend(send_buf_c2s, tag=1)
server_recv_future = server.arecv(recv_buf_c2s, tag=1, tag_mask=0xFFFF)
server_send_future = server.asend(client_ep, send_buf_s2c, tag=2)
client_recv_future = client.arecv(recv_buf_s2c, tag=2, tag_mask=0xFFFF)
await asyncio.gather(
client_send_future,
server_recv_future,
server_send_future,
client_recv_future
)
assert np.allclose(send_buf_c2s, recv_buf_c2s)
assert np.allclose(send_buf_s2c, recv_buf_s2c)
asyncio.run(tester())
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 Distributions
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 starway-0.2.3.tar.gz.
File metadata
- Download URL: starway-0.2.3.tar.gz
- Upload date:
- Size: 36.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
027c10db20a73830e24a097a33f6bb72ddc6e7ae0831badce4e83dc8335d228d
|
|
| MD5 |
b94aa219952a4968af595d8ed0829a61
|
|
| BLAKE2b-256 |
3582d9c813b8d5f52c6532c59991f9e73b44048d4ff7acff6e01218fd48a1226
|
Provenance
The following attestation bundles were made for starway-0.2.3.tar.gz:
Publisher:
wheels.yml on Clouder0/starway
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
starway-0.2.3.tar.gz -
Subject digest:
027c10db20a73830e24a097a33f6bb72ddc6e7ae0831badce4e83dc8335d228d - Sigstore transparency entry: 488088962
- Sigstore integration time:
-
Permalink:
Clouder0/starway@b9bb0f7a8550d78acf53c3fd9ade702018632186 -
Branch / Tag:
refs/tags/v0.2.3 - Owner: https://github.com/Clouder0
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@b9bb0f7a8550d78acf53c3fd9ade702018632186 -
Trigger Event:
release
-
Statement type:
File details
Details for the file starway-0.2.3-cp313-cp313-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: starway-0.2.3-cp313-cp313-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 5.1 MB
- Tags: CPython 3.13, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6cfed38ba8b87d2f16c6fa187c4f2d6ee2653d48b460e839d78b477a66dc15cb
|
|
| MD5 |
8d8cb0c9b9489349a68fb7a6a3f7c650
|
|
| BLAKE2b-256 |
6a5807ef1ae55435d5ba31492201d78e14b4aae2b621f1c9aca7fe416da22c35
|
Provenance
The following attestation bundles were made for starway-0.2.3-cp313-cp313-manylinux_2_34_x86_64.whl:
Publisher:
wheels.yml on Clouder0/starway
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
starway-0.2.3-cp313-cp313-manylinux_2_34_x86_64.whl -
Subject digest:
6cfed38ba8b87d2f16c6fa187c4f2d6ee2653d48b460e839d78b477a66dc15cb - Sigstore transparency entry: 488088970
- Sigstore integration time:
-
Permalink:
Clouder0/starway@b9bb0f7a8550d78acf53c3fd9ade702018632186 -
Branch / Tag:
refs/tags/v0.2.3 - Owner: https://github.com/Clouder0
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@b9bb0f7a8550d78acf53c3fd9ade702018632186 -
Trigger Event:
release
-
Statement type:
File details
Details for the file starway-0.2.3-cp312-cp312-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: starway-0.2.3-cp312-cp312-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 5.1 MB
- Tags: CPython 3.12, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba13c4e928e7be16423664fbc937bf8182f94fabfdde6998d8a4427b14a59eaa
|
|
| MD5 |
45c008232be419c0b403c6ff33ac5762
|
|
| BLAKE2b-256 |
2ea8a018dd3ddb3a1200d3f158282c7af4e4a1bfb82848e12096b32367eb9d04
|
Provenance
The following attestation bundles were made for starway-0.2.3-cp312-cp312-manylinux_2_34_x86_64.whl:
Publisher:
wheels.yml on Clouder0/starway
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
starway-0.2.3-cp312-cp312-manylinux_2_34_x86_64.whl -
Subject digest:
ba13c4e928e7be16423664fbc937bf8182f94fabfdde6998d8a4427b14a59eaa - Sigstore transparency entry: 488088993
- Sigstore integration time:
-
Permalink:
Clouder0/starway@b9bb0f7a8550d78acf53c3fd9ade702018632186 -
Branch / Tag:
refs/tags/v0.2.3 - Owner: https://github.com/Clouder0
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@b9bb0f7a8550d78acf53c3fd9ade702018632186 -
Trigger Event:
release
-
Statement type:
File details
Details for the file starway-0.2.3-cp311-cp311-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: starway-0.2.3-cp311-cp311-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 5.1 MB
- Tags: CPython 3.11, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67362cd0657e779c05bbb15d699792a4c5ccb1597bc52284979ed7c66e99faf6
|
|
| MD5 |
a4a3ea34925a4c6176888d92a1ba5a0c
|
|
| BLAKE2b-256 |
a296bf4f460af6232c47a832d3354e0dcda3b50c82fb903df07f4b079ab18224
|
Provenance
The following attestation bundles were made for starway-0.2.3-cp311-cp311-manylinux_2_34_x86_64.whl:
Publisher:
wheels.yml on Clouder0/starway
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
starway-0.2.3-cp311-cp311-manylinux_2_34_x86_64.whl -
Subject digest:
67362cd0657e779c05bbb15d699792a4c5ccb1597bc52284979ed7c66e99faf6 - Sigstore transparency entry: 488088983
- Sigstore integration time:
-
Permalink:
Clouder0/starway@b9bb0f7a8550d78acf53c3fd9ade702018632186 -
Branch / Tag:
refs/tags/v0.2.3 - Owner: https://github.com/Clouder0
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@b9bb0f7a8550d78acf53c3fd9ade702018632186 -
Trigger Event:
release
-
Statement type:
File details
Details for the file starway-0.2.3-cp310-cp310-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: starway-0.2.3-cp310-cp310-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 5.1 MB
- Tags: CPython 3.10, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a7135d77f3a04a4897e313a84c64eee948589e06dbb22ebaa586c6fdb18cb073
|
|
| MD5 |
a1d8616c7ecf9b18d823cf685406e13f
|
|
| BLAKE2b-256 |
91cbdd8d29c2075ee3463076d0f568253c1829637deb1c49ba4fc6be0773093d
|
Provenance
The following attestation bundles were made for starway-0.2.3-cp310-cp310-manylinux_2_34_x86_64.whl:
Publisher:
wheels.yml on Clouder0/starway
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
starway-0.2.3-cp310-cp310-manylinux_2_34_x86_64.whl -
Subject digest:
a7135d77f3a04a4897e313a84c64eee948589e06dbb22ebaa586c6fdb18cb073 - Sigstore transparency entry: 488089002
- Sigstore integration time:
-
Permalink:
Clouder0/starway@b9bb0f7a8550d78acf53c3fd9ade702018632186 -
Branch / Tag:
refs/tags/v0.2.3 - Owner: https://github.com/Clouder0
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@b9bb0f7a8550d78acf53c3fd9ade702018632186 -
Trigger Event:
release
-
Statement type: