Re:Message DB: Event Store and Message Store for PostgreSQL
by sbellware on Tuesday December 17, 2019 @12:21PM
(#21815858)
Anything that processes a signal checks if a signal has been received. It's no so black-and-white at the level of electricity, but higher-level things at the level of durable message queues check for new signals, even if those signals arrive via "push".
Re:Message DB: Event Store and Message Store for PostgreSQL
by mike_hock on Tuesday December 17, 2019 @01:56PM
(#21817228)
It is still good design to do the polling only at the lowest level where you must. Higher layers should be reactive.
Re:Message DB: Event Store and Message Store for PostgreSQL
by SideburnsOfDoom on Tuesday December 17, 2019 @02:06PM
(#21817364)
Does a network card "poll" ? it's hardware activated by current flowing into it. Does the CPU poll the card, no, the CPU is interrupted by the network card, again by receiving an electrical signal.
If there's polling, it happens in a matter of a few CPU cycles.
Re:Message DB: Event Store and Message Store for PostgreSQL
by mike_hock on Tuesday December 17, 2019 @02:18PM
(#21817519)
At some point, this is splitting hairs. Single instructions are atomic wrt. interrupts, so surely there must be some sort of check every cycle whether an interrupt has arrived during that cycle.
The magnitude of the time slice or polling interval is immaterial as to whether it is to be considered "polling."
Is that true? I am reminded of this essay that goes into a deep dive of what happens under the hood with http and the underlying network I/O
https://blog.stephencleary.com/2013/11/there-is-no-thread.ht...
And at the lowest level, the network card interrupts the CPU because it has finished reading or writing data.
> Some time after the write request started, the device finishes writing. It notifies the CPU via an interrupt.
Is that polling? It seems more like a push.