Git Product home page Git Product logo

hotelratelimited's Introduction

HotelRateLimited

You are provided with hotels database in CSV (Comma Separated Values) format.

We need you to implement HTTP service, according to the API requirements described below. You may use any language or platform that you like: C#/Java/Scala/etc.

RateLimit: API calls need to be rate limited (request per 10 seconds) based on API Key provided in each http call. On exceeding the limit, api key must be suspended for next 5 minutes. Api key can have different rate limit set, in this case from configuration, and if not present there must be a global rate limit applied. Search hotels by CityId Provide optional sorting of the result by Price (both ASC and DESC order). Note: Please don’t use any external library or key-value store for RateLimit. You need to create a InMemory Implementation for RateLimit.

Running the application

  1. Install a jar dependency mvn install:install-file -Dfile=./src/main/resources/csvjdbc-1.0-29.jar -DgroupId=csvjdbc -DartifactId=csvjdbc1029 -Dversion=1.0 -Dpackaging=jar -DgeneratePom=true

  2. ./run.sh

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.