Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Redis site now implements interactive examples with embedded live Redis cli (redis.io)
60 points by antirez on Jan 3, 2011 | hide | past | favorite | 7 comments


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.


It's a bit more difficult with programming languages where you can thrash the server its hosted on with simple commands.

Redis on the otherhand is designed for exactly this kind of insane throughput.

On another note, I'm loving that you are putting the time complexity of the commands right on the page.


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


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...


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.


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


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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: