Comments (4)
The current logic is based on following assumptions:
- There are always new events incoming in busy database
- If there are many consumers, you don't want them all coming in at the same time. So such random separation that the sleep() creates is good.
Could you describe why the sleep() loop is unsatisfactory for your situation?
from skytools-legacy.
Hmm, I guess I have no real justification other than finding blocking for an event cleaner - it saves me a bit of CPU, and a bit of network activity to do the poll myself.
In terms of the first point, that doesn't apply to me (yet) because my database is very low on writes, and it's writes that currently trigger PgQ events. I can appreciate the second point, but I only have a single consumer for now, so I hadn't considered that.
That said, even having notifications doesn't mean you have to actually use them :)
from skytools-legacy.
Although the amount of code to be added on ticker side is small, it still feels wrong to optimize for idle system.
And note that it's easy change on ticker side, but it gets more complex on consumer side - how do they know whether to listen for notification or not? And if the queue setting changes, how do they follow it?
And all consuming libraries need to be changed with the logic.
So it does seem simpler to avoid notifications, and on idle system you can simply tune timeouts to decrease the noise level.
from skytools-legacy.
I don't have any further arguments, so I'll trust your judgement that the correct logic is for the best. Thanks for discussing this with me!
from skytools-legacy.
Related Issues (20)
- londiste3 should complain if triggers are not in place HOT 1
- simple londiste3 replication standby server error HOT 12
- unique key names are not escaped HOT 3
- Bug with a branch node worker HOT 2
- node 2 worker crashing - baseconsumer getting 4 args instead of 3. HOT 1
- creating leaf sets node location incorrectly HOT 7
- KeyError with CoopConsumer and pgq_lazy_fetch=0 HOT 3
- PgQ python framework can not be used anymore with python2.4
- PK update HOT 1
- role pgq_admin cannot bulk_insert_events
- londiste3 create-root failed with "could not access file "$libdir/pgq_lowlevel"" HOT 10
- Skytools SQL has a missing function HOT 2
- londiste3 error with import pkgloader HOT 7
- What database permissions does Skytools 3 require?
- How to remove/delete events? event_failed() function is missing.
- Incomplete string interpolation HOT 1
- tarball is missing libusual files
- Can I use skytools for postgres 8.4? HOT 1
- Make possible to write on branch node
- londiste doesn't copy all significant digits with double presicion data type
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from skytools-legacy.