Repository navigation
Conversation
|
@NinaWie ready to review? |
| target: self, | ||
| action: #selector(manuallyRefreshServerLocations) | ||
| ) | ||
| navigationItem.rightBarButtonItem?.accessibilityLabel = "Refresh machine data" |
There was a problem hiding this comment.
should we show the time of the last refresh?
There was a problem hiding this comment.
Nice idea but where? as a pop up when clicking on the refresh button? or a small text underneath (probably ugly)
| query, | ||
| get_engine(), | ||
| geom_col="geom", | ||
| params=params, |
There was a problem hiding this comment.
There is a concurrency bottleneck here because we change paradigms: After rollout, we move from a single regular SQL call (to get server_locations.json) to a per-user workload on the DB. If hundreds of users simultanously re-request the whole DB (imagine all users get the udpate at the same point in time), it may OOM even the entire server. Not sure how high this risk is, but it could be worth to @lru_cache the responses. It should also lower latency not only improve conccurrency. Just a thought
Caches machines by saving the latest artworks-collection (all_locations merged with server_locations) to disk
Design choices:
sinceargument based on last_updated with a one-day overlap (i.e. loading all changes from yesterday and today).When we remove the all_locations.json, the app can start without the bundled file and fetch the full dataset from the server. A fresh install will need network access to show machines; existing installs can use their cache.