lattice
Version, currently master branch1 version
- master branchlatestJan 12, 2019
github.com/alanrgan/lattice
Simple Chord-based distributed in-memory key-value store written in Crystal
Installation
# Add this to your shard.yml
dependencies:
lattice:
github: alanrgan/lattice
branch: mastermaster is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
0.26.1- License
- MIT
- Author
- Alan Gan
- Target
latticefrom src/lattice.cr
Dependencies
This version declares no dependencies.
README
lattice
A simple Chord-based in-memory distributed key-value store.
Installation
Requires Crystal 0.27.0 and Docker.
To build the lattice docker image, run make build.
Configuration
In the provided docker-compose.yml file, configure hosts as follows:
<CLIENT_NAME>:
image: lattice
volumes:
- /PATH/TO/CONFIG:/lattice/lattice.conf.yml
networks:
<STATIC_NETWORK_ID>:
ipv4_address: <STATIC_IP_ADDRESS>
tty: true
depends_on:
- <SEED_SERVICE_ID>
where:
<CLIENT_NAME>is a unique identifier for a host container/PATH/TO/CONFIGis the path to the lattice.conf.yml file for the node<STATIC_NETWORK_ID>is ID of the static network containing the nodes<SEED_SERVICE_ID>is the container name of any seed node, which must be launched before other services.
The corresponding lattice.conf.yml file for the above node would look as follows:
local:
address: <STATIC_IP_ADDRESS>
known_hosts:
- { address: <SEED_IP> }
- { address: <SEED_2_IP> }
Multiple seeds can be specified.
Usage
Start the application with make run. An interactive prompt will be displayed, through which the following commands can be run:
SET <KEY> <VALUE>GET <KEY>OWNERS <KEY>- lists the addresses of the nodes that store the key locallyLIST_LOCAL- list all keys that the current node stores
Contributing
- Fork it (https://github.com/your-github-user/lattice/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Contributors
- alanrgan Alan Gan - creator, maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
master- Seen
- Jan 12, 2019
- Crystal
0.26.1- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/alanrgan/lattice
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 13, 2026
- Synced
- Aug 13, 2026
- Versions
- 1