ogn-gateway-web

Introduction

GIT repository

depends-on: ogn-commons, ogn-client

OGN gateway-web is a standalone java spring boot application which is meant to serve statistics (in JSON format) + generated charts via HTTP.

Running the gateway-web in docker

Docker image is available in Docker Hub repository. That's the easiest and fastest way of launching this app. You can run it on your machine (or in a cloud!) and you don't need to checkout the code, compile, configure, etc.. anymore.

Of course if you still prefer to do it the "classic" way (i.e. checkout sources, build & run the app…) follow the this tutorial for ogn-gatway (the build steps are practically the same).

production system deployment topology

A stack of containers is defined in a docker cloud. A reverse proxy ogn-gateway-web-nginx stands between a user and the ogn-gateway-web container. Only the proxy exposes port (http 80). Proxy serves IGC files and runs server-side python cgi scripts (e.g. rendering igc file list pages). All requests for stats (/rest & /charts) are redirected to the ogn-gateway-web container, on port 8080.

docker-ogn-gateway-web-deployment-topo.PNG

REST requests

http://{HOST}:{PORT}/rest

URL description example
/activerec/{days} returns a JSON with a list of active receivers within the last N days http://stats.ogn.aero/rest/activerec/30
/toprange/{count} http://stats.ogn.aero/rest/toprange/25
/toprange-all/{date} http://stats.ogn.aero/rest/toprange-all/2018-04-29
/toprange/{date}/{count} http://stats.ogn.aero/rest/toprange/2018-04-29/5
/topcount/{date}/{count} http://stats.ogn.aero/rest/topcount/2018-04-29/30
/topcount-all/{date} http://stats.ogn.aero/rest/topcount-all/2018-04-29
/topalt-all/{date}/{limit} http://stats.ogn.aero/rest/topalt-all/2018-04-29/30
/topalt-all/{date} http://stats.ogn.aero/rest/topalt-all/2018-04-29

CHART requests

http://{HOST}:{PORT}/charts

URL description example
/online-rec draws a chart with active receivers within the last 30 days http://stats.ogn.aero/charts//online-rec
/online-rec/{days} draws a chart with active receivers within the last N days http://stats.ogn.aero/charts/online-rec/120
/dist-aircraft/{days} http://stats.ogn.aero/charts/dist-aircraft/7
/toprec-range/{count} http://stats.ogn.aero/charts/toprec-range/10
/toprec-range/{date}/{count} http://stats.ogn.aero/charts/toprec-range/2018-04-29/10
/toprec-count/{limit} http://stats.ogn.aero/charts/toprec-count/30
/toprec-count/{date}/{limit} http://stats.ogn.aero/charts/toprec-count/2018-04-29/30
/topalt/{date}/{limit} http://stats.ogn.aero/charts/topalt/2018-04-29/30
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License