Service - Notification Manager: Difference between revisions

From Izara Wiki
Jump to navigation Jump to search
(Created page with "= Overview = Consolidates and sends notifications to any number of services. = Repository = https://bitbucket.org/stb_working/notification-manager/src/master/ Category:...")
 
No edit summary
Line 1: Line 1:
= Overview =
= Overview =


Consolidates and sends notifications to any number of services.
Consolidates and sends notifications to any number of receiver services. Will be used for user notifications but can have other types of receiver services added. Activities are received from [[Service - Activity Switchboard|Activity Switchboard]] service.
 
Notification groups set whether activities are considated (eg per day/per month/per x number of activities), if considated activities are stored here until sending is triggered, according to the considation rules. If not consolidated they are sent on immediately.


= Repository =
= Repository =
Line 7: Line 9:
https://bitbucket.org/stb_working/notification-manager/src/master/
https://bitbucket.org/stb_working/notification-manager/src/master/


= DynamoDB tables =
== [[Standard Config Table Per Service]] ==
=== Configuration tags ===
; configKey = ''receiver'', configTag = {receiverTag}
: configValue example
<syntaxhighlight lang="JavaScript">
{
// .. other method level configuration options, eg max length of notification body
"endpoint": {
"endpoint": {eg: Lambda function name}
"service_type": {eg: "Lambda"} //service type tag, at the moment only "Lambda"
}
}
</syntaxhighlight>
== NotificationGroup ==
* Groups many notificatons into groups
* Simplifies management of similar notifications
* Allows for consolidation of notifications at notification group level
=== Fields ===
; notificationGroupId
: (partition key)
: comes from: {receiverTag}_{grouping id given be receiver service}
: eg: userId or userId+methodTag hash
; receiverSortKey
: (sort key)
: optional (? might have to set something) key that specifies a unique notification group within the receiver's grouping id
: eg: a uuid created by UserContactManager
.....
; endpoint
: matches an endpoint record in Config table, is set by the creating service
= Consolidated notifications =
== How to trigger processing for time based consolidations ==
* ....
* maybe can use some sort of queue to store a list of NotificationGroup’s that are due to be sent (either because consolidatedSendIfEmpty == true or there are some activities waiting to be processed)
= Working documents =
[[:Category:Working documents - Notification Manager|Working documents - Notification Manager]]


[[Category:Backend services| Notification Manager]]
[[Category:Backend services| Notification Manager]]

Revision as of 04:46, 8 November 2020

Overview

Consolidates and sends notifications to any number of receiver services. Will be used for user notifications but can have other types of receiver services added. Activities are received from Activity Switchboard service.

Notification groups set whether activities are considated (eg per day/per month/per x number of activities), if considated activities are stored here until sending is triggered, according to the considation rules. If not consolidated they are sent on immediately.

Repository

https://bitbucket.org/stb_working/notification-manager/src/master/

DynamoDB tables

Standard Config Table Per Service

Configuration tags

configKey = receiver, configTag = {receiverTag}
configValue example
{
	// .. other method level configuration options, eg max length of notification body
	"endpoint": {
		"endpoint": {eg: Lambda function name}
		"service_type": {eg: "Lambda"} //service type tag, at the moment only "Lambda"
	}
}

NotificationGroup

  • Groups many notificatons into groups
  • Simplifies management of similar notifications
  • Allows for consolidation of notifications at notification group level

Fields

notificationGroupId
(partition key)
comes from: {receiverTag}_{grouping id given be receiver service}
eg: userId or userId+methodTag hash
receiverSortKey
(sort key)
optional (? might have to set something) key that specifies a unique notification group within the receiver's grouping id
eg: a uuid created by UserContactManager

.....

endpoint
matches an endpoint record in Config table, is set by the creating service

Consolidated notifications

How to trigger processing for time based consolidations

  • ....
  • maybe can use some sort of queue to store a list of NotificationGroup’s that are due to be sent (either because consolidatedSendIfEmpty == true or there are some activities waiting to be processed)

Working documents

Working documents - Notification Manager