Showing posts with label Webhooks Vs WebSockets. Show all posts
Showing posts with label Webhooks Vs WebSockets. Show all posts

Thursday 6 October 2016

Webhooks Vs WebSockets


WebSockets Can be used to exchange event notifications but it requires a constact network connection . Signalr is best example of Websockets that can be used within an Asp.net application

Whereas WebHooks are for event notification across other web applications and other external services. It is similar to b2b communication.

Example 
You can receive a WebHook when someone sends you money to your PayPal account. PayPal fires off a POST request to your predefined URL handler and then your app does something with that notification. You pre-configure everything on the PayPal side first. You also set up an application to handle the incoming POST request. The event notification is "pushed" to you in (near) real-time. No need to hold open a network connection while waiting for events.

The two can be complementary. For example, when you receive the WebHook from PayPal, you can notify a logged in user on your webapp (using SignalR/WebSockets) that money has been received successfully.

We Will Be Updating Articles With More Information Soon .....