All Projects → xmonader → nim-redisclient

xmonader / nim-redisclient

Licence: other
sync/async redis clients for Nim

Programming Languages

nim
578 projects

Projects that are alternatives of or similar to nim-redisclient

SandDB
A simple immutable database for the masses.
Stars: ✭ 21 (+5%)
Mutual labels:  asynchronous
AsyncIterator
An asynchronous iterator library for advanced object pipelines in JavaScript
Stars: ✭ 43 (+115%)
Mutual labels:  asynchronous
spellbook
Functional library for Javascript
Stars: ✭ 14 (-30%)
Mutual labels:  asynchronous
debugging-async-operations-in-nodejs
Example code to accompany my blog post on debugging async operations in Node.js.
Stars: ✭ 22 (+10%)
Mutual labels:  asynchronous
venusscript
A dynamic, interpreted, scripting language written in Java.
Stars: ✭ 17 (-15%)
Mutual labels:  asynchronous
ssdp-client
The most lightweight asynchronous Java SSDP (Simple Service Discovery Protocol) Client
Stars: ✭ 46 (+130%)
Mutual labels:  asynchronous
Rump
REST client for Java that allows for easy configuration and default values. Allows for quick request construction and a huge range of modifications by using response/request interceptors, adjusting default values related to HTTP requests and creating custom instances for when you need multiple API connection setups.
Stars: ✭ 55 (+175%)
Mutual labels:  asynchronous
elfo
Your next actor system
Stars: ✭ 38 (+90%)
Mutual labels:  asynchronous
asynckivy
async library for Kivy
Stars: ✭ 56 (+180%)
Mutual labels:  asynchronous
logtoes
Demo of Asynchronous pattern (worker) using Python Flask & Celery
Stars: ✭ 49 (+145%)
Mutual labels:  asynchronous
AsyncSuffix
Asynchronous methods naming checker for ReSharper
Stars: ✭ 19 (-5%)
Mutual labels:  asynchronous
cashews
Cache with async power
Stars: ✭ 204 (+920%)
Mutual labels:  asynchronous
dialectic
Transport-polymorphic, asynchronous session types for Rust
Stars: ✭ 60 (+200%)
Mutual labels:  asynchronous
RunAll
This is a library for running the concurrent processing using only native Google Apps Script (GAS).
Stars: ✭ 55 (+175%)
Mutual labels:  asynchronous
pyfadeaway
python RPC module
Stars: ✭ 30 (+50%)
Mutual labels:  asynchronous
promise4j
Fluent promise framework for Java
Stars: ✭ 20 (+0%)
Mutual labels:  asynchronous
fetch-action-creator
Fetches using standardized, four-part asynchronous actions for redux-thunk.
Stars: ✭ 28 (+40%)
Mutual labels:  asynchronous
aiodynamo
Asynchronous, fast, pythonic DynamoDB Client
Stars: ✭ 51 (+155%)
Mutual labels:  asynchronous
tsukuyomi
Asynchronous Web framework for Rust
Stars: ✭ 81 (+305%)
Mutual labels:  asynchronous
FastAPI-template
Feature rich robust FastAPI template.
Stars: ✭ 660 (+3200%)
Mutual labels:  asynchronous

redisclient

Provides sync and async clients to communicate with redis servers using nim-redisparser

Executing commands

Sync

  let con = open("localhost", 6379.Port)
  echo $con.execCommand("PING", @[])
  echo $con.execCommand("SET", @["auser", "avalue"])
  echo $con.execCommand("GET", @["auser"])
  echo $con.execCommand("SCAN", @["0"])

Async

  let con = await openAsync("localhost", 6379.Port)
  echo await con.execCommand("PING", @[])
  echo await con.execCommand("SET", @["auser", "avalue"])
  echo await con.execCommand("GET", @["auser"])
  echo await con.execCommand("SCAN", @["0"])
  echo await con.execCommand("SET", @["auser", "avalue"])
  echo await con.execCommand("GET", @["auser"])
  echo await con.execCommand("SCAN", @["0"])

  await con.enqueueCommand("PING", @[])
  await con.enqueueCommand("PING", @[])
  await con.enqueueCommand("PING", @[])
  echo await con.commitCommands()

Pipelining

You can use enqueueCommand and commitCommands to make use of redis pipelining

  con.enqueueCommand("PING", @[])
  con.enqueueCommand("PING", @[])
  con.enqueueCommand("PING", @[])

  echo $con.commitCommands()

Connection Pool

There is a simple connection pool included - which was a folk of zedeus's redpool

import redisclient, redisclient/connpool
proc main {.async.} =
    let pool = await newAsyncRedisPool(1)
    let conn = await pool.acquire()
    echo await conn.ping()
    pool.release(conn)

    pool.withAcquire(conn2):
      echo await conn2.ping()
    await pool.close()
waitFor main()

Roadmap

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].