Skip to content

Services

Sambard edited this page Jun 21, 2017 · 9 revisions

There are following services in the project:

Obliczajka

This service is a connection between edge service and database. It is responsible for computations and translations of data from YACS database to API-friendly format. When it does not find a required Crodis in database in sends a request to Updater and then it looks for it again.

Code name

obliczajkas-model1

API

  • Please call: GET /point?latitude={}&longitude={} to get your Crodis

CAS

Crodis Access Service is a proxy over database which asks it for Crodis for specified location. If not found it sends a request to updater and then it ask the YACS again. Then it responds with an obtained Crodis.

Code name

cas

API

Please call: GET on /location?latitude={}&longitude={} to get your Crodis.

YACS

Yet Another Crodis Storage is a MongoDB database service responsible for keeping recently downloaded meteorological data. It deletes it after 1 hour.

Code name

yacs

API

  • Please call: GET /?latitude={}&longitude={} to get your Crodis.
  • Please call: PUT / to make your Crodis safe.

Updater

It is responsible for updating the YACS database. After being asked for update in a specified point it sends a request to translators and saves delivered Crodises in database. Written in Java using Spring boot.

Code name

updater

API

  • Please call POST /location?latitude={}&longitude={} to send a request to update specified location in database.

REST endpoint

It is a service responsible for an edge endpoint. After getting a request it sends the coordinates to Obliczajka and after getting Crodis with meteorological data it responds with it.

Code name

aitg

API

  • Please call /api/weather?latitude={}&longitude={} to send a request. The response would look like this:
{
    "result":{
        "source":"mock",
        "items":[
            {
                "radius":10.0,
                "longitude":19.912,
                "latitude":50.068,
                "conditions":{
                     "temperature":44.0
                }
            }
        ]
    }
}

Eureka

This is a Netflix Eureka service built with Spring boot. Here is its documentation. All of services (except REST endpoint) register itself, so e.g. REST endpoint can dynamically retrieve address of calculating service.

Translators

They are a group of services responsible for sending requests to external meteorological services and translating delivered results into Crodis format. Each one communicates with another institution, however they share the same API.

  • Airly translator – It communicates with the Airly.eu service API. It is written in Python language. Code name: airly
  • ICM translator – It downloads data from the ICM Meteo service. Please note that due to the terms of service, you are not allowed to redistribute data from ICM, unless you have a written permission. It is also written in Python. Code name: icm
  • Marasm pseudotranslator – It is a simple test translator that responds with predefined data. Written in Java using Spring boot. Code name: marasm

API

  • Please call GET /area?latitude={}&longitude={}&radius={} to get your Crodis

Note that latitude and longitude, and radius [in km] are just a hint for the Translator. It may, on its own discretion, return any Crodis.

Additional services

Netflix Ribbon

In most of services we have integrated Netflix Ribbon for load balancing.

Android mobile app

App connects to REST endpoint and sends coordination - user should see results after little amount of time (that's why storing results are so important). Source code is here

Clone this wiki locally