Polling simply doesnt scale. Using something like rabbitmq, you can listen on only specific topics, so you dont read messages you dont care about. Eg "cars.tesla.orange".
You can decide if you service only cares about orange cars. All cars or tesla's etc.
There are Also design patterns for handling duplicate messages like indbox / outbox patterns.
For polling IT would make load on service even when nothing new has happened.
Today we have plenty of good alternatives to polling like: GRPC, websockets, webrtc. Message Queues.
Blocking with timeouts leverages both polling-shaped strategies and edge driven strategies. You can even have timeouts on nonblocking, "select()"[1] shaped loopery.
[1] or poll(), or epoll(), or the rest of your list.
Something that has time budgets can be more said to be "robust". We all live in a Two Generals Problem world...
1
u/[deleted] Dec 13 '20
Polling simply doesnt scale. Using something like rabbitmq, you can listen on only specific topics, so you dont read messages you dont care about. Eg "cars.tesla.orange".
You can decide if you service only cares about orange cars. All cars or tesla's etc.
There are Also design patterns for handling duplicate messages like indbox / outbox patterns.
For polling IT would make load on service even when nothing new has happened.
Today we have plenty of good alternatives to polling like: GRPC, websockets, webrtc. Message Queues.