
Redis site now implements interactive examples with embedded live Redis cli - antirez
http://redis.io/commands/mget
======
antirez
Thanks to Pieter Noordhuis (that started from the work of Alex McHale in
try.redis-db.com) for implementing this awesome thing.

I hope other sites will follow this approach of a "live" documentation where
the user can type commands. This makes a lot of sense for dynamic programming
languages as well.

~~~
nestlequ1k
amazing! thanks for that. curious, how is this implemented on the server?
seems like each command is posted to /session/ url.

~~~
pietern
All keys are namespaced to a unique session identifier, so parallel sessions
are isolated. You can check out the code for the interactive stuff here:
[https://github.com/antirez/redis-
io/tree/master/lib/interact...](https://github.com/antirez/redis-
io/tree/master/lib/interactive)

------
jcromartie
This is really incredible. I am showing this to people and they don't quite
believe it. They think it's some kind of simulator or JavaScript trick.

------
magicseth
I just ran "MGET key1" and it returned "FOOBAR". Has this happened to anyone
else?

~~~
pietern
Sorry about that, just deployed a fix to make it less likely for session
identifiers to collide. Shouldn't happen again.

