Skip to main content

GitHub version issues count Build Status

Lawn - Low Latancy Timer Data-Structure for Large Scale Systems

TL;DR - A Lawn is a timer data store, not unlike Timer-Wheel, but with unlimited timer span with no degradation in performance over a large set of timers with this API.

Lawn is a high throughput data structure that is based on the assumption that most timers are set to a small set of TTLs to boost overall DS performance. It can assist when handling a large set of timers with relatively small variance in TTL by effectively using minimal queues to store timer data. Achieving O(1) for insertion and deletion of timers, and O(1) for timer expiration.

Lawns can be used for anything from keeping track of multiple real-time TTLs of elements, to implement a straightforward dehydration system as depicted in the article “Fast Data”.

You can see the API provided by this implementation of the Lawn Data structure here.

You can read further on the algorithm behind Lawn here.

Common Use Cases

  • Stream Coordination - Make data from one stream wait for the corresponding data from another (preferably using sliding-window style timing).

  • Event Rate Limitation - Delay any event beyond current max throughput to the next available time slot, while preserving order.

  • Self Cleaning Claims-Check - Store data for a well known period, without the need to search for it when it is expired or clear it from the data-store yourself.

  • Task Timer - Postpone actions and their respective payloads to a specific point in time.

About This Project

This project is based off a python version of the same concepts designed by Adam Lev-Libfeld and developed in Tamar Labs by Adam Lev-Libfeld and Alexander Margolin in mid-2015.

A Redis module using these concepts was created by Adam Lev-Libfeld during the RedisModulesHackathon in late 2016.

This code is meant for public use and is maintained solely by Adam Lev-Libfled.

Metadata

Release files for timer-lawn 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for timer-lawn 0.1
File Size Uploaded
timer_lawn-0.1.tar.gz 3.2 kB Details

Release files / timer_lawn-0.1.tar.gz

Download URL timer_lawn-0.1.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
81d6ead9f40809a777d7e4a73650c4760727c778a9641a3d79c7037a19b35f36
BLAKE2b-256 checksum
How to use checksums
92b372d7d317618c872c1ca0580618c503e95ec25b2305160f35f81754522433
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.9

Release history Release notifications | RSS feed

This release

0.1 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page