Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
|
wiki:software:beuthbot:software-architecture [10.12.2019 19:11] Christopher Lehmann |
wiki:software:beuthbot:software-architecture [23.01.2020 15:30] (aktuell) Timo Bruns [Software Architecture] |
||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| ===== Software Architecture ===== | ===== Software Architecture ===== | ||
| - | ==== Table of Contents | + | ==== Table of content |
| - | - [[wiki: | + | - [[wiki: |
| - | - [Overview](#overview) | + | - [[wiki: |
| - | - [Basic Structure](#basic-structure) | + | - [[wiki: |
| - | - [Bot](#bot) | + | - [[wiki: |
| - | - [Gateway](#gateway) | + | - [[wiki: |
| - | - [Registry](#registry) | + | - [[wiki: |
| - | - [Service](#service) | + | - [[wiki: |
| - | - [API](#api) | + | - [[wiki: |
| ==== Overview ==== | ==== Overview ==== | ||
| Zeile 22: | Zeile 22: | ||
| > Bot <=> Gateway <=> Registry <=> Service | > Bot <=> Gateway <=> Registry <=> Service | ||
| - | Following diagram shows that in more detail. | + | Following diagram shows that in more detail: |
| - |  | + | package nlp { |
| + | |||
| + | class " | ||
| + | class " | ||
| + | class " | ||
| + | class " | ||
| + | class " | ||
| + | class " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | |||
| + | Gateway -- nlp | ||
| + | |||
| + | Bot "1..*" -- Gateway | ||
| + | |||
| + | Gateway -- MetaMetaPersistence | ||
| + | |||
| + | class Registry | ||
| + | |||
| + | Gateway " | ||
| + | Registry -- MetaPersistence | ||
| + | |||
| + | abstract class Service | ||
| + | |||
| + | class MensaService | ||
| + | Service <|-- MensaService | ||
| + | Service <|-- WetterService | ||
| + | |||
| + | Registry " | ||
| + | </uml> | ||
| + | |||
| + | A user can write the //Bot// to request informations, | ||
| + | |||
| + | Following sequence diagram further illustrates that: | ||
| + | |||
| + | < | ||
| + | Bot -> Gateway : request | ||
| + | Gateway -> nlp : request | ||
| + | Gateway <- nlp : request< | ||
| + | Gateway -> Registry : request< | ||
| + | Registry -> Service : request< | ||
| + | Service -> Registry : response | ||
| + | Registry -> Gateway : response | ||
| + | Gateway -> nlp : response (text) | ||
| + | nlp-> | ||
| + | Gateway -> Bot : response (text|audio) | ||
| + | </ | ||
| === Bot === | === Bot === | ||
| - | This is an abstraction for the available chatbots, e.g. a _Bot_ for _Telegram_ | + | This is an abstraction for the available chatbots, e.g. a // |
| - | The user interacts with this _Microservice_, here she can request information and gets answers from _BeuthBot_. | + | The user interacts with this // |
| === Gateway === | === Gateway === | ||
| - | The _Gateway_ | + | The // |
| - | The _Bot_ notifies the _Gateway_ | + | The // |
| - | The _Gateway_ | + | The // |
| === Registry === | === Registry === | ||
| - | After obtaining the intention of our user, the _Gateway_ | + | After obtaining the intention of our user, the // |
| - | The Registry distributes the request to the correct | + | The Registry distributes the request to the correct |
| === Service === | === Service === | ||
| - | _Service_ | + | // |
| ==== API ==== | ==== API ==== | ||
| - | Because of the complexity of the single | + | Because of the complexity of the single |
| - | But to answer a users request we use a unified, comprehensive API. Its basic idea is to pass a _Response_-Object trough the individual | + | But to answer a users request we use a unified, comprehensive API. Its basic idea is to pass a // |
| Following class diagram further illustrates that: | Following class diagram further illustrates that: | ||
| - | : Response | ||
| + | } | ||
| + | |||
| + | |||
| + | |||
| + | class Message { | ||
| + | id: unique | ||
| + | evaluated: Meaning | ||
| + | evaluate() | ||
| + | } | ||
| + | |||
| + | Request *-- Message | ||
| + | |||
| + | Response -- Request | ||
| + | |||
| + | |||
| + | class Response { | ||
| + | request: Request | ||
| + | answer | ||
| + | history: Trace | ||
| + | } | ||
| + | |||
| + | class TextMessage { | ||
| + | content | ||
| + | } | ||
| + | |||
| + | class AudioMessage { | ||
| + | url | ||
| + | } | ||
| + | Message <|-- AudioMessage | ||
| + | Message <|-- TextMessage | ||
| + | </ | ||
| + | <WRAP pagebreak></ | ||