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

Use a job to build the list of possible recipients of messages #678

Closed
jekutzsche opened this issue Mar 16, 2022 · 1 comment
Closed

Use a job to build the list of possible recipients of messages #678

jekutzsche opened this issue Mar 16, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@jekutzsche
Copy link
Member

The list of possible recipients is built up when a message is first created, and then rebuilt every ½h. Due to the pings to the hds, this procedure can take a long time and the duration grows with the number of hds. In the test environment, for example, it is now a single-digit number of seconds.

With a job, the list could be built and exchanged cyclically in the background, so that it is always ready immediately.

@jekutzsche
Copy link
Member Author

As Tim noticed during a test with ITK-Rheinland, this is urgently needed, as waiting times are considerable and timeouts are not uncommon.

@jekutzsche jekutzsche added the bug Something isn't working label Mar 19, 2022
@jekutzsche jekutzsche self-assigned this Mar 19, 2022
jekutzsche added a commit to iris-connect/iris-gateway that referenced this issue Mar 20, 2022
…HD search with `searchForHd`

- Adds the boolean param `withDetails` to the method `searchForHd` to switch between a basic and a full data view. The basic view contains only `name`, `rkiCode` and `epsName`.
- Adds the boolean param `alsoNotConnectedHds` to the method `searchForHd` to enable if the hds without an `epsName` (these are not connected to EPS) include into the response list or not.
- Adds the method `getAllHds` to get a list of all infos about health departments from RKI data. This method has also the parameter `withDetails` and `alsoNotConnectedHds`.

When reading data from the RKI XML with XML Beam, each read costs time and the less data that needs to be read/fetched, the faster the search and processing goes. Therefore, the processing can be accelerated very significantly with the two parameters.

**It should always be loaded as little data as possible and best both parameters should be set to FALSE.

Further optimizations were made in the code to load data from the XML only once and only when it is really needed.

Refs iris-connect/iris-client#678
jekutzsche added a commit that referenced this issue Mar 20, 2022
… recipients for messages is now created cyclically in a background job and is immediately available for the frontend.

fix(Message): Displays the county or city name from RKI data as recipient and in the recipient selection instead of a technical name.

- Extends the `EPSHdSearchClient` with the new method `getAllHds` and the new parameters `withDetails` and `alsoNotConnectedHds`. The parameters are set to `false` to load only the most necessary data.
- The `IrisMessageService` creates the list of recipients in a job method and holds this list or an occurred exception in a `Try` instance.
- The `name` in `IrisMessageHdContact` is set to the name from RKI data now.
- The `ownIrisMessageHdContact` is now cached to avoid too frequent loading of data from the BS.
- The job runs with a delay of 15 minutes after the last run.
- Includes commons-collections4 to the dependencies.

Refs #678
jekutzsche added a commit to iris-connect/iris-gateway that referenced this issue Mar 21, 2022
…HD search with `searchForHd`

- Adds the boolean param `withDetails` to the method `searchForHd` to switch between a basic and a full data view. The basic view contains only `name`, `rkiCode` and `epsName`.
- Adds the boolean param `alsoNotConnectedHds` to the method `searchForHd` to enable if the hds without an `epsName` (these are not connected to EPS) include into the response list or not.
- Adds the method `getAllHds` to get a list of all infos about health departments from RKI data. This method has also the parameter `withDetails` and `alsoNotConnectedHds`.

When reading data from the RKI XML with XML Beam, each read costs time and the less data that needs to be read/fetched, the faster the search and processing goes. Therefore, the processing can be accelerated very significantly with the two parameters.

**It should always be loaded as little data as possible and best both parameters should be set to FALSE.

Further optimizations were made in the code to load data from the XML only once and only when it is really needed.

Refs iris-connect/iris-client#678
PR #309
jekutzsche added a commit that referenced this issue Mar 22, 2022
… recipients for messages is now created cyclically in a background job and is immediately available for the frontend.

fix(Message): Displays the county or city name from RKI data as recipient and in the recipient selection instead of a technical name.

- Extends the `EPSHdSearchClient` with the new method `getAllHds` and the new parameters `withDetails` and `alsoNotConnectedHds`. The parameters are set to `false` to load only the most necessary data.
- The `IrisMessageService` creates the list of recipients in a job method and holds this list or an occurred exception in a `Try` instance.
- The `name` in `IrisMessageHdContact` is set to the name from RKI data now.
- The `ownIrisMessageHdContact` is now cached to avoid too frequent loading of data from the BS.
- The job runs with a delay of 15 minutes after the last run.
- Includes commons-collections4 to the dependencies.

Refs #678
PR #680
jekutzsche pushed a commit that referenced this issue Mar 25, 2022
## [1.5.1-rc.1](v1.5.0...v1.5.1-rc.1) (2022-03-25)

### Bug Fixes

* **Messages:** Improves the performance of the . The list of possible recipients for messages is now created cyclically in a background job and is immediately available for the frontend. ([73cda44](73cda44)), closes [#678](#678) [#680](#680)
* Removes long deprecated environment variables from `.env.sample`. This variables have had no effect for some time. ([9bf0a55](9bf0a55)), closes [#679](#679)
* RPC methods can now be extended with additional parameters while still remaining compatible with legacy RPC clients if default values are used. ([4320b23](4320b23)), closes [iris-connect/iris-backlog#278](https://github.com/iris-connect/iris-backlog/issues/278)
jekutzsche pushed a commit that referenced this issue Mar 29, 2022
## [1.5.1](v1.5.0...v1.5.1) (2022-03-29)

### Bug Fixes

* **Messages:** Improves the performance of the . The list of possible recipients for messages is now created cyclically in a background job and is immediately available for the frontend. ([73cda44](73cda44)), closes [#678](#678) [#680](#680)
* Removes long deprecated environment variables from `.env.sample`. This variables have had no effect for some time. ([9bf0a55](9bf0a55)), closes [#679](#679)
* RPC methods can now be extended with additional parameters while still remaining compatible with legacy RPC clients if default values are used. ([4320b23](4320b23)), closes [iris-connect/iris-backlog#278](https://github.com/iris-connect/iris-backlog/issues/278)
* Updates EPS to version v0.2.6 ([2cd3a4a](2cd3a4a))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant