mydis is remote dictionary server, an in-memory data structure with optional durability. Some might say that mydis is a Redis clone written in Scala on top of Akka, and they would be right.
Usage: mydis [--interface <string>] [--port <integer>]
Remote dictionary server, an in-memory data structure with optional durability.
Options and flags:
--help
Display this help text.
--interface <string>, -i <string>
Interface
--port <integer>, -p <integer>
Port
mydis is distributed as "fatjar" or Docker image. To run one or the other use following commands.
docker run -p 6667:6667 pinkstack/mydis
Or use the jar
java -jar ./target/*/mydis.jar -p 6667
The easiest way to compile and run mydis is with following command
sbt assembly && java -jar ./target/*/mydis.jar -p 6667
It is also very trivial to build Docker image
sbt docker:publishLocal && docker run -p 8080:6667 pinkstack/mydis
Since mydis implements RESP protocol, you can use any Redis client, or you can emit raw commands with the help of netcat directly via TCP.
redis-cli -p 6667 ping
redis-cli -p 6667 echo "Hello world\!"
redis-cli -p 6667 set name "Oto Brglez"
redis-cli -p 6667 strlen name
redis-cli -p 6667 get name
redis-cli -p 6667 del name
Via RESP protocol and netcat:
echo -e '*1\r\n$4\r\nPING\r\n' | nc localhost 6667
SET
- Set the string value of a keyGET
- Get the value of a keyDEL
- Removes the specified keys.STRLEN
- Get the length of the string value stored at keyEXIST
- Determine if key existPING
- Ping the serverECHO
- Echo the given stringINFO
- Get information and statistics about the server
- Redis Protocol specification - RESP (
REdis
Serialization Protocol) - Redis Commands
- Redis in Action [ebook]
- The Redis Protocol is pretty great. By Will Larson
- Memcached Protocol
- Redis Commands -
COMMAND
- Redis Internals documentation
- Akka Streams pitfalls to avoid
- Integrating Akka Streams and Akka Actors: Part II
- (source) sixsigmapymes/akkaLab
- A simple way to write parsers: using the State monad. By Stéphane Derosiaux
Please understand that mydis is highly experimental project and is not meant to be used outside of experimental environment.
redis-benchmark -p 8080 -t set,get,del,ping -n 10000 -c 5 --csv