{"id":15963772,"url":"https://github.com/sokomishalov/lokk","last_synced_at":"2026-01-21T10:02:30.488Z","repository":{"id":53736995,"uuid":"233878586","full_name":"sokomishalov/lokk","owner":"sokomishalov","description":"Kotlin/JVM coroutine-based distributed locks","archived":false,"fork":false,"pushed_at":"2021-03-17T02:17:22.000Z","size":59,"stargazers_count":2,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-07T03:36:56.203Z","etag":null,"topics":["cluster","coroutines","kotlin","locks","mongo","redis"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/sokomishalov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-14T15:57:11.000Z","updated_at":"2023-09-12T03:36:27.000Z","dependencies_parsed_at":"2022-08-26T17:13:19.623Z","dependency_job_id":null,"html_url":"https://github.com/sokomishalov/lokk","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/sokomishalov/lokk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sokomishalov%2Flokk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sokomishalov%2Flokk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sokomishalov%2Flokk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sokomishalov%2Flokk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sokomishalov","download_url":"https://codeload.github.com/sokomishalov/lokk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sokomishalov%2Flokk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28631936,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T04:47:28.174Z","status":"ssl_error","status_checked_at":"2026-01-21T04:47:22.943Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cluster","coroutines","kotlin","locks","mongo","redis"],"created_at":"2024-10-07T17:00:27.348Z","updated_at":"2026-01-21T10:02:30.471Z","avatar_url":"https://github.com/sokomishalov.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"Lokk\n========\n~~Here should be some modern logo~~\n\n[![Apache License 2](https://img.shields.io/badge/license-ASF2-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0.txt)\n[![](https://jitpack.io/v/sokomishalov/lokk.svg)](https://jitpack.io/#sokomishalov/lokk)\n\n## Overview\nKotlin/JVM coroutine-based distributed locks\n\n## Why not [ShedLock](https://github.com/lukas-krecan/ShedLock)?\n\nThere are some simple advantages:\n- Core API is build on coroutines (suspend-able methods), providers are implementing them with **non-blocking** APIs\n- There are no optional hell inside core, result is an instance of sealed class\n- Kotlin DSL api\n\nDisadvantages:\n- Much less implementations are done :( (plz help and contribute!)\n\n\n## Distribution\nLibrary with modules are available only from `jitpack` so far:\n```xml\n\u003crepositories\u003e\n    \u003crepository\u003e\n        \u003cid\u003ejitpack.io\u003c/id\u003e\n        \u003curl\u003ehttps://jitpack.io\u003c/url\u003e\n    \u003c/repository\u003e\n\u003c/repositories\u003e\n```\n\n## Usage\nUsage as simple as is - just instantiate required provider and use it like this:\n```kotlin\nval lokkProvider = /*...*/ \nlokkProvider.withLokk(atLeastFor = Duration.ofMinutes(10), atMostFor = Duration.ofHours(1)) {\n    // do some magic\n}\n```\n\nThere are several jvm lokk implementations so far\n- [lokk-redis-lettuce](#redis-with-reactive-Lettuce)\n- [lokk-mongo-reactive-streams](#mongo-with-reactive-streams-driver)\n\n## Redis with reactive Lettuce\nImport a dep:\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.sokomishalov\u003c/groupId\u003e\n    \u003cartifactId\u003elokk-redis-lettuce\u003c/artifactId\u003e\n    \u003cversion\u003e${lokk.version}\u003c/version\u003e\n\u003c/dependency\u003e\n```\nThen use [this implementation](./providers/redis/lokk-redis-lettuce/src/main/kotlin/ru/sokomishalov/lokk/provider/RedisLettuceLokkProvider.kt):\n```kotlin\nval lokkProvider = RedisLettuceLokkProvider(client = RedisClient.create())\n```\n\n\n## Mongo with reactive streams driver\nImport a dep:\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.sokomishalov\u003c/groupId\u003e\n    \u003cartifactId\u003elokk-mongo-reactive-streams\u003c/artifactId\u003e\n    \u003cversion\u003e${lokk.version}\u003c/version\u003e\n\u003c/dependency\u003e\n```\nThen use [this implementation](./providers/mongo/lokk-mongo-reactive-streams/src/main/kotlin/ru/sokomishalov/lokk/provider/MongoReactiveStreamsLokkProvider.kt):\n```kotlin\nval lokkProvider = MongoReactiveStreamsLokkProvider(client = MongoClients.create())\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsokomishalov%2Flokk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsokomishalov%2Flokk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsokomishalov%2Flokk/lists"}