I do not understand the real difference between webhooks and traditional pooling of endpoints because to me webhooks still require pooling.
**Traditional case: Client asks, server tells ** In a package delivery application, the authenticated user calls server endpoints to check the status of the package delivery, this happens at specific frequency.
** Webhooks case: Server tells, client does ** In a package delivery application:
- the server implements event driven pattern, notifying another endpoint (webhook) about it's changes, let's say it pushes the data to endpoint https://webhook.delivery.app/hook01
- the server hosting the endpoint https://webhook.delivery.app/hook01/ receives the data and applies some business logic on it.
- the client application - Here is the problem, how does the application know that the webhook has received data following an event ? Normally, it should start pooling some other endpoints to get that data. I do understand there is a workload offloaded from the server to another server hosting the webhooks endpoints, but still there is pooling here happening on client side otherwise it would not know anything about the data.
Watched youtube videos Asked chatgpt
I expected clarity got complexity instead