An in-memory database similar to Redis, built using Elixir.
Warning
AllyDB now includes all the essential features as originally planned.
Additional roadmap features may or may not be added in the future.
However, the project remains a great resource for learning how to create a similar project, and AllyDB can still be used since all the basic features are available.
Thank you for your interest and support!
(?)
means that the item is an idea, but it is unclear how it will be implemented, or how the implementation will look like.
(!)
means that the item will probably be implemented in the future, but it is not a priority.
- Basic key value store
- Lists
- Usage Guide
- Persistence
- Hashes
- Sets
- Sorted Sets (!)
- Pub/Sub (!)
- Clustering/Distribution (?)
- Custom database and persistence settings (?)
- Better usage of OTP (?)
- Better usage of ETS (?)
- Optimize persistence (?)
- Rust NIFs for heavy operations (?)
- Testing
- Improve code quality
- Extract repetitive code into functions
Name | Description | Default |
---|---|---|
ALLYDB_PORT |
The port on which the server will listen | 4000 |
PERSISTENCE_LOCATION |
The location where the database will be persisted | allydb.tab |
PERSISTENCE_INTERVAL |
The interval at which the database will be persisted | 3000 |
LOG_PERSISTENCE_LOCATION |
The location where the log file will be stored | allydb.log |
You can use the docker image to run the database.
> docker pull allyedge/allydb
> docker run -p 4000:4000 allyedge/allydb
You can also build the project from source.
> git clone https://github.com/Allyedge/allydb
> cd allydb
> mix deps.get
> mix compile
> mix release --env=prod
> _build/prod/rel/allydb/bin/allydb start
You can find the documentation here.
> SET hello world
world
> GET hello
world
> DEL hello
hello
> lpush list 1
1
> lpush list 2
2
> lpush list 3
3
> lpop list
3
> hset user id 1 name john age 20
3
> hget user name
john
> hgetall user
age
20
id
1
name
john
> hdel user age
1
The database is persisted to an append only log file. This means that the database can be restored to a previous state.
The database is also persisted on a regular interval, in case something happens to the log file.
The interval can be configured using the PERSISTENCE_INTERVAL
environment variable. The default value is 3000ms
.
AllyDB is licensed under the Apache License 2.0. You can find the license here.