Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
refactor: responder manager as plain case class (#2073)
* refactor: responder manager as plain case class * docs: add ADR * docs: update ADR * add stumps for architecture documentation with mermaid * build: add missing library to shared project Co-authored-by: irinaschubert <irina.schubert@dasch.swiss>
- Loading branch information
Showing
154 changed files
with
3,888 additions
and
3,242 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
docs/architecture/decisions/0004-change-respondermanager-to-a-simple-case-class.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# 4. Change ResponderManager to a simple case class | ||
|
||
Date: 2022-06-06 | ||
|
||
## Status | ||
|
||
Accepted | ||
|
||
## Context | ||
|
||
The `org.knora.webapi.responders.ResponderManager` was implemented as an Akka-Actor. | ||
|
||
## Decision | ||
|
||
In preparation of the move from `Akka` to `ZIO`, it was decided that the `ResponderManager` is refactored using plain `case` classes. | ||
|
||
## Consequences | ||
|
||
The actor messages and responses don't change. All calls made previously to the `ResponderManager` and the `StorageManager` are now changed to the `ApplicationActor` which will route the calls to either the `ResponderManager` or the `StorageManager` based on the message type. The `ApplicationActor` is the only actor that is allowed to make calls to either the `ResponderManager` or the `StorageManager`. All requests from routes are now routed to the `ApplicationActor`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
HTTP Request Flow | ||
|
||
V1 / V2 / admin: | ||
```mermaid | ||
sequenceDiagram | ||
autonumber | ||
client ->> route: send http request | ||
route ->> authenticator: authenticate user | ||
authenticator ->> route: user authenticated | ||
route ->> application actor: send message | ||
application actor ->> responder manager: forward message | ||
responder manager ->> responder: forward message | ||
responder ->> responder manager: return result | ||
responder manager ->> application actor: forward result | ||
application actor ->> route: forward result | ||
route ->> client: send http response | ||
``` | ||
|
||
V3: | ||
```mermaid | ||
sequenceDiagram | ||
autonumber | ||
client ->> route: send http request | ||
route ->> authenticator: authenticate user | ||
authenticator ->> route: user authenticated | ||
route ->> handler: call handler method | ||
handler ->> route: return result | ||
route ->> client: send result as http response | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,5 +17,5 @@ workspace { | |
} | ||
|
||
!adrs decisions | ||
|
||
!docs flows | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.