I have about a million points like this:
- Latitude
- Longitude
- Text (short text of less than 128 characters)
I am writing an app that must quickly show what points are around the user.
User: I am at lat0,long0. What points are around me?
Server: Nearest to you is lat1,long1 then lat2,long2 then [...] then lat100,long100.
[User scrolls through the points]
User: I have checked this first hundred points. Give me more.
Server: Next nearest to you is lat101,long101 then lat102,long102 then [...] then lat200,long200.
Once per day, new points data arrive, replacing all existing points. This reload should not interrupt the requests for more than a minute. Serving old data while loading the new data would be great in order to have zero interruption.
Requirements:
- Open source
- Gratis
- I can load new data into it via an API, or via command line on the same server
- Efficient paging (when user scrolls wildly and generates many requests, the response time to these requests do not get slower and slower)
- Requires as little maintenance as possible
- Lightweight. In particular, I would prefer to avoid a full-text search server that happens to also have spatial features.
- Runs on a VM with 1GB of RAM and a modest processor
Bonus if it also handles "categories": Each point has a category, and the user can ask for only points of a certain category, there are mo more than 20 categories. No need for text search, the text associated with each point is not something anybody will ever search for. All data is public, so no need for authentication. Can use any coordinate system, I will adapt.