The nanomsg library is a simple high-performance implementation of several "scalability protocols". These scalability protocols are lightweight messaging protocols that can be used to solve a number of very common messaging patterns, such as request/reply, publish/subscribe, surveyor/respondent, and so forth. These protocols can run over a variety of transports such as TCP, UNIX sockets, and even WebSocket. This pattern is useful for solving producer/consumer problems, including load-balancing. Messages flow from the push side to the pull side. If multiple peers are connected, the pattern attempts to distribute fairly. 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.
Features
- Simple one-to-one communication
- Simple many-to-many communication
- Allows to build clusters of stateless services to process user requests
- Distributes messages to large sets of interested subscribers
- Aggregates messages from multiple sources and load balances them among many destinations
- Allows to query state of multiple applications in a single go