magbo system

in-memory key-value lightweight database

For my little project I need lightweight in-memory database. My first idea was to use Redis (I have some experience with it) but it requires some library to control it. I need something more lightweight. I think using linux named pipes is elegant way how communicate with a database. Here is the full source of my lightweight in-memory database:

You can create a database instance with starting the daemon (only argument is where will be named pipe created):

./ /tmp/ims

Then you can put and get values with echo command:

$ echo "test=abc" > /tmp/ims && cat /tmp/ims

$ echo "test" > /tmp/ims && cat /tmp/ims

One thought on “in-memory key-value lightweight database

  1. Pingback: in-memory-storage and D-Bus |

Leave a Reply

Your email address will not be published. Required fields are marked *