Skip to content

Commit

Permalink
updated notifications arch docs (#1394)
Browse files Browse the repository at this point in the history
* updated notifications arch docs

* documented regression tests

* split charts into multiple

* Update _index.en.md

Typo

* added dependency

---------

Co-authored-by: Thomas Bakken <[email protected]>
  • Loading branch information
acn-sbuad and tba76 authored Feb 2, 2024
1 parent f92b760 commit 5c0540a
Show file tree
Hide file tree
Showing 9 changed files with 1,898 additions and 1,338 deletions.
15 changes: 14 additions & 1 deletion content/notifications/architecture/_index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,20 @@ The following diagram illustrates the overall data flow.

## Process flow between microservices and Kafka topics

![Topics](notifications-topic.drawio.svg "Illustration of the data flow including Kafka Topics")
{{% expandlarge id="anotifications-topic-process-order.drawio.svg" header="Flow chart for order processing" %}}
![Topics](notifications-topic-process-order.drawio.svg "Flow chart including Kafka topics for order processing")
{{% /expandlarge %}}


{{% expandlarge id="anotifications-topic-process-email.drawio.svg" header="Flow chart for email notification processing" %}}
![Topics](notifications-topic-process-email.drawio.svg "Flow chart including Kafka topics for email notification processing")
{{% /expandlarge %}}


{{% expandlarge id="anotifications-topic-process-sms.drawio.svg" header="Flow chart for sms notification processing" %}}
![Topics](notifications-topic-process-sms.drawio.svg "Flow chart including Kafka topics for sms notification processing")
{{% /expandlarge %}}


## System and service dependencies
### Internal
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
998 changes: 0 additions & 998 deletions content/notifications/architecture/notifications-topic.drawio.svg

This file was deleted.

26 changes: 19 additions & 7 deletions content/notifications/architecture/notifications/_index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,14 @@ Data related to notification orders, notifications and receipients is persisted
Each table in the _notifications_ schema is described in the table below,
followed by a diagram showing the relation between the tables.

| Table | Description |
| ------------------ | ----------------------------------------------------------------------------------------------------------- |
| orders | Contains metadata for each notification order |
| emailtexts | Holds the static common texts related to a notification |
| emailnotifications | Holds metadata for each notfication along with recipient contact details |
| resourcelimitlog | Keeps track of resource limits outages for dependent systems e.g. Azure Communication services |
| Table | Description |
| ------------------ | ------------------------------------------------------------------------------------------------ |
| orders | Contains metadata for each notification order |
| emailtexts | Holds the static common texts related to an email notification |
| emailnotifications | Holds metadata for each email notfication along with recipient contact details |
| smstexts | Holds the static common texts related to an sms notification |
| smsnotifications | Holds metadata for each sms notification along with recipient contact details |
| resourcelimitlog | Keeps track of resource limits outages for dependent systems e.g. Azure Communication services |

![Diagram of Notifications Database](dbmodel.drawio.svg "Diagram of Notifications Database")

Expand Down Expand Up @@ -127,6 +129,7 @@ Notifications microservice takes use of a range of libraries to support the prov
| Confluent.Kafka | Integrate with kafka broker | [Repository](https://github.com/confluentinc/confluent-kafka-dotnet), [Documentation](https://developer.confluent.io/get-started/dotnet/) |
| FluentValidation | Used to validate content of API request | [Repository](https://github.com/FluentValidation/FluentValidation), [Documentation](https://docs.fluentvalidation.net/en/latest/)|
| JWTCookieAuthentication| Used to validate Altinn token (JWT) | [Repository](https://github.com/Altinn/altinn-authentication), [Documentation](../../../authentication/architecture/jwtcookie/)|
| libphonenumber-csharp | Used to validate mobile numbers | [Repository](https://github.com/caseykramer/libphonenumber-csharp), [Documentation](https://github.com/caseykramer/libphonenumber-csharp) |
| Npgsql | Used to access the database server | [Repository]( https://github.com/rdagumampan/yuniql ), [Documentation](https://www.npgsql.org/)|
| Yuniql | DB migration | [Repository](https://github.com/rdagumampan/yuniql), [Documentation](https://yuniql.io/)|

Expand Down Expand Up @@ -165,14 +168,23 @@ start all Kafka-related dependencies in a Docker containers.

The automated tests for this micro service are implemented through [Grafana's k6](https://k6.io/).
The tool is specialized for load tests, but we do use it for automated API tests as well.
The test set is used for both use case and regression tests.

### Use case tests
#### Use case tests
[All use case workflows are available on GitHub](https://github.com/Altinn/altinn-notifications/tree/main/.github/workflows)

Use case tests are run every 15 minuts through GitHub Actions.
The tests run during the use case tests are defined in the k6 test project.
The aim of the tests is to run through central functionality of the solution to ensure that it is running and available to our end users.

#### Regression tests
[All regression test workflows are available on GitHub](https://github.com/Altinn/altinn-notifications/tree/main/.github/workflows)

The regression tests are run once a week and 5 minutes after deploy to a given environment.
The tests run during the regression tests are defined in the k6 test project.
The aim of the regression tests is to cover as much of our functionality as possible,
to ensure that a new release does not break any existing functionality.

## Hosting

### Web API
Expand Down
Loading

0 comments on commit 5c0540a

Please sign in to comment.