blob: 8199480daf9f55b4b161b235d252e8000cac133d [file] [log] [blame]
---
title: Nanomsg
layout: default
---
:icons: font
ifdef::env-github[]
:tip-caption: :bulb:
:note-caption: :information_source:
:important-caption: :heavy_exclamation_mark:
:caution-caption: :fire:
:warning-caption: :warning:
endif::[]
== About Nanomsg
NOTE: The latest release of nanomsg is {{ site.latest }}.
*_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.
TIP: A new project, https://github.com/nanomsg/nng[_nng_], is underway
as reimplementation of these same protocols.
_nng_ is wire compatible with _nanomsg_, and offers a number of additional
advanced capabilities.
Although _nng_ itself is still in pre-release state, we are encouraging
people using or considering using _nanomsg_ to look at _nng_.
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.
The following scalability protocols are currently available:
* PAIR - simple one-to-one communication
* BUS - simple many-to-many communication
* REQREP - allows to build clusters of stateless services to process user requests
* PUBSUB - distributes messages to large sets of interested subscribers
* PIPELINE - aggregates messages from multiple sources and load balances them among many destinations
* SURVEY - allows to query state of multiple applications in a single go
Scalability protocols are layered on top of the transport layer in the network
stack.
At the moment, the _nanomsg_ library supports the following transports
mechanisms:
* INPROC - transport within a process (between threads, modules etc.)
* IPC - transport between processes on a single machine
* TCP - network transport via TCP
* WS - websockets over TCP
The library exposes a BSD-socket-like C API to the applications.
It is licensed under the
https://github.com/nanomsg/nanomsg/blob/master/COPYING[MIT/X11 license].