{"id":19658620,"url":"https://github.com/himadieievsv/redpulsar","last_synced_at":"2025-07-02T08:10:00.387Z","repository":{"id":215835954,"uuid":"735520568","full_name":"himadieievsv/redpulsar","owner":"himadieievsv","description":"Distributed locks and other utils, can be used with Jedis client and Lettuce client for Redis","archived":false,"fork":false,"pushed_at":"2025-04-14T11:00:56.000Z","size":347,"stargazers_count":22,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-12T03:49:54.165Z","etag":null,"topics":["algorythms","cloud-computing","countdownlatch","distributed-algorithms","distributed-systems","jedis","lettuce","lock","redis","redlock","semaphore"],"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/himadieievsv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-12-25T08:09:40.000Z","updated_at":"2025-04-14T11:00:59.000Z","dependencies_parsed_at":"2024-02-05T19:50:41.480Z","dependency_job_id":"aa57b6bd-9a26-4023-972e-e681e8db87d7","html_url":"https://github.com/himadieievsv/redpulsar","commit_stats":{"total_commits":68,"total_committers":1,"mean_commits":68.0,"dds":0.0,"last_synced_commit":"8ddb74cab8000f6dafd046c4e963868e12e3922b"},"previous_names":["himadieievsv/redpulsar"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/himadieievsv/redpulsar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/himadieievsv%2Fredpulsar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/himadieievsv%2Fredpulsar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/himadieievsv%2Fredpulsar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/himadieievsv%2Fredpulsar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/himadieievsv","download_url":"https://codeload.github.com/himadieievsv/redpulsar/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/himadieievsv%2Fredpulsar/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263099715,"owners_count":23413624,"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":["algorythms","cloud-computing","countdownlatch","distributed-algorithms","distributed-systems","jedis","lettuce","lock","redis","redlock","semaphore"],"created_at":"2024-11-11T15:38:17.832Z","updated_at":"2025-07-02T08:10:00.365Z","avatar_url":"https://github.com/himadieievsv.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RedPulsar\n\n[![Release](https://img.shields.io/github/release/himadieievsv/redpulsar.svg?sort=semver\u0026color=blue)](https://github.com/himadieievsv/redpulsar/releases/latest)\n![Unit Tests](https://github.com/himadieievsv/redpulsar/actions/workflows/unit-tests.yml/badge.svg)\n![Integration Tests](https://github.com/himadieievsv/redpulsar/actions/workflows/integration-tests.yml/badge.svg)\n[![Apache 2.0 licensed](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](./LICENSE)\n[![codecov](https://codecov.io/gh/himadieievsv/redpulsar/graph/badge.svg?token=ME7ESPRABQ)](https://codecov.io/gh/himadieievsv/redpulsar)\n[![Maven Central](https://img.shields.io/maven-central/v/com.himadieiev/redpulsar-core.svg)](https://search.maven.org/artifact/com.himadieiev/redpulsar-core)\n\n\n## What is RedPulsar?\nRedPulsar provides Distributed Locks with Redis and other utilities for cloud computing or different kinds of distributed systems.\nIt is minimalistic, lightweight, and easy to use library written in Kotlin and currently can be used with both Jedis or Lettuce clients.\n\n## Features\n\n- **[Mutex](./redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/locks/Mutex.kt)**: Distributed lock mechanism on a resource, that uses consensus of the majority of data storage nodes to determine if check obtained successfully.\n- **[Semaphore](./redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/locks/Semaphore.kt)**: Distributed semaphore implementation allowing multiple number of lock on a resource. It also uses consensus of the majority of data storage nodes to determine if check obtained successfully.\n- **[SimplifiedMutex](./redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/locks/SimplifiedMutex.kt)**: Simplified distributed lock mechanism on a resource. Unlike [Mutex](./redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/locks/Mutex.kt) it uses single data storage node.\n- **[ListeningCountDownLatch](./redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/locks/ListeningCountDownLatch.kt)**: Implementation of distributed Count Down Latch, it uses that uses consensus of the majority of data storage instances ensuring count down consistency.\n  [ListeningCountDownLatch](./redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/locks/ListeningCountDownLatch.kt) utilized [Redis Pub/Sub](https://redis.io/topics/pubsub) mechanism to notify waiting workloads about count reaching zero.\n\n## Supporting data storages\nCurrently, RedPulsar supports Redis as a data storage. It can be used with both Jedis or Lettuce clients.\n- See [redpulsar-jedis](./redpulsar-jedis/README.md) module for details.\n- See [redpulsar-lettuce](./redpulsar-lettuce/README.md) module for details. This module also provides convenient [lettuce pooled](./redpulsar-lettuce/README.md#lettuce-pooled) clients.\n\n## Java compatibility\nMinimal required Java version is 11.\nRedPulsar project is written in Kotlin, but can be easily used in Java projects too.\n\n## Getting started\n\nGradle dependency:\n```kotlin\nimplementation(\"com.himadieiev:redpulsar-jedis:1.4.0\")\n// OR\nimplementation(\"com.himadieiev:redpulsar-lettuce:1.4.0\")\n```\n\n- See [Getting started with redpulsar-jedis](./redpulsar-jedis/README.md#getting-started) for getting started with Jedis client.\n- See [Getting started with redpulsar-lettuce](./redpulsar-lettuce/README.md#getting-started) for getting started with Lettuce client.\n\n### Development\nTo build RedPulsar locally, you need to have JDK 11+ installed.\nTo build or test RedPulsar, run the following command:\n```bash\ngit clone git@github.com:himadieievsv/redpulsar.git\ncd redpulsar\n\n# Code formatting\n./gradlew ktlintFormat\n\n# Run all tests\ndocker-compose up -d\n./gradlew test \n\n# Run only unit tests\n./gradlew test -DexcludeTags=\"integration\"\n\n# Build\n./gradlew build -x test\n\n# Publish to local maven repository\n./gradlew publishToMavenLocal \\\n  -Psigning.secretKeyRingFile=... \\\n  -Psigning.password=... \\\n  -Psigning.keyId=...\n```\n\n## Further development\n\n### Extending RedPulsar to use other data stores\nCurrently, all features are implemented with Redis. However, it is possible to extend RedPulsar to use other distributed data stores like AWS DynamoDB / Casandra / ScyllaDB etc. Even it could be implemented with RDBMS like MySQL or PostgreSQL.\nRedPulsar project have an abstraction level for data storage called [Backend](./redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/locks/abstracts/Backend.kt). See package [com.himadieiev.redpulsar.core.locks.abstracts.backends](./redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/locks/abstracts/backends) for details what particular operation should be implemented.\nNew data storage should use a new module and implement same abstractions as current Redis implementations.\n\n### Contributing\nContributions are welcome! Please make sure to create Issue first before working on improvements o new features, feel free to submit a Pull Request from a project fork.\n\n## Furthers plans\n- [ ] Add ListenerLock using Pub/Sub mechanism instead of polling.\n- [ ] Add FairLock implementation. It supposed to be a lock that grants lock to the longest waiting thread.\n- [ ] Leader election mechanisms.\n- [ ] Service discovery service.\n- etc.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhimadieievsv%2Fredpulsar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhimadieievsv%2Fredpulsar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhimadieievsv%2Fredpulsar/lists"}