module
Version:
v0.0.0-...-89d387e
Opens a new window with list of versions in this module.
Published: Aug 15, 2022
License: MIT
Opens a new window with license information.
README
¶
consistent-hashing-service-provider
consistent-hashing-service-provider is designed to provide consistent-hashing service in distributed manner supported by replication + oplog.
Get Started
Prerequisites
1. debian/ubuntu linux/x86-64 release
2. go1.18+ linux/amd64 or higher
Installation
Clone
Setup
# build the binary
make build
# start one master node
./consistent-hashing-service-provider --id="localhost:18081" --conf=conf/master.json --verbose=true
# start two slave nodes
./consistent-hashing-service-provider --id="localhost:18082" --conf=conf/slave01.json --verbose=true
./consistent-hashing-service-provider --id="localhost:18083" --conf=conf/slave02.json --verbose=true
# use grpcurl
grpcurl -plaintext -d '{"node": {"uuid": "192.168.1.125"}}' localhost:18081 amazingchow.photon_dance_consistent_hashing.ConsistentHashingService/Add
grpcurl -plaintext -d '{"node": {"uuid": "192.168.1.126"}}' localhost:18081 amazingchow.photon_dance_consistent_hashing.ConsistentHashingService/Add
grpcurl -plaintext -d '{"node": {"uuid": "192.168.1.127"}}' localhost:18081 amazingchow.photon_dance_consistent_hashing.ConsistentHashingService/Add
grpcurl -plaintext -d '{"node": {"uuid": "192.168.1.128"}}' localhost:18082 amazingchow.photon_dance_consistent_hashing.ConsistentHashingService/Add
grpcurl -plaintext -d '{"node": {"uuid": "192.168.1.129"}}' localhost:18083 amazingchow.photon_dance_consistent_hashing.ConsistentHashingService/Add
grpcurl -plaintext localhost:18081 amazingchow.photon_dance_consistent_hashing.ConsistentHashingService/List
grpcurl -plaintext localhost:18082 amazingchow.photon_dance_consistent_hashing.ConsistentHashingService/List
grpcurl -plaintext localhost:18083 amazingchow.photon_dance_consistent_hashing.ConsistentHashingService/List
grpcurl -plaintext -d '{"uuid": "192.168.1.126"}' localhost:18082 amazingchow.photon_dance_consistent_hashing.ConsistentHashingService/Delete
grpcurl -plaintext -d '{"uuid": "192.168.1.128"}' localhost:18083 amazingchow.photon_dance_consistent_hashing.ConsistentHashingService/Delete
grpcurl -plaintext localhost:18081 amazingchow.photon_dance_consistent_hashing.ConsistentHashingService/List
grpcurl -plaintext localhost:18082 amazingchow.photon_dance_consistent_hashing.ConsistentHashingService/List
grpcurl -plaintext localhost:18083 amazingchow.photon_dance_consistent_hashing.ConsistentHashingService/List
grpcurl -plaintext -d '{"key": {"name": "foo"}}' localhost:18082 amazingchow.photon_dance_consistent_hashing.ConsistentHashingService/MapKey
grpcurl -plaintext -d '{"key": {"name": "bar"}}' localhost:18083 amazingchow.photon_dance_consistent_hashing.ConsistentHashingService/MapKey
grpcurl -plaintext -d '{"key": {"name": "summychou"}}' localhost:18081 amazingchow.photon_dance_consistent_hashing.ConsistentHashingService/MapKey
Reference
Contributing
Step 1
Step 2
Step 3
Support
License
- This project is licensed under the MIT License - see the MIT license for details.
Directories
¶
Click to show internal directories.
Click to hide internal directories.