Skip to content

Tock Architecture

This chapter presents the general architecture of a Tock platform: components and dependencies, flows, proxy configuration, etc.

Functional Architecture

Two major components are available:

  • the NLU engine: Natural Language Understanding (see Tock Studio)
  • the conversational framework integrated into NLU services and various connectors such as Messenger, Google Assistant or Slack (see developer manual and connectors).

Tock diagram

The NLU platform is independent of the conversational part. It is possible to use the NLU without having to master the complexity induced by conversation management. In some important use cases, such as the Internet of Things, using an NLU model alone is relevant.

Technical architecture

Tock is composed of several application components (containers when using Docker) and a MongoDB database.

The Docker and Docker Compose descriptors provided (ie. the Dockerfile and docker-compose.yml) describe the architecture of Tock.

A complete example can be found in the file docker-compose-bot-open-data.yml available in the repository tock-docker.

MongoDB database

The Mongo database must be configured in replica set, i.e. with at least 3 instances deployed. This is mandatory because Tock uses the Change Streams functionality which has as a prerequisite the installation in replica set.

This is also a good practice to ensure high availability of the database.

Application components

Here is a quick description of the different application components (and Docker images provided with Tock):

A final component, the bot itself, must be added and made accessible to partners and external channels with which we wish to integrate.

Of course the implementation of the bot is not provided with Tock (everyone implements their own functionalities for their needs) but an example is available in docker-compose-bot-open-data.yml.

Deployment modes

  • The NLU platform mode alone (without conversational part):

NLU schema

  • The Tock Bot API mode (recommended for most cases), allowing to develop in Kotlin or another language through the Tock conversational API:

BOT API

  • The Tock Bot integrated mode (historical) allowing to develop in Kotlin only using all the possibilities of Tock but accessing the MongoDB database directly from the bot:

Bot TOCK

See also...

Chat with Tock
×