Code Monkey home page Code Monkey logo

lawn's Introduction

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 degrigation in performance over a large set of timers with this API.

Lawn is a high troughput 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 relativly small variance in TTL by effectivly using minimal queues to store timer data. Achieving O(1) for insertion and deletion of timers, and O(1) for tiemr expiration.

Lawns can be used for anything from keeping track of multipile 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 (preferebly 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 maintaind solely by Adam Lev-Libfled.

lawn's People

Contributors

datokenizer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

clibs

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.