nng

nanomsg-next-generation -- light-weight brokerless messaging

MIT License

Downloads
42
Stars
3.8K
Committers
80

Bot releases are visible (Hide)

nng - Version 1.8.0 Feature Release Latest Release

Published by gdamore 6 months ago

New Features

This release introduces two main features.

  • A new logging framework should help with debugging.
    This framework allows applications to provide their own loggers.
    Initially we have added logging for SP connection related events, but more can be added later.
    See nng_log(3), nng_log_set_logger(3) for details.
  • In support of the above, nng_str_sockaddr(3) is added.
    This function obtains a representation of the socket address suitable for display (or logging).

Bugs Fixed

  • A memory leak associated with a connection lock object for TLS connections is fixed.
    This only affects platforms where mutexes are allocated dynamically.

Detailed Changes

New Contributors

Full Changelog: https://github.com/nanomsg/nng/compare/v1.7.3...v1.8.0

nng - Version 1.7.3 Bug Fix Release

Published by gdamore 8 months ago

This release fixes a few bugs, including one long-standing issue.

  • Fixed deadlock closing socket on Windows (#1543)
  • Improved Mbed TLS configuration (#1771)
  • New NNG_ENABLE_IPV6 option to disable IPv6 (#1496)
  • Fix for test failures when system does not support IPv6 (also #1496)
  • Compiler warning fixes
  • Langue fixes for socket manual from @shikokuchuo
  • Fix for various documentation formatting bugs (going back to asciidoctor for formatting)

Windows users are advised to update. There is no particular urgency for updating for users of other platforms.

nng - Version 1.7.2 bug fix release

Published by gdamore 9 months ago

This release has some fairly minor fixes and improvements

  • New NNG_ENABLE_COMPAT (defaults to ON) can be disabled to remove compatibility support for legacy libnanomsg
  • Better detection and handling of Mbed TLS - especially version 3.0 and later
  • Fixed some compilation warnings

None of these are particularly urgent, but if you're using Mbed TLS or prefer to have a clean build, then this might be helpful.

nng - Version 1.7.1 Bug Fix Release

Published by gdamore 10 months ago

This fixes two problems and includes a new example program.

  • Fix the public id_map API -- the header was not published, so it wasn't usable. As part of this we've moved the header and also removed the ability to opt out (the changes here are too small to be worth reducing.) The header is now located in <nng/supplemental/util/idhash.h>.
  • FIx a warning when compiling nng_socket_pair, due to inconsistent prototypes (int * instead of int [2]).

The new demo program was contributed by Hugo Lindström [email protected] and demonstrates how to use nng_stream. It won't work on every system, but it should still be informative.

nng - Version 1.7.0 Feature Release

Published by gdamore 10 months ago

Welcome to 2024! As a New Year's gift to you, we present version 1.7.0 of NNG.

This release contains the following notable changes:

  • A new compile time setting, NNG_MAX_POLLER_THREADS is introduced, with a default value of 8, and will limit the number of threads
    used for pollers that are concurrent (currently only Windows). Additionally, for single core systems only two threads will be started instead of four.

  • A new supplemental API, nng_id_map(3), is made available. This exposes the internal ID hash API NNG uses mapping integer IDs
    (like socket IDs) to data structures. It also brings back support for 64-bit IDs. See bug #1740.

  • Setting the NNG_OPT_RECVMAXSZ setting no longer affects pipes that are already established. The old behavior was undocumented
    and racy. Please set this setting before starting any listeners or dialers.

  • A new transport (experimental), for socket:// is available. This allows a connection using sockets created with socketpair() (or the new nng_socket_pair() supplemental API), which can help use cases where file descriptors are passed between processes or inherited via fork(). This API is only available on Linux. It does have somewhat different semantics for establishing the connection, so please see the manual page for nng_socket(5) for more information.

  • WebSocket close is fixed to conform to RFC 6455, sending the close frame, and waiting to receive the close frame from the peer. This allows websocket based connections to ensure that data messages are fully delivered before shutting down. See bugs #1733, #1734 and #1735. Thanks @alawn-wang for the inspiration and a first draft of the change.

  • The REQ and SURVEYOR protocols were fixed to improve scalability when many clients or many contexts are used. As part of this change, a new option, NNG_OPT_REQ_RESENDTICK is available to adjust how often we check for expired requests. See bug #1663.

  • A new ability to override compile-time settings for thread counts is available. This facility is considered experimental, and is not documented in manual pages -- and is subject to change without notice. Please see nng_init_set_parameter() in the nng.h header file. The values that can be tuned are listed there along with comments describing their use. See bug #1572.

  • As part of the fixes for #1572, tunable values for setting fixed values (rather upper limits) for thread counts are now exposed properly via CMake variables. These are NNG_NUM_EXPIRE_THREADS and NNG_NUM_TASKQ_THREADS.

  • A new API, nng_aio_set_expire() is introduced as a complement to nng_aio_set_timeout(). This provides absolute expiration times, which may be easier in circumstances involving multiple actions such as common state-machine based idioms.

  • A bug which caused TLS connections to spin on accept, causing high CPU usage, is fixed. See bug #1673.

  • The separate thread created for the timer is removed. See bug #1729.

  • Various minor documentation fixes were made, some contributed by Patrik Wenger [email protected].

nng - Version 1.6.0 Feature Release

Published by gdamore 11 months ago

After a very long time indeed (over 2 years!), we are happy to announce v1.6.0 of NNG!

  • Numerous critical bugs were fixed; some of these led to seg faults, crashes, and
    memory leaks. See bugs #1523, #1713, #1702, #1657, #1347, #1518, #1526, #1541, #1638, #1543, #1657, #1658

  • Significant performance optimizations have been made, especially to the BUS protocol, the
    nng_sendmsg() and nng_recvmsg() functions, when connecting and disconnecting lots of pipes,
    and when using very different expiration times with vast numbers of requests.

  • New APIs were added for nng_aio_busy(), nng_ctx_sendmsg(), nng_ctx_recvmsg(), nng_device_aio().

  • A CMake tunable for limiting the number of threads use for request expiration is provided
    via the NNG_MAX_EXPIRE_THREADS option.

  • Additionally various fixes for compilation problems, documentation errata, test case, and so forth
    have been applied.

nng - Version 1.5.2 Bug Fix Release

Published by gdamore about 3 years ago

This release addresses a number of issues with 1.5.1 and 1.5.0, and users of those versions are encouraged to upgrade.

  • MbedTLS 3.0 is now supported
  • Several bugs in the aio subsystem leading to hangs or performance issues are addressed
  • Possible crash due to mismatched nni_strdup/free usage fixed
  • Fix for building on iOS, tvOS, iPadOS, watchOS
  • Incorrect version number macros in CMake configuration fixed
  • Several other minor cleanups (remove dead code, simplify some things)
nng - Version 1.5.1 Bug Fix Release

Published by gdamore over 3 years ago

This release just addresses problems with the version label and cmake version properties.

nng - Version 1.5.0 Feature Release

Published by gdamore over 3 years ago

This release provides a two new convenience APIs, nng_msg_reserve() and nng_msg_capacity(), which can help with avoiding preallocations.

Additionally this release fixes a bug introduced in v1.4.0 where setting IPC socket permissions on Linux did not work.

nng - Version 1.4.0 Feature Release

Published by gdamore over 3 years ago

This is principally a performance release, as we have introduced a bunch of new features that should improve performance, especially for higher end systems (those with multiple cores will see substantially improved scalability, and lower latencies.)

Other features:

  • TCP ports may now be specified as service names.
  • wss4, wss6, ws4, and ws6 can be used to force IPv6 or IPv4 binding for websocket URLs.
  • REQ will fail fast if no retry timer is present, and the peer disconnects
  • abstract sockets can be used on Linux (see nng_ipc.7 for details)
  • websocket stream mode now supports TEXT mode streams
  • thread names can be set, and NNG will set names for its own (see nng_thr_setname.3)
  • IPv6 scoped addresses are supported
  • nngcat grew --file and --data options to supply data to send

Thanks.

nng - Version 1.3.2 Documentation Fixes

Published by gdamore about 4 years ago

This release is just a set of improvements to fix some documentation bugs. These fixes are necessary for some of the automatic tooling we use for publication of documentation.

If already running v1.3.1, there is no urgency to update.

nng - Version 1.3.1 Bug Fix Release

Published by gdamore about 4 years ago

This is a bug fix release that rolls up a bunch of bug fixes.

  • WebSocket and HTTP support for IPv6 addresses (note: IPv6 scopes are still not supported) (#844, #1224)
  • Build fixes for NetBSD, OpenBSD, and Android (#1232, #1237)
  • Serious framing error in TLS (regression introduced in 1.3.0) (#1235)
  • nng_msg_clear was clearing the header; now it only clears the body (#1252)
  • Use-after-free segfault in rep protocol (#1241)
  • NNG_OPT_RECONNMAXT zero did not prevent exponential backoff (#1230)
  • Use-after-free in TLS (#1239)
  • Hangs in nng_close fixed (#1236, #1219)
  • Fixes to ease inclusion in other projects
  • Numerous minor doc bugs fixed
  • Various test suite bugs fixed

Also there are two minor feature enhancements:

  • Support for obtaining the peer process ID using IPC on modern macOS
  • nngcat now supports data from standard input when the file is specified as "-" (#1007)

It is recommended that all users using v1.3.0 upgrade to v1.3.1.

nng - Version 1.3.0

Published by gdamore over 4 years ago

Features

  • Support for TLS 1.3 and external TLS providers.
    There is now an API whereby external "engines" can be developed
    for different TLS implementations. The first of these, for wolfSSL,
    is available. Set this with the NNG_TLS_ENGINE cmake option.
    The default is still to use Mbed TLS. The wolfSSL plugin is
    available under a different license (GPLv3 or commercial), and also
    provides support for TLS 1.3 and FIPS 140-2 capable solutions.

  • Message cloning and related performance improvements. This is not
    a feature, so much as a rather large improvement in terms of performance.
    All workloads will see some benefit -- some will see substantial benefits.

  • Numerous other performance improvements. Much effort was made to
    reducing allocations, improving cache effectiveness, and eliminating
    extra context switches. This work is not yet done, but this is a big
    step in the right direction.

  • HTTP Server support for "non-exclusive" registration -- a given handler
    may be registered as a fallback handler (e.g. for a directory), even if
    more specific handlers are registered.

  • Performance test programs grew more options to select different
    protocols and to change the URL to test across different transports.

Notable Bug Fixes

  • Thread count is limited.
    Previously we would spawn potentially vast numbers of threads based on the
    number of available cores. By default we set an upper limit on this that
    is about 20 threads. Tune this with the NNG_MAX_TASKQ_WORKERS cmake option.

  • Raw mode fixes for XREQ and XRESPONDENT. These protocols used the raw mode
    inconsistently, leaving the header in the message body. This is corrected
    and the protocol headers are kept in the message headers. There is some small
    risk that some applications broken, but we are not aware of any that used
    RAW mode to parse message headers.

  • HTTP Server root URL handling had a few issues which are resolved.

  • Some platforms had difficult building due to inconsistencies in the
    handling of atomics.

  • Numerous test suites uncovered small (rare) races, etc. The tests
    themselves were often racy. Fixes to both NNG and the tests have been
    made, while increasing overall test coverage.

  • REP protocol with SENDFD was inconsistent (#1088).

Other Changes

  • Polyamorous Pair v1 mode is changed, such that a new API call is needed
    to use it. Further, this mode will likely be removed in a future release.
    Note that this mode also does not work with other implementations, nor
    does it support operation with nng_device().

  • Maximum hop count across nng_device() proxies is now limited to 15.
    This limit should be sufficient for all reasonable configurations,
    and forcing this allowed us to to inline the header for performance
    reasons.

  • The nng_msg_options support was removed. It was not used for anything.

nng - Version 1.2.6 Bug Fix Release

Published by gdamore over 4 years ago

This is another release to fix builds for older compiles without support for C11 atomics.

If you were able to build prior releases, there is no need to update to this release. Generally speaking, the use of older compilers will give less than ideal results; if at all possible upgrading to modern compilers is strongly recommended. The performance different is likely to be significant.

nng - Version 1.2.5 Bug Fix Release

Published by gdamore over 4 years ago

This release fixes a mistake that prevented the code from building for people on older compilers or older operating systems. Users of v1.2.4 do not need to upgrade.

nng - Version 1.2.4 Bug Fix Release

Published by gdamore almost 5 years ago

This fix contains an URGENT bug fix, and all users using v1.2.x where x <= 3 should upgrade at their earliest opportunity.

The bugs fixed are:

  • #1132 Masking error in LMQ leads to corruption
  • #1131 (openindiana) compile error
  • fix reported versions in nng.h and CMakeLists.txt

The critical bug here is #1132 which leads to use after free heap corruption, and unpredictable results once the receive or send queue wraps. The other two bugs are less critical, but should help Solaris and illumos users, and correct a bug where we reported wrong the ABI version (which could cause compatibility problems when mixing older versions with v1.2.x.)

nng - Version 1.2.3 Bug Fix Release

Published by gdamore almost 5 years ago

This release fixes a number of important bugs. It's highly recommended that folks using v1.2.0, v1.2.1, or v1.2.2 upgrade to this release.

Specifically fixed:

  • #1079 Use after free in tcp dialer
  • #1075 WebSocket use after free
  • #1064 Potential deadlock in statistics code
  • #1065 resolver leaks work structures

There were also several fixes to the test suite included with these changes.

nng - Version 1.2.2 Bug Fix Release

Published by gdamore almost 5 years ago

This release fixes two bugs that were affecting some people:

  • Crashes in the websocket code. (#986) Folks using the websocket transport are highly encouraged to update. This bug could have led to either application crashes or data corruption in transit.

  • Windows client connections not supporting NNG_OPT_LOCADDR (#1062)

This release also includes changes to the way tests are created and managed, so that more tests are run, they are easier to write, easier to collect coverage for, and easier to diagnose when they fail. This won't impact built libraries, but it should have a big improvement on the overall quality of the library over time. This will be an ongoing work.

We're also making better use of GitHub actions to test on more systems, and more configurations. While this has helped to uncover some real bugs in the library, it has also started uncovering brittleness in the test suites themselves. This is the source of a lot of false failures; we will continue working on this going forward.

nng - Version 1.2.1

Published by gdamore almost 5 years ago

Version 1.2.1 is mainly being released to correct a problem with the semantic versioning in the shared library interfaces. It also corrects a problem that may have affect non-mainstream platforms, without support for atomic operations.

Other changes should not affect library users.

nng - Version 1.2

Published by gdamore almost 5 years ago

Version 1.2 is a minor feature release of NNG.

  • Notably it includes support for non-SP protocol usages -- for example NNG can be used to make generic websocket or HTTP applications now.
  • The default maximum receive size is lifted. (If you use NNG on an untrusted network, please set an explicit limit instead of relying on the defaults!)
  • Substantial work on performance. Most protocols should see a nice boost.
  • Numerous bugs fixed.

Hopefully the next release won't be so far in the future. Thanks to everyone for their patience.