Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serve the infrastructure data over HTTP #12

Open
roata opened this issue Feb 2, 2020 · 3 comments
Open

Serve the infrastructure data over HTTP #12

roata opened this issue Feb 2, 2020 · 3 comments

Comments

@roata
Copy link
Member

roata commented Feb 2, 2020

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
Copy link
Member Author

roata commented Feb 2, 2020

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
Copy link
Member

— 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
Copy link
Member

@roata can we close this for now?

@iamandrewluca iamandrewluca removed their assignment Sep 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants