infrastructure.md 2.69 KB

Infrastructure of BHT-Chatbot Project

The whole project is built using gradle and divided into a couple of sub projects (cf. Sub projects section). Each module is loosely connected through a Java Message Service. The application is running on a JBoss Wildfly 10 inside of a docker container. Another docker container is used for the Rasa backend, one for the PostgreSQL database and one for the Adminer database management tool.

Sub projects

DISCLAIMER: Please note that the following information is documented by the second project team who felt that a deeper look into the project structure should be a requirement for teams working on the project. This means that information is written 'as understood'. The original designers of the system had great knowledge of their architecture but sadly forgot to share it.

The different modules of the application are deployed as individual services where no service knows whether the other services exist or not. The Java Massage Service is a bus like system where a service can send a message with a key and interested services can wait for messages with a certain key. An exception to this is the common module which is referenced by every other module. To lesser the dependencies here, the common module contains only interfaces and enums. The implementations to these interfaces lie in the global module which is unknown by the other modules.

The mainBot module contains the core chat bot logic defining the specific use cases the bot supports.

To read more about modules in Wildfly 10, see JBoss configuration and usage.

To read the story behind a very nasty issue with global entity classes, see Why is the persistence layer located in common instead of global?

MainBot

  • Canteen Parser - web crawler for collecting data of the beuth university canteen
  • Common - holding common classes used by all other subprojects
  • Drools - Business Rules Management System used to generate the right answer
  • Global - global available services
  • Scheduler - Scheduling EJB, used to create and handle reminders.

Natural Language Processing

  • ApiAi - simple RESTEasy client application calling googles Api.ai API
  • Rasa - simple RESTEasy client application calling the rasa backend rest API

Messenger

  • Facebook - Facebook Messenger connector
  • Telegram - Telegram Messenger connector

Text <-> Speech Processing

  • Bing Speech - REST client for Microsofts Bing Speech API