Skip to content

Add message deduplication#116

Merged
das-Abroxas merged 3 commits intofeat/version2.0reworkfrom
feat/message-deduplication
Sep 19, 2023
Merged

Add message deduplication#116
das-Abroxas merged 3 commits intofeat/version2.0reworkfrom
feat/message-deduplication

Conversation

@das-Abroxas
Copy link
Copy Markdown
Contributor

This adds message deduplication to the integrated notification concept.

Since the hierarchy concept allows the same notification to be sent to a consumer multiple times, it is beneficial to perform internal deduplication.

If a notification with the same content is sent for several hierarchies of a resource, these notifications are provided with the same ULID in their header ("block-id": ULID). This ULID is used to re-identify the message blocks that belong together when a consumer retrieves several of them.

This ensures that each notification within a particular action in the AOS is only delivered once to the user.

@das-Abroxas das-Abroxas added the enhancement New feature or request label Sep 19, 2023
@das-Abroxas das-Abroxas self-assigned this Sep 19, 2023
Copy link
Copy Markdown
Member

@St4NNi St4NNi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should work for now and be the best option.
We might revisit this in the future if it will not work as expected.

LGTM!

@codecov
Copy link
Copy Markdown

codecov Bot commented Sep 19, 2023

Codecov Report

Patch coverage: 77.63% and project coverage change: +0.18% 🎉

Comparison is base (cb39792) 44.97% compared to head (a4d41bb) 45.16%.
Report is 1 commits behind head on feat/version2.0rework.

Additional details and impacted files
@@                    Coverage Diff                    @@
##           feat/version2.0rework     #116      +/-   ##
=========================================================
+ Coverage                  44.97%   45.16%   +0.18%     
=========================================================
  Files                         61       61              
  Lines                       8117     8177      +60     
=========================================================
+ Hits                        3651     3693      +42     
- Misses                      4466     4484      +18     
Files Changed Coverage Δ
src/grpc/notification.rs 0.00% <0.00%> (ø)
src/middlelayer/clone_db_handler.rs 0.00% <0.00%> (ø)
src/notification/handler.rs 100.00% <ø> (ø)
src/notification/utils.rs 64.70% <0.00%> (-1.46%) ⬇️
src/notification/natsio_handler.rs 52.08% <92.85%> (+3.68%) ⬆️
src/middlelayer/create_db_handler.rs 73.68% <100.00%> (+0.71%) ⬆️
src/middlelayer/delete_db_handler.rs 85.71% <100.00%> (+1.09%) ⬆️
src/middlelayer/relations_db_handler.rs 86.56% <100.00%> (+0.62%) ⬆️
src/middlelayer/snapshot_db_handler.rs 95.89% <100.00%> (+0.36%) ⬆️
src/middlelayer/update_db_handler.rs 82.81% <100.00%> (+0.94%) ⬆️

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@das-Abroxas das-Abroxas merged commit e61ed59 into feat/version2.0rework Sep 19, 2023
@das-Abroxas das-Abroxas deleted the feat/message-deduplication branch September 19, 2023 10:41
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