Common Lisp consistent hashing implementation.
(defvar my-ring (ch:make-ring :replication-factor 4
:finder (ch:make-finder-tree)
:hash-function 'sxhash))
(ch:ring-insert my-ring "192.168.0.1")
(ch:virtual-node-hostname
(ch:ring-find-virtual-node-for my-ring "www.image.com"))
(ch:ring-nodes my-ring)
- Alan Gomes
Copyright (c) 2023 Alan Gomes
Licensed under the MIT License.