
In-browser Redis - ghosh
http://narma.github.io/2015/redis-in-browser/
======
antirez
For me emscripten is today like the ZX Spectrum emulator for the C64 was when
I was a child: I understand how it works, but this is not enough to stop the
wow moment.

~~~
fiatjaf
The best use of emscripten I've seen to this day is this compilation of the
big complex piece of software that is GNUnet to the browser:
[https://github.com/amatus/gnunet-web](https://github.com/amatus/gnunet-web)

(Also, it is useful to bring anonymization to the masses)

------
vinceyuan
It's cool. But why do we need to put redis in a browser (client side)? Just
for fun?

~~~
zimbatm
One application would be to embed redis with the online documentation. This
would allow to not only show examples but make them executable as well. The
user could play with them without having to install anything.

Most of these "try X" features need a user session, allocate a server-side
component to that session and then manage recycling. It's much less expensive
to stick a JS on a CDN, and also scales much easier horizontally.

~~~
phpnode
Redis.io already does this fwiw

------
al2o3cr
Simplest possible in-browser "Redis":

var Redis = {};

;)

~~~
philsnow
So that implements what subset of
[http://redis.io/commands](http://redis.io/commands) ?

s/;)/:trollface:/ ;)

~~~
imslavko
Here is my implementation of an in-memory Redis based on JS objects that
supports Lists, Strings and Hashes commands. This implementation is mostly
used as an in-memory cache in the browser to sync state from the server in the
Meteor framework:

[https://github.com/meteor/miniredis](https://github.com/meteor/miniredis)

------
fgribreau
Too bad it does not listen on a port (maybe using WebRTC), it would have been
fun to connect it to Redsmin!

------
alistairjcbrown
Does not support `flushdb` or `flushall` - I assume these had to be commented
out?

------
ende42
Nice!

Using it as slave of a server side redis would be fun. :)

