by linsomniac · 8y ago · 0 comments
Then I came in to read this story.
Yesterday we were trying to figure out what our update strategy would be, if we would pull daily deltas, do quarterly updates, etc... We discussed the idea of vandalism and didn't have a good answer for how to prevent it. We thought about lagging behind the latest changes and then doing a "catch up" if vandalism was detected. Really what we'd like to do is make changesets based on the age of the change, except including our most recent changes (because our reputation is great :-), but I don't even know how to start doing that.
I'm pretty sure you can get a stream of all the changes, so you would need to do something like have one copy of the database where you processed updates in near real time, and a second (production) copy where you had a delayed replication stream; in that stream, you'd want to look ahead at the real time database to calculate your stability heuristic.
Alternatively, you could have the realtime database also populate a changed object queue -- anytime an object is changed pull it out of the middle of the queue and place it at the end again. If it makes it to the front, pull the current object data and place it in your production database.
This should help with vandalism, but you do run the risk of accepting only parts of a coordinated edit of several objects. You could consider simply stopping replication into your production database in case anything ends up ultimately unstable, but I suspect it's hard to find a point in time where everything edited before was not edited again in the next 15 days (or whatever your threshold is).
This is definitely a complex problem to solve, especially since you would want to have some escape hatches so your changes happen quickly, or you could flag upstream changes to apply quickly, or worst case, you might want to revert to an earlier version of the database.
If you can figure out how to divide the data into different regions, you might have better luck, but sometimes object ids are moved around quite a bit. Geodata is already messy, and having a multitude of editors doesn't help with consistency etc.