Requirement: docker, docker compose on your machine
docker compose up
The node service will be available, be listening to port 3005 in your local machine The web app will be accessible via port 3004, you can see it in your browser
docker build -t tuancr/poc-machine-learning-service:latest -f Dockerfile .
docker build -t tuancr/poc-machine-portal-node:latest -f Dockerfile ./modules/portal-service
docker build -t tuancr/poc-machine-web-app:latest -f Dockerfile ./modules/webapp
Machine Learning Processing
Machine Learning Processing system
- Uploading File, Progress Status Reporting
- Web Interface for User
- The machine learning work is resource-intensive task
- Our system must be acted as an robusness service eventhough behind it our service is very busy of processing the machine learning work
We need at lease two service that do two unrelated concern
- For interacting, as a direct interface of our system to the end user
- For running the machine learning job
Our solution for our system avaibility is decoupling two service using asynchronous communication method, message-queue communicating pattern.
Because we have two problem, two concerns that have so much gap caused by its difference in the kind of tasks that they handle
- The user interacting problem/concern - almost contains running non-heavy tasks, unintensive tasks, and we need avaibility, short-delay timed facing with user to make our user experience fluent, uninterupted
- The machine learning task - involve doing heavy machine learning task even with limitation of hardware resource -> easy to failed, need to be appropriate for horizontal scaling -> to make our whole system fault tolerance
Written in Domain Driven design, Hexagon Architecture, using parsing-not-validate pattern for model integration logic. * source code folder: here * written in Python
Works as an interface interacting directly to our end user * Accepting user input * Upload file to a object storage, or datalake * Initiate the task and has a data model instance in a shared memory accross services * We use postgres for our sharing memory between services
The main service would be exposed by GRPC interface
We have expressjs rest api for interacting with the user interface like Webapp
Only for web interface * Communicate with the nodejs service via Rest API