Open GoogleCodeExporter opened 8 years ago
[deleted comment]
[deleted comment]
yes, add some sort of listener/observer mechanism :
- when a key is updated
- when a key is deleted
- when a key value changes
- ...
or give new commands such as (inspired from the pubsub mechanism):
NOTIFY_ON_SET key --> ex: NOTIFY_ON_SET "myclass:myobject:myfield"
NOTIFY_ON_CHANGE key
NOTIFY_ON_CREATE key
NOTIFY_ON_DELETE key
eventually
NOTIFY_ON_MATCH key regexp --> ex: NOTIFY_ON_MATCH mykey "^[0-9]+.*"
NOTIFY_ON_EXPR key boolexpr --> ex: NOTIFY_ON_EXPR mykey ($self == "ERROR")
could also add regexp alternatives
RNOTIFY_ON_CHANGE regkey --> ex: RNOTIFY_ON_CHANGE "myclass:myobject:.*"
IMHO: PUBLISH/SUBSCRIBE is useless if not related to GET/SET
Original comment by philippe...@gmail.com
on 1 May 2010 at 4:27
any updates?
Original comment by camilo.a...@gmail.com
on 13 Jan 2011 at 4:57
I've done a quick sketch of how Lua scripts could be added to redis. You can
view the diff here:
https://github.com/georgebashi/redis/compare/master...lua-scripts
Don't try it out unless you're very brave, but it adds a "LUAEXEC" command
which lets you run arbitrary Lua code, and adds a Lua function "redis()" which
lets you call commands and receive back responses in protocol format. For
example, from redis cli:
redis> luaexec "redis('incrby', 'a', '5') ; return '+OK'"
+OK
redis> get a
"5"
As I said, this is a very early version - I've done some more work since,
tidying up the interface a bit, but haven't yet had the time to tidy up and
push that to Github - if anyone's interested, I'd be happy to do so over the
weekend.
When I spoke to Pieter about the patch on IRC, he raised the point about how
having code running server-side would interact with all the features like
replication, sharding, aof, etc. I'd be interested to hear opinions on it.
Cheers,
George
Original comment by zin...@gmail.com
on 13 Jan 2011 at 5:32
I too would love to see this, possibly with the option of loading the scripts
from disk as opposed to receiveing them over the wire
Original comment by yamac...@gmail.com
on 4 May 2011 at 4:03
Original issue reported on code.google.com by
vinuth.m...@gmail.com
on 2 Apr 2010 at 8:08