GithubHelp home page GithubHelp logo

movierating's Introduction

#Movie Rating service

RESTful microservice, powered by Spring Boot, one-button bootstrap, can benefit from Redis datastore to optimise movie ranking on-the-fly, in-memory H2 database, which can simply be replaced by MongoDB or any other DB with a few lines of code.

##To run the program:

  • Clone this repository

  • ./gradlew bootRun

##Available options:

-Dserver.port - port for this application

-Dpath - path to file with input data

-Dredis - use Redis for rating service, needs Redis running locally on 6379

##To enable Redis:

a) Install Redis locally (default port - 6379)

OR

b) Install Docker with Compose and run:

docker-compose up -d

Start service with -Dredis=true:

./gradlew bootRun -Dredis=true

##RESTful API:

Thanks to Spring HATEOAS, the service provides easy access to the state:

NB! JSONView plugin for chrome is highly recommended: https://chrome.google.com/webstore/detail/jsonview/chklaanhfefbnpoihckbnefhakgolnmc/related?hl=en

Movie API will be available at http://localhost:8080/movies + {?page,size,sort}

Movie search API reference will be available at http://localhost:8080/movies/search

Current rankings available at http://localhost:8080/movies/rankings

##Bonus:

Spring Rest Repositories also support updating/inserting entities via REST:

$ curl -X POST -i -H "Content-Type:application/json" -d '{"year":"1989", "rating":"100", "title":"Westworld"}' http://localhost:8080/movies

movierating's People

Contributors

witchmonster avatar

Watchers

 avatar  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.