Skip to content

mydis is remote dictionary server, an in-memory data structure with optional durability. Similar to Redis.

License

Notifications You must be signed in to change notification settings

pinkstack/mydis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mydis

Docker Pulls

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.

The server

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

Building from source

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

Client

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

Supported Redis Commands

  • SET - Set the string value of a key
  • GET - Get the value of a key
  • DEL - Removes the specified keys.
  • STRLEN - Get the length of the string value stored at key
  • EXIST - Determine if key exist
  • PING - Ping the server
  • ECHO - Echo the given string
  • INFO - Get information and statistics about the server

Resources 📚

Benchmarking

Please understand that mydis is highly experimental project and is not meant to be used outside of experimental environment.

redis-vs-mydis

redis-benchmark -p 8080 -t set,get,del,ping -n 10000 -c 5 --csv

Author

Twitter Follow

About

mydis is remote dictionary server, an in-memory data structure with optional durability. Similar to Redis.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages