Movie Recommender web service (Flask and Celery)
Based on this story, the algorithm for recommendation described. Now the implementation of this KNN recommender with celery and flask by using mongodb as database is described here.

Model
First for this application the mongodb is used for storing user data, that model is described here:

RESTFULL
The api for this application is build with flask. In the flask application a resource file is developed like this. It will get the data from celery task and save it to the mongo.


Finally the flask application will be like this:

Build and Run
For this purpose, this app easily built with this docker-compose file.
docker-compose up --build -d
By this command the application will be up and ready to get recommended movie from.

Get some movies
By this command the data will be posted:
curl -H "Content-Type: application/json" -X POST -d
'{"movie_name":"Once Upon a Time in America (1984)","number":6}' http://localhost:8000/recommend
this bash command will ask the flask web server for 6 similar movie to Once Upon a Time in America (1984) and the results in flask admin panel:

Not bad:)))