Giter Club home page Giter Club logo

Comments (3)

fbjerggaard avatar fbjerggaard commented on June 20, 2024

I noticed this as well using PostgreSQL, and it would probably be a pretty easy "fix" to implement a configurable delay when polling the database.

The right way would probably be some kind of subscription, but I haven't really researched the possibility of that

However, be aware of #222 when using PostgreSQL in general - though it only really applies if you have multiple event publishers

from eventuous.

alexeyzimarev avatar alexeyzimarev commented on June 20, 2024

It should be configurable and auto-adjusting. I never got the time to implement it as I am not using Postgres in my daily work. It would be nice for someone to pick it up, also for SQL Server.

Here's how I see it working. The configuration should have the min and max polling intervals. When the subscription starts, it uses the min interval. If the query returns no events, it will start increasing the interval using some calculated increase value, for example (max - min) / 10. If no events are being appended, eventually it will reach the max interval and will be polling much less frequently.

It could also be possible to extend the functionality and enable an internal control plane for subscriptions. For example, when the app appends an event, it could signal the subscription to query immediately, so it will not wait for whatever current interval is.

from eventuous.

alexeyzimarev avatar alexeyzimarev commented on June 20, 2024

The right way would probably be some kind of subscription

It should be possible to use logical replication, but it's quote a bit of work. For it to work, there should be some implementation of switching from catch-up to real-time mode (and back) using ring buffers or something.

from eventuous.

Related Issues (20)

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.