roataway / infrastructure-data

Data sets related to public transport in Chișinău
Other
2 stars 2 forks source link

Serve the infrastructure data over HTTP #12

Open roata opened 4 years ago

roata commented 4 years ago

To add some flexibility to the way route- and vehicle-related information is distributed, we should also serve the data over HTTP.

An easy way to accomplish this would be to run python3 -m http.server

roata commented 4 years ago

I think we should also change the directory structure a bit:

.
├── readme.md, etc...
├── data
│   ├── routes-geojson
│   │   ├── route_1_segments.json
│   │   ├── route_2_stations.json
│   │   ├── ...
│   │   └── ...
│   │── routes.csv
│   └── vehicles.csv

This way, we can specifically serve the data directory and thus make sure no other files will be caught in the way.

iamandrewluca commented 4 years ago

— Ok, ai câteva idei despre loc unde acest rest server poate fi lansat? Ceva care oferă hosting gratuit pentru așa gen de aplicații. E posibil de lansat pe netlify

— Exact ca web-ui, static resources, deploy la fiecare commit la deploy e nevoie doar de transformat CSV-urile in JSON si de servit tot ca json doar ca nu stiu cum va lucra cache-ul la moment la fiecare build daca un json s-a modificat el se regenereaza de fiecare data cu un hash in nume diferit ce invalideaza cache daca fisierul nu a fost modificat el se incarca automat din browser cache in cazul cu REST la infra fisierele JSON vor avea acelasi nume de fiecare data mi-a venit acum o idee noi daca avem nevoie de REST doar ca datele in web-ui sa fie todeauna up to date atunci se poate si fara REST eu pot sa fac un GitHub action in web-ui pentru deploy, care va fi trigeruit de fiecare cand datele se modifica in infra asa cred ca va fi cel mai corect si REST vom face daca apar si alte servicii care au nevoie de aceste date prin REST

iamandrewluca commented 4 years ago

@roata can we close this for now?