Consists of:
-
HTTP service of add/update/delete data about users and videos into DB with routes:
app = Application([ (r'/api/users', UserHandler), (r'/api/users/\d+', UserHandler), (r'/api/videos', VideoHandler), (r'/api/videos/\d+', VideoHandler), (r'/api/event', EventHandler), ])
-
Service of DB is based on PostgreSQL
-
HTTP service of backend request for making video recommendations with routes:
app = Application([ (r'/api/videos/recommendations', RecommenderHandler), ])
Request for video recommendation can be one of two forms:
/api/videos/recommendations?locale=en&user_id=1
for usual users/api/videos/recommendations?locale=ru"
for anonymous users
-
Service of video recommendation is based on algorithm SVD from python library surprise
start_services.sh
starts all (four) services abovekill_services.sh
kills all available (working) services aboverestart_services.sh
is a serial applying of two scripts above for start and kill
All services (both HTTP services and both service processes) after starting write their PID into:
pid_db_service.json
pid_recommend_service.json
Logs are store in files:
db_service.log
recommend_service.log