GithubHelp home page GithubHelp logo

airports's Introduction

Environment

The following tools are required:

  • sbt
  • npm

Install

In the project's root folder, execute:

  • npm install
  • npm run build

Run

In the project's root folder, execute:

  • sbt web/run

Open the browser at localhost:8080

Design considerations

  • Pure FP approach (to encode as much proves in code as possible and to couple components as less as possible)
  • Algebras implemented as tagless-final (because less boilerplate comparing to Free)
  • DI as nested algebras (because it's obvious)
  • Common algorithms extracted in a shared project (because it's common sense)
  • Elm for UI (without any particular reasons)
  • Property based tests where appropriate (to make sure particular algebras are defined on the whole domain)
  • No mocking library in tests (because they suck), dedicated implementations of various low level algebras instead

API

  • GET /health/alive - 200 - "OK" all the time
  • GET /health/ready - 200 - "OK" when data is read and service is ready to serve requests
  • GET /api/airports/<country> - Query for airports pert country
  • GET /api/report/runways - Query for runways types per countries
  • GET /api/report/topcountries - Query for TOP and bottom countries per airports

Limitations / issues

  • UI is ugly (very!)
  • Error handling is not verbose
  • CSV parser is super slow
  • Reports/Queries are performed on data in memory, so no handling for bigger data. But could be changed to any SQL/NoSQL with easy
  • Property based tests mixed with unit tests, could not be suitable for large scale project
  • Elm project is injected in a hacky way (without proper sbt-web project)
  • Some version incompatibility in libs
  • Web Service lacks contract testing

airports's People

Contributors

ysukhoverkhov avatar

Stargazers

Alexander Mikuta avatar

Watchers

 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.