Coder Social home page Coder Social logo

whatflix's Introduction

whatflix

Movie title suggestions based on predefined user preferences

Postman collection

A runnable Postman collection can be accessed here here

To run queries against the deployed version select AWS from the dropdown at the top of the collection

Setup

Install Serverless CLI

For more info on serverless see docs

npm install serverless -g

Install project dependencies

npm install

Install required version of node:

nvm use

Run locally

Start app in offline mode

sls offline

Deploying

Set up AWS credentials in preferred way. For options see docs

sls deploy

Decisions

Pre processing .csv files

I/O of reading then the processing taken to parse and CSV files is quite intensive so decided to do this as an offline "build" step. The intention of this is to be run then the outputted .json file be committed to the repo so it can be used in the code.

This had the added advantage of being able to combine and transform the data from the two CSV files into a data structure that was easier to use in the code.

To regenerate the data run:

npm run build

Serverless framework and AWS

Serverless framework provides an easy way to deploy to cloud infrastructure. Serverless only charges per invocation so it is a cost effective service, it also has builtin auto-scaling.

Considerations

Serverless does have it's issues one is "cold starts" where the first time a Lambda runs it takes longer than subsequent invocations. There is strategies to mitigate this including pre-warming or keeping Lambda continually warm.

Not using a Database

Was decided not to use a database to store the data to reduce the complexity of the solution. Doing the filtering in JS is not as efficient as some database solutions would offer with their query interfaces but adding a database would have significantly increased the complexity of the solution which isn't really needed

whatflix's People

Contributors

iaindurham avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.