Webhooks

Scenario:

Webhooks to post events

Solution:

Webhooks are user defined HTTP callbacks. The messages are triggered by an event and which are automatically sent by application to the client in a form for payload.

  1. Webhook registration
    1. Client would register for a predefined events with the callback url using the unique keys using an API.
    2. Client updates or deletes the webhook setup.
  1. Webhook events
    1. When a application performs an operation then it would generate an event with the predefined payload (json) or an API endpoint to pull the payload [encrypted on server].
    2. Typically you would use a messaging system which guarantees the sequence like Kafka, using it to queue (publish) and (consume) to read the messages.
    3. The message would then be sent to Webhook endpoint with payload for that client (key) and it would then post it to client per their subscriptions of events and setup per #1.
    4. The goal would be to not miss any messages, so on failure we would keep retrying.

 

Pagination

Give after every id, as traditional one is memory intensive:

  • Next -> / search after the above Id
  • Prev-> / search backward, with id going back

No comments:

Post a Comment

Move Github Sub Repository back to main repo

 -- delete .gitmodules git rm --cached MyProject/Core git commit -m 'Remove myproject_core submodule' rm -rf MyProject/Core git remo...