Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOC] Guides - Concept Section: Documentation for Webhooks in Oqtane Framework #46

Open
thabaum opened this issue Feb 11, 2024 · 0 comments

Comments

@thabaum
Copy link
Contributor

thabaum commented Feb 11, 2024

Issue:

Documentation for Webhooks in Oqtane Framework

Description

There has been a discussion in the community about the support for webhooks in our API. This would allow us to signal the consumer of the API that we have updated some data. The thread for this discussion can be found here.

Details

Community Suggestions

  1. Module Creation: One suggestion was to create a module that has a config page where users can supply a URL, and then registering a job that would fire when needed to let them know when the data changes.

  2. IEventSubscriber: Another suggestion was to look at IEventSubscriber. Oqtane raises events for all major actions and you can create a subscriber to consume them - and it could then POST them to a webhook. More details can be found in this blog post.

Server-Side Events

Blog Article Link
Oqtane 3.1 introduced the INotifyPropertyChanged concept for raising events within your client-side razor components and consuming those events from other components. This solution works very well in a client application for creating rich, responsive and dynamic user interface. But what about server-side events?

Oqtane has always contained a SyncManager on the server which has traditionally only been used to synchronize specific server-side events with client-side state. In Oqtane 3.2.1 this capability has now been included using the standard .NET EventHandler capability in conjunction with the SyncManager to raise SyncEvents (which inherit from the standard .NET EventArgs).

In Oqtane 4.0 a new interface was added for IEventSubscriber which contains a single method of EntityChanged(SyncEvent syncEvent). In addition, a general purpose EventDistributorHostedService was introduced. The EventDistributorHostedService captures all server events raised by the framework, and then calls every known implementation of IEventSubscriber - passing the SyncEvent so that it can be processed.

Additional Info

This could possibly be placed under Concepts > Webhooks. Once we get our docs in order with new pages we can maybe make a way to tag these documentation requests so we know where we feel they should reside. This way a contributor would know where they are expected to place their documentation contributions.

Request

We need to include this information in the Oqtane Framework documentation. Any contributions to this would be greatly appreciated.

@thabaum thabaum changed the title Doc: Webhooks under Concepts Doc: Documentation for Webhooks in Oqtane Framework (Concepts ?) Feb 11, 2024
@thabaum thabaum changed the title Doc: Documentation for Webhooks in Oqtane Framework (Concepts ?) Doc: Documentation for Webhooks in Oqtane Framework Feb 11, 2024
@thabaum thabaum changed the title Doc: Documentation for Webhooks in Oqtane Framework [DOC] Documentation for Webhooks in Oqtane Framework Oct 15, 2024
@thabaum thabaum changed the title [DOC] Documentation for Webhooks in Oqtane Framework [DOC] Guides - Concept Section: Documentation for Webhooks in Oqtane Framework Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant