diff --git a/content/languages/python.md b/content/languages/python.md index 1eb5eb8..cf32535 100644 --- a/content/languages/python.md +++ b/content/languages/python.md @@ -1,8 +1,61 @@ --- title: Python weight: 3 +toc: true --- +## PyOMQ - drop-in pyzmq replacement, 2-3x faster + +Drop-in pyzmq replacement backed by omq.rs (pure Rust ZeroMQ). Same API, sync and asyncio, 2-3x throughput over TCP. No libzmq dependency. + +| Github | https://github.com/paddor/omq.rs/tree/main/bindings/pyomq | +|--------|-----------------------------------------------------------| +| PyPI | https://pypi.org/project/pyomq/ | + +### Download + +```bash +pip install pyomq +``` + +### Example + +```python +import pyomq + +ctx = pyomq.Context() + +push = ctx.socket(pyomq.PUSH) +push.bind("tcp://127.0.0.1:5555") + +pull = ctx.socket(pyomq.PULL) +pull.connect("tcp://127.0.0.1:5555") + +push.send(b"Hello World!") +print(pull.recv()) +``` + +asyncio: + +```python +import asyncio +import pyomq.asyncio + +async def main(): + ctx = pyomq.asyncio.Context() + + push = ctx.socket(pyomq.PUSH) + push.bind("tcp://127.0.0.1:5555") + + pull = ctx.socket(pyomq.PULL) + pull.connect("tcp://127.0.0.1:5555") + + await push.send(b"Hello World!") + print(await pull.recv()) + +asyncio.run(main()) +``` + ## Pyzmq | Github | https://github.com/zeromq/pyzmq | diff --git a/content/languages/ruby.md b/content/languages/ruby.md index 8da1c3f..00565c2 100644 --- a/content/languages/ruby.md +++ b/content/languages/ruby.md @@ -1,15 +1,47 @@ --- title: Ruby weight: 3 +toc: true --- +## OMQ - pure Ruby, wire-compatible with libzmq + +Pure Ruby ZeroMQ implementation. No C extensions, no libzmq dependency. Faster than any binding in both throughput and latency. All standard and draft socket types, TCP/IPC/inproc transports, CURVE/PLAIN/BLAKE3ZMQ mechanisms, lz4+tcp:// and zstd+tcp:// compression transports. + +| Github | https://github.com/zeromq/omq.rb | +|--------|----------------------------------------------| +| gem | https://rubygems.org/gems/omq | +| CLI | https://rubygems.org/gems/omq-cli | + +### Installation + +```bash +gem install omq +``` + +### Example + +```ruby +require "omq" + +push = OMQ.push +push.connect("tcp://127.0.0.1:9000") +push.send("Hello World!") + +pull = OMQ.pull +pull.bind("tcp://127.0.0.1:9000") +puts pull.recv +``` + +## rbzmq - bindings for the libzmq + | Github | https://github.com/zeromq/rbzmq | |--------|---------------------------------| | gem | https://rubygems.org/gems/zmq | | Docs | http://zeromq.github.io/rbzmq/ | -## Installation +### Installation [Install libzmq]({{< relref "/docs/download" >}}). @@ -29,7 +61,7 @@ On Windows add a parameter for the libs. For example: gem install zmq -- --with-zmq-dir=c:/src/zeromq-4.3.2 --with-zmq-lib=c:/src/zeromq-4.3.2/src/.libs ``` -## Example +### Example ```ruby require "zmq" diff --git a/content/languages/rust.md b/content/languages/rust.md index 8f126f4..8927f3c 100644 --- a/content/languages/rust.md +++ b/content/languages/rust.md @@ -4,6 +4,32 @@ weight: 3 toc: true --- +## OMQ - pure Rust, wire-compatible with libzmq + +Pure Rust ZeroMQ implementation. Two async backends (compio with io_uring, tokio), all socket types, compression transports (lz4+tcp://, zstd+tcp://), and CURVE/PLAIN/BLAKE3ZMQ mechanisms. Faster than libzmq at all message sizes. + +| Github | https://github.com/paddor/omq.rs | +|----------|---------------------------------------------------------| +| Crate | https://crates.io/crates/omq | + +Also provides: +- [`omq-zeromq`](https://crates.io/crates/omq-zeromq): drop-in replacement for the `zeromq` crate +- [`omq-zmq`](https://crates.io/crates/omq-zmq): libzmq-compatible C interface (`libomq_zmq.so`) +- [`pyomq`](https://pypi.org/project/pyomq/): drop-in pyzmq replacement (2-3x faster) + +### Installation + +#### Via cargo add: +```bash +cargo add omq +``` + +#### Via Cargo.toml file: +```toml +[dependencies] +omq = "0.5" +``` + ## Zmq - bindings for the libzmq | Github | https://github.com/erickt/rust-zmq |