[openstreetmap/openstreetmap-website] Add back users.nearby column as a dummy (#2543)

Andy Allan notifications at github.com
Wed Feb 19 10:57:48 UTC 2020


> My opinion is that we can't be held hostage by a package like osmosis that is essentially dead.
> 
> Loading data into an API database is not something most people ever have any need to do so I don't see this as an urgent problem to solve.

> The thing is that osmosis loading has never worked very well and tends to just lead to frustrated users which is why I try and discourage it.

> It remains one of the only mainstream API DB write paths that I’m aware of, so it’s likely that we are stuck with it.

I agree with all the above statements, which is frustrating since there's no obvious way forward. My magic wand (if I had one) would conjure up someone to spin an osmosis 0.47.1 release with just the patch in https://github.com/openstreetmap/osmosis/pull/54 applied and then we can move on.

I really don't want to add an unused column to our database just to satisfy a broken client that should never have been using this column in the first place. The fact that it is unmaintained suggests that the correct approach is going to be to either find a new maintainer or find replacement software. And osmosis has never really worked very well for this anyway, due to both conflicts with existing data, and leaving sequences broken, and all that kind of stuff.

Given the existing need to run "fixup" SQL commands for the sequences when running osmosis, I think we should just update the documentation to add in the additional SQL commands (along with clearer warnings about the downsides, like messing up dbs with existing geodata, user accounts or both) and move on.

> That, or providing a supported piece of code inside this repository to write to the API DB.

The problem is that adding additional data to the db is simple only when the db is already empty. Any other situation becomes complex to the point of being a significant task. I suspect you need the user to decide what to do when e.g. node_id 10,003 already exists (overwrite it? or create a new node, and rewrite all references in the current import), or when user_id = 2 is already in the database - use this user for all the related data in the import, or create a new user for stuff coming from the import, and so on and so on. All these decisions have big implications for what the user is trying to do, when anyone wants to use it beyond just filling an empty db. So this suggests a non-trivial piece of software with many options, tests and complexity, that's not really suitable as a script in this repo.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/2543#issuecomment-588161811
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20200219/8770b6a7/attachment.htm>


More information about the rails-dev mailing list