3 ms·
I reimplemented it in Java, including all the commands, with similar results. Mostly useful as a mocking tool during unit tests.
by spullara 10y ago
I reimplemented it in Java, including all the commands, with similar results. Mostly useful as a mocking tool during unit tests.
- rad_gruchalski 10y agoBut why: https://github.com/kstyrc/embedded-redis https://github.com/kstyrc/embedded-redis
- the_duke 10y agoBecause reinventing the wheel is an immense amount of fun, if you get to do it yourself. ;) A good learning experience too. Everyone should at one point write their own compiler. And maybe their own OS. (I'm only half kidding here)
- rad_gruchalski 10y agoThat's a good reason.
- the_duke 10y agoSomeone should tell the JS crowd though, that you shouldn't neccessarily reinvent everything every 6 months and use it in production.
- vertex-four 10y agoEveryone should at least try writing their own OS. Not necessarily their own kernel, or even the lowest-level utilities - things like Fiasco.OC with Genode are decent enough if you're not interested in register fiddling - but their own model for how things could work if they got to design a system for programmers and users to use from scratch. Capability systems? Network transparent message passing? Dynamic load-balancing of running processes across machines? What if you tried to let users script their workflows in a less ad-hoc way than they can now? How about trying to replace the concept of a filesystem, at the same time as trying to encourage applications to share data with each other? OS development research died a couple of decades ago, and now we have an entire generation of developers who believe the Linux/POSIX model to be the one true system. But IMHO, that's just a quirk of fate, and a local maxima, and it keeps people in the dark about alternative solutions to their problems. For example, capability system advocates will point out that their system almost implements Docker/containerization by default. There have been tons of experiments with efficient message-passing under microkernels which would likely benefit anyone attempting to design Yet Another IPC Framework in the Linux kernel. And so on and so forth.
- spullara 10y agoI could ask the same of them I suppose, since I wrote mine 2 years before their initial commit.
- spriggan3 10y ago> Mostly useful as a mocking tool during unit tests. AFAIK redis has tests, you don't need to rewrite tests for redis in Java. Mocking implies test assertions in the Mock. I'm sure redis driver for Java has tests too. That's what you should mock.
- stevekemp 10y agoYou're not alone, I wrote wire-compatible version of Redis in perl: https://github.com/skx/predis https://github.com/skx/predis Of course I simplified things by only implementing keys and sets, rather than all the operations such as hashes, etc. But allowing pluggable storage back-ends made it useful for my use-case(s).