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

Topic-6 #14

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
146 changes: 129 additions & 17 deletions docs/src/06_runtime_view.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -37,29 +37,141 @@ See https://docs.arc42.org/section-6/[Runtime View] in the arc42 documentation.

****

=== <Runtime Scenario 1>
=== Runtime Scenario: Retrieval of questions

[plantuml,"Retrieval of questions",png]
----
actor User
entity Frontend as "Webapp Frontend"
entity Backend as "Webapp Backend"
database Wikidata
User -> Frontend: next question
Frontend -> Backend: get question
Backend -> Wikidata: request data
Wikidata -> Backend: receive data
Backend -> Backend: generate question
Backend -> Frontend: return question and answers
Frontend -> User: show question
----

=== Runtime Scenario: Answer questions

[plantuml,"Answer questions",png]
----
actor User
entity Frontend as "Webapp Frontend"
entity Backend as "Webapp Backend"
database DB
User -> Frontend: answer
Frontend -> Backend: forward answer
Backend -> Backend: process answer
Backend -> DB: store result
Backend -> Frontend: return correctness
Frontend -> User: show correctness
----

=== Runtime Scenario: Login successful

[plantuml,"Login successful",png]
----
actor User
entity Frontend as "Webapp Frontend"
entity Backend as "Webapp Backend"
database DB
User -> Frontend: send credentials
Frontend -> Backend: forward credentials
Backend -> DB: query for username
DB -> Backend: retrieve user data
Backend -> Backend: validate password
Backend -> Frontend: login successful
Frontend -> User: login successful
----

=== Runtime Scenario: Login failure

* _<insert runtime diagram or textual description of the scenario>_
* _<insert description of the notable aspects of the interactions between the
building block instances depicted in this diagram.>_
[plantuml,"Login failure",png]
----
actor User
entity Frontend as "Webapp Frontend"
entity Backend as "Webapp Backend"
database DB
User -> Frontend: send credentials
Frontend -> Backend: forward credentials
Backend -> DB: query for username
DB -> Backend: retrieve user data
Backend-> Backend: validate password
Backend -> Frontend: wrong password
Frontend -> User: ask for credentials
User -> Frontend: send credentials
Frontend -> Backend: ...
----

It is possible to use a sequence diagram:
=== Runtime Scenario: Signup successful

[plantuml,"Sequence diagram",png]
[plantuml,"Signup successful",png]
----
actor Alice
actor Bob
database Pod as "Bob's Pod"
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
Alice --> Pod: Store route
Alice -> Bob: Another authentication Request
Alice <-- Bob: another authentication Response
actor User
entity Frontend as "Webapp Frontend"
entity Backend as "Webapp Backend"
database DB
User -> Frontend: send signup form
Frontend -> Backend: forward signup form
Backend -> DB: check if username exists
DB -> Backend: answer
Backend -> DB: insert data
Backend -> Frontend: signup successful
Frontend -> User: signup successful
----

=== <Runtime Scenario 2>
=== Runtime Scenario: Signup failure

[plantuml,"Signup failure",png]
----
actor User
entity Frontend as "Webapp Frontend"
entity Backend as "Webapp Backend"
database DB
User -> Frontend: send signup form
Frontend -> Backend: forward signup form
Backend -> DB: check if username exists
DB -> Backend: answer
Backend -> Frontend: error: username in use
Frontend -> User: username in use
User -> Frontend: send new username
Frontend -> Backend: forward new username
Backend -> DB: ...
----

=== ...
=== Runtime Scenario: Wikidata error

=== <Runtime Scenario n>
[plantuml,"Wikidata error",png]
----
actor User
entity Frontend as "Webapp Frontend"
entity Backend as "Webapp Backend"
database Wikidata
User -> Frontend: next question
Frontend -> Backend: get question
Backend -> Wikidata: request data
Wikidata -> Backend: error
Backend -> Backend: error handling
Backend -> Frontend: wikidata error
Frontend -> User: show error message
----

=== Runtime Scenario: DB error

[plantuml,"DB error",png]
----
actor User
entity Frontend as "Webapp Frontend"
entity Backend as "Webapp Backend"
database DB
User -> Frontend: request
Frontend -> Backend: request
Backend -> DB: request
DB -> Backend: error
Backend -> Backend: error handling
Backend -> Frontend: DB error
Frontend -> User: show error message
----