What happens to volatile keys when loading from RDB in Redis?
redis rdb ttl foo@bar:~$ redis-cli 127.0.0.1:6379> flushall OK 127.0.0.1:6379> save OK 127.0.0.1:6379> set p persistent OK 127.0.0.1:6379> set v volatile OK 127.0.0.1:6379> expire v...
View ArticleRedis absolute TTL (accuracy +/- 1 second)
absttl.lua -- Returns a key's absolute TTL local t = tonumber(redis.call('TTL', KEYS[1])) if t > 0 then t = t + tonumber(redis.call('TIME')[1]) end return t
View ArticleTen Redis Commandments
10-redis-commandments.md "Went up the mountain, spent some time there, a bush or something was burning and I must have inhaled the smoke because I came back down carrying these two slabs of stone...",...
View Article20150903 Ask a Redis Expert Webinar - Why Your MongoDB�Needs Redis
external-references.md Slide deck Ask a Redis Expert Webinar - Why Your MongoDB Needs Redis: http://www.slideshare.net/itamarhaber/why-your-mongodb-needs-redis URLs Redis Watch Newsletter:...
View ArticleUse Redis in Odd and Unusual Ways - Percona LIVE! Europe 2015
00_external_references.md Slidedeck: https://www.slideshare.net/itamarhaber/use-redis-in-odd-and-unusual-ways Redis Watch - a periodic newsletter about everything Redis: http://bit.ly/RedisWatch Redis...
View Articlememtier_benchmark results for Memcached and Redis using the defaults on a i5...
output.txt foo@bar:~/memtier_benchmark$ ./memtier_benchmark -p 11211 -P memcache_text -x 1 [RUN #1] Preparing benchmark client... [RUN #1] Launching threads now... [RUN #1 100%, 46 secs] 0 threads:...
View ArticleRedis Quadtrees in Hash - finally motivated because of...
formal-benchmark.txt foo@bar:~/src/quadtree$ redis-cli zcard x (integer) 100000 foo@bar:~/src/quadtree$ redis-cli zcard y (integer) 100000 foo@bar:~/src/quadtree$ redis-cli hlen qt (integer) 56325...
View ArticleTrash Mention's alerts
code.py import requests import json jt = json.dumps({'trashed': True}) url = 'https://api.mention.net/api/accounts/<account identifier>/alerts/<alert identifier>/mentions' gh = {'Accept':...
View ArticleLoading a binary value from a file with redis-cli
method-1-binary-file.md Create the file with the actual bytes, not the '\xnn\ representation. For example, in Python: f = open('filename', 'w') f.write('\x01\x02\x03') f.close() Load the file with...
View ArticleLearn Lua quickly with this short yet comprehensive and friendly script. It's...
learn.lua -- Two dashes start a one-line comment. --[[ Adding two ['s and ]'s makes it a multi-line comment. --]] ---------------------------------------------------- -- 1. Variables and flow control....
View ArticleA micro OSS project, blog post or an addition to...
luainsider.md Luainsider - manage your Redis Lua scripts like a pro A methodology, approach and apparatus for semi-persisting and aliasing Redis Lua scripts. FAIR WARNING: this is WIP (i.e. could blow...
View Articlefile2resp.sh
file2resp.sh #!/bin/bash # Why? Education & zero redis-cli dependecy # (it is a shame, however, that this functionality isn't a part of redis-cli... PR on the way) HOST=127.0.0.1 PORT=6379 if [ $#...
View ArticleModule development environment walkthrough
README.md Redis module development environment This document outlines the set up of a development environment for Redis Modules. Prerequisites A Linux server (e.g. Ubuntu Gnome 16.10) Packages: sudo...
View ArticleCron-like Redis module
.gitignore *.xo *.so *.o README.md Assumes: Redis unstable in .. hiredis in .., already made Makefile SHOBJ_CFLAGS ?= -W -Wall -fno-common -g -ggdb -std=c99 -O2 -pthread SHOBJ_LDFLAGS ?= -shared...
View ArticleMe and My Friend ZADD
poem.txt This is my friend His name is ZADD He's is a lad Who's always SADD It's really bad That ZADD is SADD I don't know why And that makes me SCARD I hope that he Will be someday glad And that...
View ArticleRedis ASCII logos
orginal-redis-server-logo.txt _._ _.-``__ ''-._ _.-`` `. `_. ''-._ Redis 999.999.999 (3f9e2322/0) 64 bit .-`` .-```. ```\/ _.,_ ''-._ ( ' , .-` | `, ) Running in standalone mode |`-._`-...-`...
View ArticleKeybase.io proof of identity
keybase.md Keybase proof I hereby claim: I am itamarhaber on github. I am itamarhaber (https://keybase.io/itamarhaber) on keybase. I have a public key whose fingerprint is 94E5 0F40 576C 29EA A92A...
View ArticleA friend forwarded me this and swears this is a real email. I read it it like...
acme-voynich.md To: all@acme.org From: fjg332@acme.org Subject: Organizational challenges Hi, As CDO of this company, it is my job to also to organizate because that's what the big-O in my title is...
View ArticleThreaded Redis PubSub demonstration in Python w/ redis-py
pubsub.py # Demonstrates PubSub import threading import redis class Listener(threading.Thread): def __init__(self, r, p): threading.Thread.__init__(self) self.redis = r self.pubsub =...
View ArticleA somewhat optimized scripted approach to complementing Redis with a...
setbitrange.lua --[[ Sets a bitmap range Bitmaps are stored as Strings in Redis. A range spans one or more bytes, so we can call `SETRANGE` when entire bytes need to be set instead of flipping...
View ArticleHappy Xmas!
xmas.lua local h,d,r=9, 0,{} while h>0 do local l='' h=h-1 for x=0, 38 do local a=x-6 if a<0 then a = -a end if a <= d then l = l .. '*' elseif (0.3/ (h+1)) > math.random() then l=l..'.'...
View ArticleSome thoughts about "Building a sliding window rate limiter with Redis"
some_thoughts.md Reading Building a sliding window rate limiter with Redis, and w/o addressing the actual logic (which may or may not work). Optimize by: Lua seems a much better choice: idiompotent,...
View ArticleEdgexfoundry and Redis for Core Data PoC
edgex-go-redisdb.md Edgexfoundry and Redis for Core Data PoC Objectives Implement the Redis client for edgex-go core data client tests/benchmarks Compare between TCP, UDS and embedded Redis...
View ArticleNaively call RedisTF from Python with redis-py
README.md Clone, sh get_deps.sh, and make run https://github.com/lantiga/RedisTF pip install redis tensorflow cd models Run python tf-minimal.py to prepare a minimal graph The attached redistf-py.py...
View Articleacl-app-profile.md
acl-app-profile.mdACL v6RC1 default app profileThe purpose of this exercise is to define a "default" application ACL profile that can access the all the data without being able to cause too much...
View Articlestructor mkdocs
docs.DockerfileFROM alpineENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/.local/binCOPY requirements.txt /mkdocs/WORKDIR /mkdocsRUN apk --update upgrade \&& apk...
View ArticleRedis 6.0 & 6.2
part1.mdRedis 6.0 GA Apr 30, 2020Access Control List (ACL)Redis Serialization Protocol 3 (RESP3)Client Side Caching (CSC)SSL (#WontFix)Better expiry!!!Diskless replication!11more!!!111one...
View ArticleDump a Redis key in TCL binary string encoding
tcl-dump.lua-- DUMPs a Redis key in TCL-compatible binary string encodinglocal b = redis.call("DUMP",KEYS[1])local s =""for i =1, string.len(b), 1do s = s...
View ArticleRedis key to hashslot in Lua
hashslot.lua This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode...
View Article