redux

:telephone_receiver::computer: Redis client for R

https://github.com/richfitz/redux

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.8%) to scientific vocabulary

Keywords from Contributors

geo
Last synced: 10 months ago · JSON representation

Repository

:telephone_receiver::computer: Redis client for R

Basic Info
Statistics
  • Stars: 95
  • Watchers: 9
  • Forks: 17
  • Open Issues: 17
  • Releases: 0
Created over 10 years ago · Last pushed 10 months ago
Metadata Files
Readme Changelog

README.md

redux

Project Status: Active - The project has reached a stable, usable state and is being actively developed. R-CMD-check Codecov test coverage <!-- badges: end -->

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 r <- redux::hiredis()

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

```r r

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

r install.packages("redux")

or install the development version with

r 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.

Owner

  • Name: Rich FitzJohn
  • Login: richfitz
  • Kind: user
  • Location: London, UK
  • Company: @mrc-ide, @vimc, @reside-ic, @ropensci

GitHub Events

Total
  • Watch event: 5
  • Issue comment event: 1
  • Push event: 8
  • Pull request event: 2
Last Year
  • Watch event: 5
  • Issue comment event: 1
  • Push event: 8
  • Pull request event: 2

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 222
  • Total Committers: 5
  • Avg Commits per committer: 44.4
  • Development Distribution Score (DDS): 0.09
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Rich FitzJohn r****n@g****m 202
Jeroen Ooms j****s@g****m 14
Kun Ren r****n@o****m 4
Tobias Verbeke t****e@o****u 1
Ihaddaden Mohamed El Fodil i****l@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 38
  • Total pull requests: 26
  • Average time to close issues: 5 months
  • Average time to close pull requests: about 1 month
  • Total issue authors: 16
  • Total pull request authors: 8
  • Average comments per issue: 1.26
  • Average comments per pull request: 1.92
  • Merged pull requests: 18
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 2
  • Pull requests: 3
  • Average time to close issues: N/A
  • Average time to close pull requests: 2 months
  • Issue authors: 2
  • Pull request authors: 1
  • Average comments per issue: 6.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • richfitz (20)
  • r2evans (3)
  • renkun-ken (2)
  • wlandau (1)
  • arunsrinivasan (1)
  • jcohen02 (1)
  • HenrikBengtsson (1)
  • wlandau-lilly (1)
  • alanault (1)
  • s-fleck (1)
  • vanpeltj (1)
  • picarus (1)
  • dereckmezquita (1)
  • jacobxk (1)
  • riccardopinosio (1)
Pull Request Authors
  • richfitz (11)
  • jeroen (9)
  • feddelegrand7 (1)
  • jcohen02 (1)
  • renkun-ken (1)
  • tverbeke (1)
  • dselivanov (1)
  • r2evans (1)
Top Labels
Issue Labels
fixed-in-develop (7) documentation (2) help wanted (1)
Pull Request Labels
hacktoberfest-accepted (1)

Packages

  • Total packages: 3
  • Total downloads:
    • cran 2,499 last-month
  • Total docker downloads: 353,706
  • Total dependent packages: 4
    (may contain duplicates)
  • Total dependent repositories: 26
    (may contain duplicates)
  • Total versions: 7
  • Total maintainers: 1
proxy.golang.org: github.com/richfitz/redux
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 9.0%
Average: 9.6%
Dependent repos count: 10.2%
Last synced: 10 months ago
cran.r-project.org: redux

R Bindings to 'hiredis'

  • Versions: 5
  • Dependent Packages: 4
  • Dependent Repositories: 26
  • Downloads: 2,499 Last month
  • Docker Downloads: 353,706
Rankings
Forks count: 4.4%
Stargazers count: 4.4%
Dependent repos count: 5.4%
Dependent packages count: 9.3%
Average: 9.8%
Downloads: 12.1%
Docker downloads count: 23.1%
Maintainers (1)
Last synced: 10 months ago
conda-forge.org: r-redux
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Stargazers count: 32.6%
Dependent repos count: 34.0%
Forks count: 34.7%
Average: 38.1%
Dependent packages count: 51.2%
Last synced: 10 months ago

Dependencies

DESCRIPTION cran
  • R >= 3.2.0 depends
  • R6 * imports
  • storr >= 1.1.1 imports
  • knitr * suggests
  • rmarkdown * suggests
  • sys * suggests
  • testthat * suggests
.github/workflows/R-CMD-check.yaml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • actions/upload-artifact main composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • shogo82148/actions-setup-redis v1 composite
.github/workflows/pkgdown.yaml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • shogo82148/actions-setup-redis v1 composite
.github/workflows/test-coverage.yaml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • shogo82148/actions-setup-redis v1 composite