typed-protocols
nng
Our great sponsors
typed-protocols | nng | |
---|---|---|
2 | 9 | |
8 | 3,562 | |
- | 1.5% | |
7.7 | 9.0 | |
2 months ago | 1 day ago | |
Haskell | C | |
- | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
typed-protocols
-
On Implementation of Distributed Protocols
Certain correctness properties of code can be ensured statically, i.e. at compile time. Those checks rely on the programming language's type system. Software engineers can take advantage of type safety features to implement components in a way that makes them safe by construction. For example, Cardano uses the typed-protocols package, a generic framework for implementing application-level protocols, which is based on a simple form of session typing.6 Within this framework, protocols are described as state machines encoded into Haskell types. The allowed transitions between states correspond to messages exchanged between the peers, so the protocol state determines which messages are allowed to be sent or must be accepted when received, at type level. This simplifies protocol implementation, allows early detection of protocol violations, and makes the protocols themselves deadlock-free by construction. More advanced type-level programming techniques may allow achieving impressive levels of type safety; however, such code may be significantly harder to implement, understand, and maintain.
-
RPC lib?
I like to use typed-protocols for this: https://github.com/input-output-hk/typed-protocols/
nng
- nng is "nanomsg next generation", a wire-compatible C99 rewrite of the C library libnanomsg, with a similarly permissive MIT license. Pub/Sub, RPC-style Request/Reply, or Service Discovery, without worrying about details like connection management or retries.
-
RPC lib?
I just published the other day some bindings to the NNG message passing library (https://nng.nanomsg.org/). You can do request/reply, publish/subcribe and other communication patterns. It's trivial to serialize (with Binary for example) any data structure and pass it around the network:
-
[ANN] nng: Bindings for NNG (https://github.com/nanomsg/nng)
I put together quickly a binding to the NNG! library, it's simply a fork of the existing binding to Nanomsg! updated to work with NNG using the "compatible API". For basic usage seems to work pretty well:
-
Neovim architecture
I’m considering using msgpack + nng or msgpack + zmq
-
Any good lightweight c++ local socket library for embedded Linux?
I've found NNG to be high quality, also has less restrictive license. https://nng.nanomsg.org/
-
What is the best (and easy) way to make 2 different python projects communicate? They are on the same server for now but have different conda envs.
for communication between a Discord bot and other applications on the same machine I have used ZeroMQ - relatively easy to use, very portable but still flexible enough. (I've heard though that ZeroMQ has been somewhat superseded by nng nowadays)
-
I hate ASIO and I can't be alone.
I agree with this, but would add NNg as a good messaging library. It’s the successor to the spiritual successor of ZeroMQ.
- NNG – nanomsg-NG (rewrite of nanomsg)
-
How to use socket programming in cpp to chat over the same Wi-Fi network
you can also look into https://github.com/nanomsg/nng
What are some alternatives?
nng-haskell - Haskell bindings for NNG (https://github.com/nanomsg/nng)
ZeroMQ - ZeroMQ core engine in C++, implements ZMTP/3.1
cardano-node - The core component that is used to participate in a Cardano decentralised blockchain. [Moved to: https://github.com/IntersectMBO/cardano-node]
zmqpp - 0mq 'highlevel' C++ bindings
uvw - Header-only, event based, tiny and easy to use libuv wrapper in modern C++ - now available as also shared/static library!
cpp-httplib - A C++ header-only HTTP/HTTPS server and client library
cppzmq - Header-only C++ binding for libzmq
coz - Coz: Causal Profiling
distributed-process-tests - Cloud Haskell core library
libmpack - Simple implementation of msgpack in C
libcurl-cxx-std-networking-integration - Demonstration of libcurl integration into C++ 23 standard networking
nsq - A realtime distributed messaging platform