Webhooks are a popular pattern in web development that relies on HTTP/HTTPS for messaging between applications. In other words, webhooks are an event notification system between one sender and one or many receivers. The sender sends a notification with data to the receiver when a pre-defined event occurs in the sender. The receiver can then act on the data it receives to perform certain actions in real time. This mechanism allows the sender and receiver to act together even though they are separate applications. Webhooks are a more efficient and speedy means of handling events than a push-based or pull-based alternative.
Below is common terminology used with webhooks:
- Event - A significant occurrence in the sender’s application logic that warrants a notification to outside systems. A typical event is when a record in sender application is added, updated or deleted. For example, when an account is added to the database, then the event Account Updated occurred.
- Sender - Application that generates a notification when an event occurs. It sends data about the event that just occurred to the receiver who subscribed to listen to that event. For example, the software as a sender sends out a notification to subscribed receivers when an account is added to the database. The notification has the data about the account that was added such as First Name, Last Name, Address, etc.
- Receiver - Application that receives the notification. The receiver typically performs an action on receiving the notification. The receiver should be available over the internet and implemented in a RESTful way to receive the data over HTTP/HTTPS. For example, a custom application receives the Account Updated notification from the software and uses the data sent in the notification to create a custom welcome email to the account.
Comments
0 comments
Please sign in to leave a comment.