Giter Site home page Giter Site logo

checkpoint's Introduction

Checkpoint

This is a Go package providing solutions that can be used in order to convert an offset-based log of discrete data payloads into a queue, where a series of log offsets can be processed and committed asynchronously without the risk of a given offset being prematurely committed.

For more information about how this package functions and the problem it solves check out this crazy video.

This package is "complete" in the sense that no further development work is planned and any PRs proposing to expand its scope will be rejected. Please report bug fixes and feel free to raise PRs to address them as these will be .

checkpoint's People

Contributors

jeffail avatar

Stargazers

Rob Crowe avatar Roberto Acevedo avatar Michelangelo Partipilo avatar  avatar Mihai Todor avatar  avatar Georges Haidar avatar

Watchers

Mihai Todor avatar  avatar Adam Chalkley avatar

Forkers

kasonbraley

checkpoint's Issues

Use an interval tree to reduce memory allocations?

When I implemented something similar, I remember we used an interval tree instead of a linked list. It allowed us to have a smaller memory pressure at the expense of worst case log(n) performance instead of log(1) for tasks handled in random order. For simple cases like FIFO, I believe it will be faster you simply adjust an integer. Tracking a new task is always log(1).

Just creating this issue as an alternative implementation. Feel free to close this issue if not relevant!

Reduce memory allocations using a sync.Pool?

I stumbled across this library by chance. I happened to have implemented something similar as a Kafka consumer. After reading the source code I noticed that Uncapped.Track(...) allocated a new node on every call, and garbage collects a node when done with a task. Considered using a sync.Pool to reduce memory pressure?

Note, I have not hit any performance issues here. Mostly submitting this as a potential improvement. I notice that the benchmarks keep allocation stats, so testing whether this positively impacts garbage collection should be fairly straightforward.

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.