api-manager icon indicating copy to clipboard operation
api-manager copied to clipboard

[Feature] API Consumer Notifications

Open msm1992 opened this issue 1 year ago • 6 comments

Problem

Problem

  • APIM currently offers a notification mechanism that operates through the database.
  • APIM users might want to use different notification modes (ex: email, sms etc) and to support such requirements current design would require extensive modifications.

Solution

  • Implement an extensible notification system following a pub-sub architecture.
  • Continuation of https://github.com/wso2/api-manager/issues/2383

Affected Component

APIM

Version

4.4.0

Implementation

No response

Related Issues

No response

Suggested Labels

No response

msm1992 avatar May 31 '24 07:05 msm1992

Consumer Notifications Scenarios Document - https://docs.google.com/document/d/1Hn6eb25000SZWEOsnDTsVf6e9aKFsmvKAwC2ljRLRtE/edit?usp=sharing

npamudika avatar Jun 14 '24 08:06 npamudika

AsyncAPI Definition Document - https://docs.google.com/document/d/1OHNWqiLt8w_oEfbvzxImMukCBEcOFYT_Ots0JHPAxvo/edit?usp=sharing

npamudika avatar Jun 17 '24 12:06 npamudika

Design Document - https://docs.google.com/document/d/1hVELgd-hkIIXBzIT6CGx58r4Jy0pBJ8Bz7Pzuiihvp0/edit?usp=sharing

npamudika avatar Jun 20 '24 11:06 npamudika

Can use the following as the WebSub Hub when testing the feature.

https://central.ballerina.io/ballerina/websubhub/1.11.0 https://github.com/ballerina-platform/module-ballerina-websubhub/tree/main/examples

npamudika avatar Jul 01 '24 09:07 npamudika

Sub Tasks -

  • [x] Finalize the design - https://docs.google.com/document/d/1hVELgd-hkIIXBzIT6CGx58r4Jy0pBJ8Bz7Pzuiihvp0/edit?usp=sharing
  • [x] Finalize the list of operations to be used - https://docs.google.com/document/d/1Hn6eb25000SZWEOsnDTsVf6e9aKFsmvKAwC2ljRLRtE/edit?usp=sharing
  • [x] Do the async API definition - https://docs.google.com/document/d/1OHNWqiLt8w_oEfbvzxImMukCBEcOFYT_Ots0JHPAxvo/edit?usp=sharing
  • [x] Check and refactor the implementations for Notifications Pages (with the bell icon) in Publisher and DevPortal, Notifications retrieval from the DB, Rest API changes
  • [x] Do the UX design of the topic subscription page in the Admin portal - https://excalidraw.com/#json=cGXEqu0FxOIn8L53LnwWY,WeQcq4IYdi1Htn-yXiIaWg
  • [ ] Do the implementation for the topic subscription UI
  • [ ] Do the implementation for the topic subscription backend part - To send topic subscriptions to the Hub when a user subscribes to a topic via the UI
  • [ ] Do the implementation for the event publishing from the UI portals
  • [ ] Do the Ballerina WebSub Hub implementation to support topic subscriptions and send event notifications to the DB WebSub Server
  • [ ] Do the implementation for the DB WebSub Server to save the events to the DB
  • [ ] Do the implementation for the notifications retrieval - Should retrieve the notifications based on the logged in user + the notifications based on the subscribed topics
  • [ ] Complete the implementation to cover the full flow (Users subscribe to topics, Ballerina Hub publishes event notifications to DB websub server when an event for APIs/applications/API products related operations occurs, WebSub server saves notifications to DB, User sends a Http request via the notifications page to DB websub server to retreive the event notifications from the DB, WebSub server sends notifications to notifications page, Users view the notifications + read/unread/delete them)
  • [ ] Test the implementation for the default DB websub server
  • [ ] Test the implementation with the Ballerina websub Hub
  • [ ] Do the documentation
  • [ ] Write tests

npamudika avatar Jul 01 '24 09:07 npamudika