Sign inSign up

internetofus/task-manager

By internetofus

•Updated over 3 years ago

The component to storing and maintaining tasks and the actions to modify them.

Image
0

1.8K

internetofus/task-manager repository overview

⁠Task manager

⁠Introduction

The task manager component is the one responsible for storing and maintaining the task and task types. The task types define the interaction protocols between users and the task is an instance of this type.

The task type uses the OpenAPI⁠ to define the possible attributes of a task, the actions or transactions that a user can do in a task, and the messages or callbacks that can be posted to the application from the task execution. Also, it has a set of norms that describe the behaviour of the user on the task execution.

When a set of users want to be coordinated to do something one of them create a new task. This task has associated a type that describes the behaviour of the user on this execution. The creator of the task, if wants, can define new norms that can modify this default behaviour. The task manager is also responsible for maintaining the state of this task execution. For this reason on the task model are stored all the transactions that have been done on it, and on this transaction are stored the messages that has been sent to the application when this transaction is executed. As well, it provides services that can be used to obtain the messages sent to the users by the application callbacks.

⁠Docker variables

  • API_HOST to define the host where the API has to bind. By default is 0.0.0.0.
  • API_PORT to define the port where the API has to bind. By default is 8080.
  • DB_HOST to define the mongo database server hostname. By default is localhost.
  • DB_PORT to define the mongo database server port. By default is 27017.
  • DB_NAME to define the mongo database name. By default is wenetTaskManagerDB.
  • DB_USER_NAME to define the mongo database user name. By default is wenetTaskManager.
  • DB_USER_PASSWORD to define the mongo database user password. By default is password.
  • WENET_PROFILE_MANAGER_API to define the path to the profile manager component to use. By default is https://wenet.u-hopper.com/prod/profile_manager⁠.
  • WENET_INTERACTION_PROTOCOL_ENGINE_API to define the path to the interaction protocol engine component to use. By default is https://wenet.u-hopper.com/prod/interaction_protocol_engine⁠.
  • WENET_SERVICE_API to define the path to the service component to use. By default is https://wenet.u-hopper.com/prod/service⁠.
  • COMP_AUTH_KEY to define the authentication key that the component has to use to interact with the other WeNet components.
  • CACHE_TIMEOUT to define the time in seconds that a value can be on the cache. By default is 300.
  • CACHE_SIZE to define the maximum number of entries that can be on the cache. By default is 10000.

When the container is started, it stores the log messages at /usr/wenet/task-manager/var/log/task-manager.log. This file is limited to 10 MB and rolled every day using the pattern task-manager.log.X (where X is a number between 1 and 99).

⁠Interaction with other WeNet components

⁠Profile manager⁠
  • Used to validate that an user is defined (GET {{profile_manager_api}}/profiles/{{userId}}).
⁠Service⁠
  • Used to validate that an application is defined (GET {{service_api}}/app/{{appId}}).
⁠Interaction protocol engine⁠
  • Convert any received transaction into a message to post. (POST {{interaction_protocol_engine_api}}/messages)

Tag summary

Content type

Image

Digest

sha256:d727e329c…

Size

145.2 MB

Last updated

over 3 years ago

docker pull internetofus/task-manager