traindb-project / traindb-ml

Remote ML Model Serving Component for TrainDB
Apache License 2.0
6 stars 2 forks source link

feat: Using messaging patterns for TrainDB ML model training #7

Open sungsoo opened 2 years ago

sungsoo commented 2 years ago

feat: Using messaging patterns for TrainDB ML model training

Priority-3

We need to design a method for training tasks of ML models in TrainDB. One of the reasonable solutions for this problem is using a message queue.

Message queues provide an asynchronous communications protocol, meaning that the sender (e.g. TrainDB main) and receiver (e.g. TrainDB-ML in K8s) of the message do not need to synchronously interact with the message queue at the same time. A common use case for jobs is to process work from a work queue. In this scenario, some task creates a number of work items and publishes them to a work queue. A worker job can be run to process each work item until the work queue is empty.

This method will provide the following features:

We could consider several patterns such as FIFO-based MQ pattern and publish-subscribe pattern, to solve the asynchronous training requests and responses.

References

  1. KubeMQ
  2. KubeMQ github