Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
| 
                    wiki:software:beuthbot:software-architecture [10.12.2019 16:40] Christopher Lehmann angelegt  | 
                
                    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 ==== | 
| - | <!-- TOC depthFrom:2 depthTo:6 withLinks:1 updateOnSave:1 orderedList:0 --> | + | 	- [[wiki: | 
| + | 	- [[wiki:software:beuthbot:software-architecture# | ||
| + | 	- [[wiki:software:beuthbot: | ||
| + | 		- [[wiki: | ||
| + | 		- [[wiki: | ||
| + | 		- [[wiki: | ||
| + | 		- [[wiki: | ||
| + | 	- [[wiki: | ||
| - | - [Table of Contents](# | + | ==== Overview  | 
| - | - [Overview](# | + | |
| - | - [Basic Structure](# | + | |
| - | 	- [Bot](# | + | |
| - | 	- [Gateway](# | + | |
| - | 	- [Registry](# | + | |
| - | 	- [Service](# | + | |
| - | - [API](#api) | + | |
| - | < | + | //BeuthBot// consists of many interwoven // | 
| - | ## Overview | + | ==== Basic Structure  | 
| - | + | ||
| - | _BeuthBot_ consists of many interwoven _Microservices_. Evey Microservice uses our basic API to communicate with other Microservices. This approach enables us to change parts of the system easily at any time or to introduce new Microservices, | + | |
| - | + | ||
| - | ## Basic Structure | + | |
| Our application is basically composed of the following four components. | Our application is basically composed of the following four components. | ||
| Zeile 26: | Zeile 22: | ||
| > Bot <=> Gateway <=> Registry <=> Service | > Bot <=> Gateway <=> Registry <=> Service | ||
| - | Following diagram shows that in more detail. | + | Following diagram shows that in more detail: | 
| - |  _Microservices_ to get the meaning and intention of the user. Here we try to extract what the user wants from _BeuthBot_, to notify the right service and present a fitting answer to our user. | + | abstract class Service | 
| - | ### Registry | + | class MensaService | 
| + | Service <|-- MensaService | ||
| + | Service <|-- WetterService | ||
| - | After obtaining the intention of our user, the _Gateway_ notifies the _Registry_, to get the information the user requested. | + | Registry " | 
| + | </ | ||
| - | The Registry distributes  | + | A user can write the //Bot// to request  | 
| - | ### Service | + | Following sequence diagram further illustrates that: | 
| - | _Service_ is an abstraction for the implemented _Microservices_ that retrieve the necessary data we need to answer users requests. E.g. the _MensaService_ is a _Microservice_ that can give informations about the current menu, filtered by a number of parameters, e.g. a vegan user. | + | < | 
| + | 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) | ||
| + | </ | ||
| - | ## API | + | === Bot === | 
| - | Because of the complexity of the single _Microservices_, | + | This is an abstraction for the available chatbots, e.g. a //Bot// for // | 
| - | But to answer a users request we use a unified, comprehensive API. Its basic idea is to pass a _Response_-Object trough the individual  | + | The user interacts with this // | 
| + | |||
| + | === Gateway === | ||
| + | |||
| + | The //Gateway// is the centerpiece of // | ||
| + | |||
| + | The //Bot// notifies the //Gateway// with the message it got from the user. | ||
| + | |||
| + | The //Gateway// then uses NLP (Natural Language Processing) // | ||
| + | |||
| + | === Registry === | ||
| + | |||
| + | After obtaining the intention of our user, the //Gateway// notifies the // | ||
| + | |||
| + | The Registry distributes the request to the correct // | ||
| + | |||
| + | === Service === | ||
| + | |||
| + | //Service// is an abstraction for the implemented // | ||
| + | |||
| + | ==== API ==== | ||
| + | |||
| + | 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 // | ||
| 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></ | ||