#messaging #networking #protocols #nanomsg #distributed-systems #distributed-applications

scaproust

Nanomsg scalability protocols implementation in rust. Various messaging patterns over pluggable transports

5 unstable releases

Uses old Rust 2015

0.3.2 Jan 12, 2018
0.3.1 Aug 21, 2017
0.3.0 Mar 4, 2017
0.2.0 Nov 20, 2016
0.1.0 Sep 2, 2016

#4 in #nanomsg

27 downloads per month

MIT/Apache

540KB
12K SLoC

Scaproust - Scalability Protocols in Rust

Linux build Windows build Coverage Status

Scaproust is an implementation of the nanomsg "Scalability Protocols" in the Rust programming language.

Quoting from nanomsg's site:

nanomsg is a socket library that provides several common communication patterns. It aims to make the networking layer fast, scalable, and easy to use. Implemented in C, it works on a wide range of operating systems with no further dependencies.

The communication patterns, also called "scalability protocols", are basic blocks for building distributed systems. By combining them you can create a vast array of distributed applications.

Experimental work ! For working stuff, please see nanomsg-rs.

API Documentation

Goals

  • Support for all of nanomsg's protocols.
  • Support for TCP and IPC transports.
  • Idiomatic rust API first, mimic the original C API second.
  • Extensibility: allow user code to define additional protocols and transports

Usage

First, add this to your Cargo.toml:

[dependencies]
scaproust = "0.3.1"

Next, add this to your crate:

extern crate scaproust;

Progress

  • Protocols

    • PAIR
    • BUS
    • REQREP
      • REQ
      • REQ resend
      • REQ prefetch replies
      • REP
    • PUBSUB
      • PUB
      • SUB
      • SUB subscription filter
    • PIPELINE
      • PUSH
      • PULL
    • SURVEY
      • SURVEYOR
      • SURVEYOR deadline
      • RESPONDENT
  • Transports

    • TCP
    • IPC (*nix)
    • IPC (Windows)
  • Socket options

    • Linger
    • Recv max size
    • Send timeout
    • Recv timeout
    • Reconnect interval
    • Reconnect interval max
    • Send priority
    • Recv priority
    • IPV4 only
    • Socket name
  • Protocol options

    • REQ resend interval
    • SURVEYOR deadline
    • SUB subscribe
    • SUB unsubscribe
  • Transport options

    • TCP no delay

License

Licensed under either of

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~1.4–2MB
~32K SLoC