{"id":19166497,"url":"https://github.com/ykayacan/hashing-utils","last_synced_at":"2025-05-07T13:34:21.036Z","repository":{"id":84216548,"uuid":"214200976","full_name":"ykayacan/hashing-utils","owner":"ykayacan","description":"A basic Java implementation of Consistent Hashing, Rendezvous Hashing and Weighted Rendezvous Hashing.","archived":false,"fork":false,"pushed_at":"2020-09-19T15:47:55.000Z","size":116,"stargazers_count":10,"open_issues_count":0,"forks_count":4,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-19T22:34:17.605Z","etag":null,"topics":["consistent-hashing","hashing","java","rendezvous"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ykayacan.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-10T14:15:00.000Z","updated_at":"2022-01-31T04:38:20.000Z","dependencies_parsed_at":"2023-03-12T22:03:22.893Z","dependency_job_id":null,"html_url":"https://github.com/ykayacan/hashing-utils","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ykayacan%2Fhashing-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ykayacan%2Fhashing-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ykayacan%2Fhashing-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ykayacan%2Fhashing-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ykayacan","download_url":"https://codeload.github.com/ykayacan/hashing-utils/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252887415,"owners_count":21819894,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["consistent-hashing","hashing","java","rendezvous"],"created_at":"2024-11-09T09:33:13.657Z","updated_at":"2025-05-07T13:34:21.019Z","avatar_url":"https://github.com/ykayacan.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hashing Utils\n\n![Publish Release](https://github.com/ykayacan/hashing-utils/workflows/Publish%20Release/badge.svg)\n![Publish Snapshot](https://github.com/ykayacan/hashing-utils/workflows/Publish%20Snapshot/badge.svg?branch=master)\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/ykayacan/hashing-utils)\n![GitHub](https://img.shields.io/github/license/ykayacan/hashing-utils)\n\n## Table of Contents\n\n+ [About](#about)\n+ [Getting Started](#getting_started)\n+ [Usage](#usage)\n+ [Contributing](CONTRIBUTING.md)\n\n## About \u003ca name = \"about\"\u003e\u003c/a\u003e\n\nA basic Java implementation of [Consistent Hashing](https://en.wikipedia.org/wiki/Consistent_hashing), \n[Rendezvous Hashing](https://en.wikipedia.org/wiki/Rendezvous_hashing) and Weighted Rendezvous Hashing.\n\n## Getting Started \u003ca name = \"getting_started\"\u003e\u003c/a\u003e\n\n### Latest Stable Releases\n\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/ykayacan/hashing-utils)\n\n#### Gradle\n\n```groovy\ndependencies {\n  implementation 'io.github.ykayacan.hashing:hashing-api:LATEST_VERSION'\n  implementation 'io.github.ykayacan.hashing:hashing-consistent:LATEST_VERSION'\n  implementation 'io.github.ykayacan.hashing:hashing-rendezvous:LATEST_VERSION'\n}\n```\n\n#### Maven\n\n```xml\n\u003cdependencies\u003e\n  \u003cdependency\u003e\n    \u003cgroupId\u003eio.github.ykayacan.hashing\u003c/groupId\u003e\n    \u003cartifactId\u003ehashing-api\u003c/artifactId\u003e\n    \u003cversion\u003eLATEST_VERSION\u003c/version\u003e\n  \u003c/dependency\u003e\n\n  \u003cdependency\u003e\n    \u003cgroupId\u003eio.github.ykayacan.hashing\u003c/groupId\u003e\n    \u003cartifactId\u003ehashing-consistent\u003c/artifactId\u003e\n    \u003cversion\u003eLATEST_VERSION\u003c/version\u003e\n  \u003c/dependency\u003e\n\n  \u003cdependency\u003e\n    \u003cgroupId\u003eio.github.ykayacan.hashing\u003c/groupId\u003e\n    \u003cartifactId\u003ehashing-rendezvous\u003c/artifactId\u003e\n    \u003cversion\u003eLATEST_VERSION\u003c/version\u003e\n  \u003c/dependency\u003e\n\u003c/dependencies\u003e\n```\n\n### Snapshots\n\nYou can access the latest snapshot by adding the repository `https://oss.sonatype.org/content/repositories/snapshots` \nto your build.\n\nSnapshots of the development version are available in [Sonatype's snapshots repository](https://oss.sonatype.org/content/repositories/snapshots/io/github/ykayacan/hashing/).\n\n## Usage \u003ca name = \"usage\"\u003e\u003c/a\u003e\n\n#### Consistent Hashing\n\n```java\nNodeRouter\u003cPhysicalNode\u003e router = \n    ConsistentNodeRouter.create(15, MurMurHashFunction.create());\n\nList\u003cPhysicalNode\u003e initialNodes = \n    Arrays.asList(PhysicalNode.of(\"node1\"), PhysicalNode.of(\"node2\"));\n\nrouter.addNodes(initialNodes);\n\n// get\nOptional\u003cPhysicalNode\u003e nodeOpt = router.getNode(\"node1\");\n\n// add\nrouter.addNode(PhysicalNode.of(\"node3\"));\n\n// remove\nrouter.removeNode(\"node1\");\n```\n\n#### Rendezvous Hashing\n\n```java\nNodeRouter\u003cWeightedNode\u003e router = RendezvousNodeRouter.create(\n    MurMurHashFunction.create(), DefaultRendezvousStrategy.create());\n\nList\u003cWeightedNode\u003e initialNodes = \n    Arrays.asList(WeightedNode.of(\"node1\"), WeightedNode.of(\"node2\"));\n\nrouter.addNodes(initialNodes);\n\n// get\nOptional\u003cWeightedNode\u003e nodeOpt = router.getNode(\"node1\");\n\n// add\nrouter.addNode(WeightedNode.of(\"node3\"));\n\n// remove\nrouter.removeNode(\"node1\");\n```\n\n## License\n\n```text\nCopyright 2019 Yasin Sinan Kayacan\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fykayacan%2Fhashing-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fykayacan%2Fhashing-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fykayacan%2Fhashing-utils/lists"}