ProductPromotion
Logo

R Programming

made by https://0x3d.site

GitHub - richfitz/redux: :telephone_receiver::computer: Redis client for R
:telephone_receiver::computer: Redis client for R. Contribute to richfitz/redux development by creating an account on GitHub.
Visit Site

GitHub - richfitz/redux: :telephone_receiver::computer: Redis client for R

GitHub - richfitz/redux: :telephone_receiver::computer: Redis client for R

redux

Project Status: Active - The project has reached a stable, usable state and is being actively developed. R build status codecov.io

redux provides an interface to Redis. Two interfaces are provided; a low level interface (allowing execution of arbitrary Redis commands with almost no interface) and a high-level interface with an API that matches all of the several hundred Redis commands.

As well as supporting Redis commands, redux supports:

  • pipelineing: execute more than one command in a single Redis roundtrip, which can greatly increase performance, especially over high-latency connections.
  • socket connections: can connect to a locally running Redis instance over a unix socket (if Redis is configured to do so) for faster communication.
  • flexible serialisation: serialise any part of a Redis command, including keys and fields. Binary serialisation is supported via object_to_bin / bin_to_object, which are thin wrappers around serialize / unserialize
  • subscriptions: create a simple blocking subscribe client, applying a callback function to every message received.
  • error handling: Every Redis error becomes an R error.

redux also provides a driver for storr, allowing easy exchange of R objects between computers.

Usage

Create a hiredis object:

r <- redux::hiredis()

The hiredis object is a hiredis object with many (many methods), each corresponding to a different Redis command.

r
## <redis_api>
##   Redis commands:
##     APPEND: function
##     AUTH: function
##     BGREWRITEAOF: function
##     BGSAVE: function
##     ...
##     ZSCORE: function
##     ZUNIONSTORE: function
##   Other public methods:
##     clone: function
##     command: function
##     config: function
##     initialize: function
##     pipeline: function
##     reconnect: function
##     subscribe: function
##     type: function

All the methods are available from this object; for example to set "foo" to "bar", use:

r$SET("foo", "bar")

See the package vignette for more information (vignette("redux")) or https://richfitz.github.io/redux/articles/redux.html

Testing

To use the test suite, please set the environment variables

  • NOT_CRAN=true
  • REDUX_TEST_USE_REDIS=true
  • REDUX_TEST_ISOLATED=true

The first two opt in to using redis at all, and the third activates commands that may be destructive or undesirable to use on a production server.

Installation

Install from CRAN with

install.packages("redux")

or install the development version with

remotes::install_github("richfitz/redux", upgrade = FALSE)

See also

There is considerable prior work in this space:

  • rredis, the original R Redis client
  • RcppRedis, Dirk Eddelbuettel's R Redis client, which greatly influenced the design decisions here
  • hiredis-rb, the Ruby Redis client that inspired the subscribe and pipeline support here.
  • rrlite, an almost identical interface to rlite, a serverless-zero configuration database with an identical interface to Redis

License

GPL-2 © Rich FitzJohn.

More Resources
to explore the angular.

mail [email protected] to add your project or resources here 🔥.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory