A new major release of RcppRedis arrived on CRAN today. RcppRedis is one of several packages connecting R to the fabulous Redis in-memory datastructure store (and much more). RcppRedis does not pretend to be feature complete, but it may do some things faster than the other interfaces, and also offers an optional coupling with MessagePack binary (de)serialization via RcppMsgPack. The package has carried production loads for several years now.
This release integrates support for pub/sub, a popular messaging pattern in which one or more clients can subscribe to one or more ‘channels’. Whenever a client instances publishes, the Redis server immediately updates all clients listening on the given channel. This pattern is fairly common to transmit data to listeners. A there is a bit more to explain about this, I also added a brand-new vignette describing pub/sub with RcppRedis, along with another introductory vignette about Redis itself. We blogged about this exciting new feature and its particular use for market monitoring in R4 #36 recently too.
The pub/sub feature was available in package rredis by Bryan Lewis and has now been ported over by Bryan in a truly elegant yet compact implementation. We placed the code for the pub/sub examples, both for a single symbol (SP 500) as well as for a set of (futures) symbols, into a new examples/ subdirectory.
Other changes in this release are the removal of the build-dependency on Boost (or, rather, my BH package), an update to the included hiredis library (used if no system-wide version is found), and an updated to the UCRT build for R. That last one is a bit of a sore spot and nobody at CRAN deemed it necessary to tell me they were waiting for me to make this change; communication with the CRAN team can still be “challenging” (and I am being generous here). Anyway, the package is now on CRAN so all is well now, at long last.
The detailed changes list follows.
Changes in version 0.2.0 (2022-03-08)
Two simple C++11 features remove needs for BH and
lexical_cast()
(Dirk in #45 addressing #44).Bryan Lewis is now a coauthor.
Added pub/sub examples for single and multiple Globex symbols.
The included hiredis sources have been updated to release 1.0.2.
Two vignettes have been added to introduce Redis and to described a live market-monitoring application included in directory
pubsub/
.The UCRT build was updated per a suggestion by Tomas.
Courtesy of CRANberries, there is also a diffstat report for this release. More information is on the RcppRedis page.
If you like this or other open-source work I do, you can now sponsor me at GitHub.
This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.