filip tepper - redis
DESCRIPTION
serwer struktur danych w praktyceponiedziałek, 11 lipca 2011CZEŚĆ!jestem filip.poniedziałek, 11 lipca 2011PLANco to jest redis? typy danych zabójcze cechy redis a memcached redis w praktyce tips & tricksponiedziałek, 11 lipca 2011NOSQLponiedziałek, 11 lipca 2011REDIS TO...zaawansowany system klucz-wartośćponiedziałek, 11 lipca 2011REDIS TO...serwer struktur danychponiedziałek, 11 lipca 2011@ANTIREZ@pnoordhuisponiedziałek, 11 lipca 2011poniedziałek, 11 lipcTRANSCRIPT
![Page 1: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/1.jpg)
serwer struktur danych w praktyce
poniedziałek, 11 lipca 2011
![Page 2: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/2.jpg)
CZEŚĆ!jestem filip.
poniedziałek, 11 lipca 2011
![Page 3: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/3.jpg)
PLAN
co to jest redis?
typy danych
zabójcze cechy
redis a memcached
redis w praktyce
tips & tricks
poniedziałek, 11 lipca 2011
![Page 4: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/4.jpg)
NOSQL
poniedziałek, 11 lipca 2011
![Page 5: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/5.jpg)
REDIS TO...
zaawansowany system klucz-wartość
poniedziałek, 11 lipca 2011
![Page 6: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/6.jpg)
REDIS TO...
serwer struktur danych
poniedziałek, 11 lipca 2011
![Page 7: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/7.jpg)
@ANTIREZ@pnoordhuis
poniedziałek, 11 lipca 2011
![Page 8: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/8.jpg)
poniedziałek, 11 lipca 2011
![Page 9: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/9.jpg)
YYY...
poniedziałek, 11 lipca 2011
![Page 10: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/10.jpg)
poniedziałek, 11 lipca 2011
![Page 11: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/11.jpg)
STRUKTURY DANYCH
poniedziałek, 11 lipca 2011
![Page 12: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/12.jpg)
STRING
poniedziałek, 11 lipca 2011
![Page 13: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/13.jpg)
STRING
redis> SET my:key "value"
redis> GET my:key"value"
poniedziałek, 11 lipca 2011
![Page 14: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/14.jpg)
STRING
redis> SET my:incr "10"
redis> INCR my:incr
redis> GET my:incr"11"
poniedziałek, 11 lipca 2011
![Page 15: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/15.jpg)
STRING
redis> SET hello:world "Web"
redis> APPEND hello:world "Clusters"
redis> GET hello:world"WebClusters"
redis> GETRANGE hello:world 0 2"Web"
poniedziałek, 11 lipca 2011
![Page 16: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/16.jpg)
LIST
poniedziałek, 11 lipca 2011
![Page 17: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/17.jpg)
LIST
redis> LPUSH list aredis> LPUSH list bredis> RPUSH list c
redis> LRANGE list 0 21) "b"2) "a"3) "c
poniedziałek, 11 lipca 2011
![Page 18: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/18.jpg)
LISTredis> LPUSH list aredis> LPUSH list bredis> RPUSH list c
redis> RPOPLPUSH list other:list"a"
redis> LRANGE list 0 31) "c"2) "b"
redis> LRANGE other:list 0 31) "a"
poniedziałek, 11 lipca 2011
![Page 19: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/19.jpg)
SET
poniedziałek, 11 lipca 2011
![Page 20: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/20.jpg)
SET
redis> SADD post:1:tag "ruby"redis> SADD post:1:tag "rails"redis> SADD post:1:tag "redis"
redis> SADD post:2:tag "redis"redis> SADD post:2:tag "resque"
redis> SINTER post:1:tag post:2:tag1) "redis"
poniedziałek, 11 lipca 2011
![Page 21: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/21.jpg)
SETredis> SADD post:1:tag "ruby"redis> SADD post:1:tag "rails"redis> SADD post:1:tag "redis"
redis> SADD post:2:tag "redis"redis> SADD post:2:tag "resque"
redis> SUNIONSTORE tag post:1:tag post:2:tagredis> SMEMBERS tag1) "rails"2) "redis"3) "resque"4) "ruby"
poniedziałek, 11 lipca 2011
![Page 22: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/22.jpg)
ZSET
poniedziałek, 11 lipca 2011
![Page 23: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/23.jpg)
ZSET
redis> ZADD zset 1 3redis> ZADD zset 2 2redis> ZADD zset 3 1
redis> ZRANGE zset 0 -11) "3"2) "2"3) "1"
poniedziałek, 11 lipca 2011
![Page 24: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/24.jpg)
HASH
poniedziałek, 11 lipca 2011
![Page 25: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/25.jpg)
HASH
redis> HMSET hash string:1 Hello string:2 WebClusters
redis> HGETALL hash1) "string:1"2) "Hello"3) "string:2"4) "WebClusters"
poniedziałek, 11 lipca 2011
![Page 26: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/26.jpg)
HASH
redis> HSET hash string:1 Byeredis> HSET hash string:3 2011
redis> HGETALL hash1) "string:1"2) "Bye"3) "string:2"4) "WebClusters"5) "string:3"6) "2011"
poniedziałek, 11 lipca 2011
![Page 27: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/27.jpg)
RTFM
poniedziałek, 11 lipca 2011
![Page 28: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/28.jpg)
poniedziałek, 11 lipca 2011
![Page 29: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/29.jpg)
poniedziałek, 11 lipca 2011
![Page 30: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/30.jpg)
poniedziałek, 11 lipca 2011
![Page 31: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/31.jpg)
ZABÓJCZE CECHY
poniedziałek, 11 lipca 2011
![Page 32: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/32.jpg)
TRANSAKCJE
poniedziałek, 11 lipca 2011
![Page 33: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/33.jpg)
TRANSAKCJEredis> SET account:1 30redis> SET account:2 45
redis> MULTIredis> INCRBY account:1 15QUEUED
redis> DECRBY account:2 15QUEUED
redis> EXEC1) (integer) 452) (integer) 30
poniedziałek, 11 lipca 2011
![Page 34: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/34.jpg)
PERSYSTENCJA
poniedziałek, 11 lipca 2011
![Page 35: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/35.jpg)
PERSYSTENCJA
snapshot
append-only file
poniedziałek, 11 lipca 2011
![Page 36: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/36.jpg)
PERSYSTENCJA
na żądanie
okresowa
poniedziałek, 11 lipca 2011
![Page 37: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/37.jpg)
REPLIKACJA
poniedziałek, 11 lipca 2011
![Page 38: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/38.jpg)
REPLIKACJA
poniedziałek, 11 lipca 2011
![Page 39: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/39.jpg)
PIPELINING
poniedziałek, 11 lipca 2011
![Page 40: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/40.jpg)
PIPELINING
poniedziałek, 11 lipca 2011
![Page 41: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/41.jpg)
http://www.flickr.com/photos/chadelliott2012/5659144073/
poniedziałek, 11 lipca 2011
![Page 42: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/42.jpg)
PIPELINING
poniedziałek, 11 lipca 2011
![Page 43: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/43.jpg)
PAMIĘĆ WIRTUALNA
poniedziałek, 11 lipca 2011
![Page 44: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/44.jpg)
PAMIĘĆ WIRTUALNA
poniedziałek, 11 lipca 2011
![Page 45: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/45.jpg)
KLASTROWANIE
poniedziałek, 11 lipca 2011
![Page 46: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/46.jpg)
http://www.flickr.com/photos/15708236@N07/2754478731/
poniedziałek, 11 lipca 2011
![Page 47: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/47.jpg)
http://www.flickr.com/photos/dan4th/301092024/
poniedziałek, 11 lipca 2011
![Page 48: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/48.jpg)
4096 #
poniedziałek, 11 lipca 2011
![Page 49: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/49.jpg)
KLASTROWANIE
poniedziałek, 11 lipca 2011
![Page 50: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/50.jpg)
KLASTROWANIE
redis> #1 GET foo-MOVED 3 192.168.1.1:6391
redis> #2 GET foo"bar"
poniedziałek, 11 lipca 2011
![Page 51: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/51.jpg)
KLASTROWANIE
redis> #1 CLUSTER HINTS* magic *
redis> #2 GET foo"bar"
poniedziałek, 11 lipca 2011
![Page 52: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/52.jpg)
REDIS-TRIB
poniedziałek, 11 lipca 2011
![Page 53: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/53.jpg)
MEMCACHED?
poniedziałek, 11 lipca 2011
![Page 54: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/54.jpg)
X 100 000
poniedziałek, 11 lipca 2011
![Page 55: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/55.jpg)
SET
memcached redis
6.926125 s 8.470477 s
poniedziałek, 11 lipca 2011
![Page 56: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/56.jpg)
PIPELINE SET
memcached redis
6.926125 s 0.916335 s
poniedziałek, 11 lipca 2011
![Page 57: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/57.jpg)
GET
memcached redis
6.904938 s 7.572058 s
poniedziałek, 11 lipca 2011
![Page 58: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/58.jpg)
PIPELINE GET
memcached redis
6.904938 s 0.651953 s
poniedziałek, 11 lipca 2011
![Page 59: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/59.jpg)
MGET
memcached redis
1.010348 s 0.185136 s
poniedziałek, 11 lipca 2011
![Page 60: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/60.jpg)
RAM
memcached redis
436 KB 1.1 MB
poniedziałek, 11 lipca 2011
![Page 61: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/61.jpg)
RAM
k 17 - 22 bajty
v 19 - 24 bajty
poniedziałek, 11 lipca 2011
![Page 62: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/62.jpg)
STRING
memcached redis
14 MB 13.9 MB
poniedziałek, 11 lipca 2011
![Page 63: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/63.jpg)
INTEGER
memcached redis
11 MB 10.7 MB
poniedziałek, 11 lipca 2011
![Page 64: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/64.jpg)
HASH
"an-average-key-1" => "1""an-average-key" => "1": "1"
poniedziałek, 11 lipca 2011
![Page 65: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/65.jpg)
HASH
memcached redis
11 MB 9 MB
poniedziałek, 11 lipca 2011
![Page 66: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/66.jpg)
PRAKTYKA
poniedziałek, 11 lipca 2011
![Page 67: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/67.jpg)
RESQUE
poniedziałek, 11 lipca 2011
![Page 68: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/68.jpg)
RESTMQ
poniedziałek, 11 lipca 2011
![Page 69: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/69.jpg)
poniedziałek, 11 lipca 2011
![Page 70: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/70.jpg)
WHO’S ONLINE?
poniedziałek, 11 lipca 2011
![Page 71: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/71.jpg)
STATYSTYKI
poniedziałek, 11 lipca 2011
![Page 72: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/72.jpg)
WYSZUKIWANIE
poniedziałek, 11 lipca 2011
![Page 73: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/73.jpg)
SOCIAL GRAPH
poniedziałek, 11 lipca 2011
![Page 74: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/74.jpg)
TIPS & TRICKS
poniedziałek, 11 lipca 2011
![Page 75: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/75.jpg)
640K ought to be enough for anybody
poniedziałek, 11 lipca 2011
![Page 76: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/76.jpg)
3 != “3”poniedziałek, 11 lipca 2011
![Page 77: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/77.jpg)
32 > 64W BITACH
poniedziałek, 11 lipca 2011
![Page 78: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/78.jpg)
http://www.flickr.com/photos/memestate/45986749/
poniedziałek, 11 lipca 2011
![Page 79: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/79.jpg)
ONE MORE THING
poniedziałek, 11 lipca 2011
![Page 80: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/80.jpg)
poniedziałek, 11 lipca 2011
![Page 81: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/81.jpg)
http://www.flickr.com/photos/15708236@N07/2754478731/
poniedziałek, 11 lipca 2011
![Page 82: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/82.jpg)
-- hello.lua-- the first program in every language
io.write("Hello world, from ",_VERSION,"!\n")
poniedziałek, 11 lipca 2011
![Page 83: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/83.jpg)
redis = Redis.newscript = <<LUA local value = tonumber(redis.call('get', KEYS[1])) if value == nil then return {err = "Value at key is not integer"} end if value > tonumber(ARGV[1]) then value = value - 1 redis.call('set', KEYS[1], value) end return valueLUA
redis.set :x, 45.times { puts(redis.eval(script, 1, :x, 0)) }
poniedziałek, 11 lipca 2011
![Page 84: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/84.jpg)
~/Code/webclusters-redis master $ ./run lua.rb32100
poniedziałek, 11 lipca 2011
![Page 85: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/85.jpg)
https://github.com/filiptepper/webclusters-redis
poniedziałek, 11 lipca 2011
![Page 86: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/86.jpg)
poniedziałek, 11 lipca 2011
![Page 87: Filip Tepper - Redis](https://reader034.vdocuments.pub/reader034/viewer/2022051400/5500139b4a7959da6c8b4db9/html5/thumbnails/87.jpg)
O CZYM ZAPOMNIAŁEM?
poniedziałek, 11 lipca 2011