nanonext is now considered substantially feature-complete and API-stable

New Features
  • $context() method added for creating new contexts from nano Objects using supported protocols (i.e. req, rep, sub, surveyor, respondent) - this replaces the context() function for nano Objects.
  • subscribe() and unsubscribe() now accept a topic of any atomic type (not just character), allowing pub/sub to be used with integer, double, logical, complex, or raw vectors.
  • Sending via the “pub” protocol, the topic no longer needs to be separated from the rest of the message, allowing character scalars to be sent as well as vectors.
  • Added convenience auxiliary functions is_nano() and is_aio().
Updates
  • Protocol-specific helpers subscribe(), unsubscribe(), and survey_time() gain nanoContext methods.
  • Default protocol is now ‘bus’ when opening a new Socket or nano Object - the choices are ordered more logically.
  • Closing a stream now strips all attributes on the object rendering it a nil external pointer - this is for safety, eliminating a potential crash if attempting to re-use a closed stream.
  • For receives, if an error occurs in unserialisation or data conversion (e.g. mode was incorrectly specified), the received raw vector is now available at both $raw and $data if keep.raw = TRUE.
  • Setting ‘NANONEXT_TLS=1’ now allows the downloaded NNG library to be built against a system mbedtls installation.
  • Setting ‘NANONEXT_ARM’ is no longer required on platforms such as Raspberry Pi - the package configure script now detects platforms requiring the libatomic linker flag automatically.
  • Deprecated send_ctx(), recv_ctx() and logging removed.
  • All-round internal performance optimisations.
New Features
  • New stream() interface exposes low-level byte stream functionality in the NNG library, intended for communicating with non-NNG endpoints, including but not limited to websocket servers.
  • ncurl() adds an ‘async’ option to perform HTTP requests asynchronously, returning immediately with a ‘recvAio’. Adds explicit arguments for HTTP method, headers (which takes a named list or character vector) and request data, as well as to specify if conversion from raw bytes is required.
  • New messenger() function implements a multi-threaded console-based messaging system using NNG’s scalability protocols (currently as proof of concept).
  • New nano_init() function intended to be called immediately after package load to set global options.
Updates
  • Behavioural change: messages have been upgraded to warnings across the package to allow for enhanced reporting of the originating call e.g. via warnings() and flexibility in handling via setting options().
  • Returned NNG error codes are now all classed as ‘errorValue’ across the package.
  • Unified send() and recv() functions, and their asynchronous counterparts send_aio() and recv_aio(), are now S3 generics and can be used across Sockets, Contexts and Streams.
  • Revised ‘block’ argument for send() and recv() now allows an integer value for setting a timeout.
  • send_ctx() and recv_ctx() are deprecated and will be removed in a future package version - the methods for send() and recv() should be used instead.
  • To allow for more flexible practices, logging is now deprecated and will be removed entirely in the next package version. Logging can still be enabled via ‘NANONEXT_LOG’ prior to package load but logging() is now defunct.
  • Internal performance optimisations.
New Features
  • Aio values $result, $data and $raw now resolve automatically without requiring call_aio(). Access directly and an ‘unresolved’ logical NA value will be returned if the Aio operation is yet to complete.
  • unresolved() added as an auxiliary function to query whether an Aio is unresolved, for use in control flow statements.
  • Integer error values generated by receive functions are now classed ‘errorValue’. is_error_value() helper function included.
  • is_nul_byte() added as a helper function for request/reply setups.
  • survey_time() added as a convenience function for surveyor/respondent patterns.
  • logging() function to specify a global package logging level - ‘error’ or ‘info’. Automatically checks the environment variable ‘NANONEXT_LOG’ on package load and then each time logging(level = "check") is called.
  • ncurl() adds a ‘…’ argument. Support for HTTP methods other than GET.
Updates
  • listen() and dial() now return (invisible) zero rather than NULL upon success for consistency with other functions.
  • Options documentation entry renamed to opts to avoid clash with base R ‘options’.
  • Common format for NNG errors and informational events now starts with a timestamp for easier logging.
  • Allows setting the environment variable ‘NANONEXT_ARM’ prior to package installation
    • Fixes installation issues on certain ARM architectures
  • Package installation using a system ‘libnng’ now automatically detects ‘libmbedtls’, removing the need to manually set ‘NANONEXT_TLS’ in this case.
  • More streamlined NNG build process eliminating unused options.
  • Removes experimental nng_timer() utility as a non-essential function.
  • Deprecated functions ‘send_vec’ and ‘recv_vec’ removed.
New Features
  • Implements full async I/O capabilities
  • New request() and reply() functions implement the full logic of an RPC client/server, allowing processes to run concurrently on the client and server.
    • Designed to be run in separate processes, the reply server will await data and apply a function before returning a result.
    • The request client performs an async request to the server and returns immediately with an Aio.
  • New ncurl() minimalistic http(s) client.
  • New nng_timer() utility as a demonstration of NNG’s multithreading capabilities.
  • Allows setting the environment variable ‘NANONEXT_TLS’ prior to package installation
    • Enables TLS where the system NNG library has been built with TLS support (using Mbed TLS).
Updates
  • Dialer/listener starts and close operations no longer print a message to stderr when successful for less verbosity by default.
  • All send and receive functions, e.g. send()/recv(), gain a revised ‘mode’ argument.
    • This now permits R serialization as an option, consolidating the functionality of the ’_vec’ series of functions.
  • Functions ‘send_vec’ and ‘recv_vec’ are deprecated and will be removed in a future release.
  • Functions ‘ctx_send’ and ‘ctx_recv’ have been renamed send_ctx() and recv_ctx() for consistency.
  • The $socket_close() method of nano objects has been renamed $close() to better align with the functional API.
  • Initial release to CRAN, rOpenSci R-universe and Github.