In-browser Redis(narma.github.io)
narma.github.io
In-browser Redis
http://narma.github.io/2015/redis-in-browser/
12 comments
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.
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
(Also, it is useful to bring anonymization to the masses)
(Also, it is useful to bring anonymization to the masses)
Too bad it does not listen on a port (maybe using WebRTC), it would have been fun to connect it to Redsmin!
Does not support `flushdb` or `flushall` - I assume these had to be commented out?
It's cool. But why do we need to put redis in a browser (client side)? Just for fun?
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.
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.
Redis.io already does this fwiw
Simplest possible in-browser "Redis":
var Redis = {};
;)
var Redis = {};
;)
So that implements what subset of http://redis.io/commands ?
s/;)/:trollface:/ ;)
s/;)/:trollface:/ ;)
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
[deleted]
Using it as slave of a server side redis would be fun. :)