Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is like asking what happens if two different micro-services try to make incompatible changes to the same database.

Or what happens when two different users try to make incompatible changes to the same Google Doc?

Or what happens when you try to GIT Merge a commit that has incompatible changes?

It’s your code, so it’s in your control what happens, and also in your control how to react to what you can’t control.

You can write code that avoids conflicting manipulations (let’s say all the dom manipulations only ever happen on one thread) or you can write code that handles the case... It’s a case by case kind of thing, there is no one answer.



All of these cases have a well-defined conflict resolution mechanism. All of these cases except for Google Docs explicitly have a way for the client to be notified that their requested change failed (I believe Google Docs just defines the editing operations such that a conflict can always be automatically resolved).

The DOM API does not have any way to even notify the client that their DOM manipulation failed.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: