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

Replace nominatim with something more lightweight #5

Closed
ellenhp opened this issue May 28, 2022 · 7 comments
Closed

Replace nominatim with something more lightweight #5

ellenhp opened this issue May 28, 2022 · 7 comments
Labels
enhancement New feature or request

Comments

@ellenhp
Copy link
Member

ellenhp commented May 28, 2022

Right now nominatim is just used as a source of truth for OSM data. Only the lookup endpoint is exposed. There's no reason we couldn't replace it with something more lightweight built on top of postgis. That could drastically reduce the memory requirements for the full Headway stack, potentially even to the point that the whole planet could be hosted with 64GB of RAM which is about the point where it becomes feasible to do.

@ellenhp ellenhp added the enhancement New feature or request label May 28, 2022
@ellenhp
Copy link
Member Author

ellenhp commented May 28, 2022

@clementmas
Copy link

Isn't Nominatim a requirement for the Photon geocoder? Otherwise, how do you import the Photon Elastic Search data?

Thanks for your great work! I'm trying to set up a planet vector tile and geocoder server and what you're doing is very inspiring :)

@ellenhp
Copy link
Member Author

ellenhp commented May 29, 2022

Nominatim would still be a necessary part of photon index generation, yeah. The idea is just to save resources at runtime. I went to go check on my demo server though and while both GraphHopper and photon are using a fair bit of memory I don't see anything in top that would indicate nominatim is using a bunch of RAM at runtime. It's possible it's just a resource hog during the import?

@ellenhp
Copy link
Member Author

ellenhp commented May 30, 2022

I was speaking with a friend about this over brunch and realized that nominatim supports queries that could be used to implement categorical search, which would be very useful so I'm inclined to keep it for now.

@clementmas
Copy link

I only used Photon with a pre-generated search index dump. I don't know if Nominatim runs in the background. I'm still learning how to configure all these tools.

@ellenhp
Copy link
Member Author

ellenhp commented Jun 1, 2022

If you've used Photon with the pre-generated index then you probably didn't have Nominatim running in the background, but Headway is currently configured to use both.

@ellenhp
Copy link
Member Author

ellenhp commented Jun 1, 2022

I think I'm closing this for now, because categorical search is pretty important for a maps app and nomimatim is probably the easiest way to get implement it. Photon supports query filtering by OSM tag, but it doesn't support only querying by OSM tag. It also requires text.

@ellenhp ellenhp closed this as completed Jun 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants