ebx-distributedratelimiters-sdk-parent

Reference implementations using common rate limiting algorithms extended to work in distributed systems.

License

License

GroupId

GroupId

com.echobox
ArtifactId

ArtifactId

ebx-distributedratelimiters-sdk-parent
Last Version

Last Version

1.0.2
Release Date

Release Date

Type

Type

pom
Description

Description

ebx-distributedratelimiters-sdk-parent
Reference implementations using common rate limiting algorithms extended to work in distributed systems.
Project URL

Project URL

https://github.com/ebx/ebx-distributedratelimiters-sdk
Source Code Management

Source Code Management

https://github.com/ebx/ebx-distributedratelimiters-sdk

Download ebx-distributedratelimiters-sdk-parent

How to add to project

<!-- https://jarcasting.com/artifacts/com.echobox/ebx-distributedratelimiters-sdk-parent/ -->
<dependency>
    <groupId>com.echobox</groupId>
    <artifactId>ebx-distributedratelimiters-sdk-parent</artifactId>
    <version>1.0.2</version>
    <type>pom</type>
</dependency>
// https://jarcasting.com/artifacts/com.echobox/ebx-distributedratelimiters-sdk-parent/
implementation 'com.echobox:ebx-distributedratelimiters-sdk-parent:1.0.2'
// https://jarcasting.com/artifacts/com.echobox/ebx-distributedratelimiters-sdk-parent/
implementation ("com.echobox:ebx-distributedratelimiters-sdk-parent:1.0.2")
'com.echobox:ebx-distributedratelimiters-sdk-parent:pom:1.0.2'
<dependency org="com.echobox" name="ebx-distributedratelimiters-sdk-parent" rev="1.0.2">
  <artifact name="ebx-distributedratelimiters-sdk-parent" type="pom" />
</dependency>
@Grapes(
@Grab(group='com.echobox', module='ebx-distributedratelimiters-sdk-parent', version='1.0.2')
)
libraryDependencies += "com.echobox" % "ebx-distributedratelimiters-sdk-parent" % "1.0.2"
[com.echobox/ebx-distributedratelimiters-sdk-parent "1.0.2"]

Dependencies

test (4)

Group / Artifact Type Version
org.junit.jupiter : junit-jupiter-api jar 5.7.1
org.junit.jupiter : junit-jupiter-params jar 5.7.1
org.junit.jupiter : junit-jupiter-engine jar 5.7.1
org.junit.vintage : junit-vintage-engine jar 5.7.1

Project Modules

There are no modules declared in this project.

Maven Central License Build Status

ebx-distributedratelimiters-sdk

This project provides the three core rate limiter/semaphore implementations listed below, each of which uses a CacheService to issue tokens or permits for processes we wish to subject to rate or concurrency limits.

  • Leaky Token Bucket - Used to allow burst rates but not beyond some configured limit. One the configured limit is past an exception occurs. See here for more information.
  • Time Slice - Used to smooth out the rate at which operations can occur concurrently. If too many operations occur concurrently this will block. See here for more information.
  • Semaphore - Only allow X concurrent events to occur within the sempahore. Operations block while waiting to enter the sempahore. See here for more information.

Getting Started

Please see examples in the Demo project.

Important Note: It's not ideal but for the demos to work you must first provide endpoint and port information for a redis cluster in src/main/resources/app.properties. Feel free to recommend a better way 😊

Installation

For our latest stable release use:

<dependency>
  <groupId>com.echobox</groupId>
  <artifactId>ebx-distributedratelimiters-sdk</artifactId>
  <version>1.0.1</version>
</dependency>

Getting in touch

  • GitHub Issues: If you have ideas, bugs, or problems with our library, just open a new issue.

Contributing

If you would like to get involved please follow the instructions here

Releases

We use semantic versioning.

All merges into DEV will automatically get released as a maven central snapshot, which can be easily included in any downstream dependencies that always desire the latest changes (see above for 'Most Up To Date' installation).

Each merge into the MASTER branch will automatically get released to Maven central and github releases, using the current library version. As such, following every merge to master, the version number of the dev branch should be incremented and will represent 'Work In Progress' towards the next release.

Please use a merge (not rebase) commit when merging dev into master to perform the release.

To create a full release to Maven central please follow these steps:

  1. Ensure the CHANGELOG.md is up to date with all the changes in the release, if not please raise a suitable PR into DEV. Typically the change log should be updated as we go.
  2. Create a PR from DEV into MASTER. Ensure the version in the pom.xml is the correct version to be released. Merging this PR into MASTER will automatically create the maven and github releases. Please note that a release is final, it can not be undone/deleted/overwritten.
  3. Once the public release has been successful create a final PR into DEV that contains an incremented pom.xml version to ensure the correct snapshot gets updated on subsequent merges into DEV. This PR should also include:
    • An update to the README.md latest stable release version number.
    • A 'Work In Progress' entry for the next anticipated release in CHANGELOG.md.
com.echobox

Echobox

Using the power of Microservices, Big Data and ML to intelligently automate publishing.

Versions

Version
1.0.2
1.0.1