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

Derive timezone from geolocation on DB insert #109

Open
brianfeister opened this issue Aug 8, 2024 · 0 comments
Open

Derive timezone from geolocation on DB insert #109

brianfeister opened this issue Aug 8, 2024 · 0 comments

Comments

@brianfeister
Copy link
Member

In order to prevent user toil, we want to auto-detect timezone (dropdown fatigue for data entry is real) as derived from latitude and longitude. Events that lack geocoordinates will be discarded / not eligible for DB insertion

We have a few different paths where events can be updated:

  • A theoretical admin UI where users add platform-level events (The Regular is our only initial customer here)
  • A seshu / scraping / ingestion layer where external events are scraped > discarded if they lack latitude / longitude > then inserted

In all cases, we should have a DB hook (possibly in the DB mapper layer @msnorth ?) that uses an internal service to derive timezone from latitude / longitude.

I've found these libraries, which don't have tons of stars, but I'm also comfortable with the idea we might have to fork / update them. They are mostly just a dictionary with some minimal abstractions over top.

We can use this as an internal timezone service that updates timezone for an event, any time the latitude and longitude change.

Open to suggestions if anyone finds other / better libraries. Also, I'm sure it's easy to swap this out / undo our decision regarding library in the future

Performance of the options should be compared, any of these will have an impact on cold lambda start times and the base lookup latency timing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

1 participant