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

Notification plugin interface and models #31

Merged
merged 1 commit into from
Jun 5, 2021

Conversation

akbhatta
Copy link
Contributor

@akbhatta akbhatta commented Jun 3, 2021

Description

Notification plugin interface and models

Currently Alerting, ISM and Reporting plugins are expected to make call to Notification plugin to send notification.
The plugins can communicate using REST or Transport layer. Transport layer makes call to same node and hence avoids network hop so transport layer communication is preferred. common-utils contains the model (with marshaling/unmarshaling code) for the communication. above mentioned plugins consumes common-utils and uses these models for communication.

Note: Plugins runs on different JVM and hence the notification plugins needs to check if the class is same before accessing the values. transport marshaling/unmarshaling ( writeTo(output: StreamOutput) and constructor(input: StreamInput) of models) are used for this purpose. REST APIs in notification plugin uses toXContent and parse marshaling/unmarshaling

[Tests]
Contains unit test for all model classes

Signed-off-by: @akbhatta

Issues Resolved

NA

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@akbhatta akbhatta added the enhancement New feature or request label Jun 3, 2021
@akbhatta akbhatta force-pushed the notification_plugin_interface branch from c3befaf to dfcac8f Compare June 3, 2021 05:02
@akbhatta akbhatta self-assigned this Jun 3, 2021
@akbhatta akbhatta force-pushed the notification_plugin_interface branch from dfcac8f to 92b9f68 Compare June 3, 2021 20:39
@akbhatta akbhatta force-pushed the notification_plugin_interface branch from 92b9f68 to 7e85164 Compare June 4, 2021 17:39
Currently Alerting, ISM and Reporting plugins are expected to make call to
Notification plugin to send notification.

The plugins can communicate using REST or Transport layer.
Transport layer makes call to same node and hence avoids network hop
so transport layer communication is preferred.
common-utils contains the model (with marshaling/unmarshaling code) for the communication.
above mentioned plugins consumes common-utils and uses these models for communication.

Note: Plugins runs on different JVM and hence the notification plugins needs to
check if the class is same before accessing the values.
transport marshaling/unmarshaling ( writeTo(output: StreamOutput) and
constructor(input: StreamInput) of models) are used for this purpose.
REST APIs in notification plugin uses toXContent and parse marshaling/unmarshaling

[Tests]
Contains unit test for all model classes

Signed-off-by: @akbhatta
@akbhatta akbhatta force-pushed the notification_plugin_interface branch from 7e85164 to 4d8fb67 Compare June 5, 2021 00:31
@akbhatta akbhatta merged commit a60ad67 into main Jun 5, 2021
@akbhatta akbhatta deleted the notification_plugin_interface branch June 5, 2021 00:37
wuychn pushed a commit to ochprince/common-utils that referenced this pull request Mar 16, 2023
Currently Alerting, ISM and Reporting plugins are expected to make call to
Notification plugin to send notification.

The plugins can communicate using REST or Transport layer.
Transport layer makes call to same node and hence avoids network hop
so transport layer communication is preferred.
common-utils contains the model (with marshaling/unmarshaling code) for the communication.
above mentioned plugins consumes common-utils and uses these models for communication.

Note: Plugins runs on different JVM and hence the notification plugins needs to
check if the class is same before accessing the values.
transport marshaling/unmarshaling ( writeTo(output: StreamOutput) and
constructor(input: StreamInput) of models) are used for this purpose.
REST APIs in notification plugin uses toXContent and parse marshaling/unmarshaling

[Tests]
Contains unit test for all model classes

Signed-off-by: @akbhatta
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants