Movie Rec - A Keras driven cross platform movie reccomendation app that's actually user friendly

A screenshot of Reddit Timer
The image above describes the four servers used for this project and how they interact. (click to expand in new window)

I spent too much time trying to figure out what movie to watch, so now machine learning figures that out for me.

You can find the Next.js client on Github hereand you can find the Apollo server on Github here

About this project

So this is still a WIP, with no demo just yet. The backend is largely built, the front end is still being actively developed. You can see the above picture of the architecture however for reference to how it all fits together.
There are a total of four discrete macro services to this project.

  1. The python server that is used to train the model with an n-hour configurable cron job.
  2. The Tensorflow serving backend that is used to serve the model to the Apollo server efficiently.
  3. The Apollo backend that is used for data amalagation and querying.
  4. And finally the Next.js front end that is used to serve the app.

The Keras Model

My methodology for the machine learning model was to have the input tensors be based on both the quantative features of user ratings, as well as the qualitative features of the movie, such as the director, screenwriter, lead actors, etc. This is because my primary supposition is that the user will more likely be interested in movies by their favorite directors and actors. Sounds simple, right?

This ended up being the most complicated model I've ever built. I spent a lot of time trying to figure out the correct way to model the data and transform it to make it easy and fast to encode.
There are a lot of input features, and the ratings in particular are a bit of a challenge computationally, as the dataset is very sparse due to the fact that a lot of movies have to be included as a zero input.

A screenshot of Reddit Timer
You can see the model shape above (click for full size)

Once I have a demo I'll be adding more information to this page, so stay tuned!

What I've learned on this project so far:

  • Some of the finer points of designing and serving Keras models
  • Dataset cleaning
  • How to deal with many datasources on an Apollo server
  • Google Cloud Services (Realtime server, Auth, Firebase DB)
  • The importance of microservices