Repository navigation
Two far-apart cities: single merged graph + one segment-speed-file vs two instances? #7763
Replies: 2 comments
|
One graph works. |
|
To add to the points above and cover 3 and 4: 1–2. Disconnected components are fine for MLD: 3. Memory / reload. Memory is roughly additive, so a merged graph uses about what two instances use, minus one process's overhead. The real tradeoff is customization: every 10-minute update re-customizes the whole graph, so a Barcelona sensor change also re-processes Berlin. For two cities that's usually still seconds, but it grows with each city you add. For zero-downtime reloads, load data with 4. Alternatives. If you stay with separate graphs, |
Uh oh!
There was an error while loading. Please reload this page.
Context
I run a Dockerized heat-aware pedestrian routing experiment for two far-apart
cities (Βerlin, Barcelona). An updater recomputes a per-street walking speed from
temperature sensors every ~10 min and feeds OSRM via
--segment-speed-file,so the fastest route becomes the coolest one. A dropdown on a Leaflet map lets
the user pick the city.
Current setup
Two OSRM instances (one per city) + two updaters + two speed files; the API
routes each request by a
?city=param.Proposed change
Collapse to one graph:
osmium mergethe two.osm.pbfextracts so thecities are two disconnected components in a single graph, run one
osrm-routed,and keep one combined speed file. Since
--segment-speed-filekeys areglobally-unique OSM node ids, Berlin and Barcelona rows can't collide, so one CSV
should work. The dropdown stays (it recenters the map); the city is implied by
the clicked coordinates, and cross-city routes are intentionally impossible.
Questions
osrm-partition/osrm-customize) on a graph with twodisconnected components?
osrm-customize --segment-speed-filebehave well when one CSV coversboth components?
All reactions