-
Notifications
You must be signed in to change notification settings - Fork 16
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
Mongo 2-phase commit should be implemented #5
Comments
It would be really impressive if you managed to implement this. I wish i could help but its a bit beyond me atm. |
I can sort of see my way through how it would go down, but it would take a big refactor of the whole package. There are a bunch of other things that are higher on my priority list at the moment, as the package works in its current form, even though I know the approach used is pretty brittle. One day ... |
👍 |
0.7.0 gets very close to achieving this. Leaving the issue open until I can make it bulletproof. |
0.7.5 is another big improvement. The approach is not as solid as the one outlined in the mongo docs, but it makes fewer writes and, with oplog/mergebox pressure to consider it's "good enough" for the moment. |
Amazing! |
The mongo 2-phase commit approach can be implemented in this package. It will take some refactoring, but it will ensure better data integrity than the current naive/optimistic transaction model that the package employs.
It would be necessary (and a big improvement) to change the way that transactions originating on the client are handled. Instead of make client side collection updates, thereby pushing a bunch of inserts, updates and removes through the allow/deny rules, the whole set of transaction data can be sent to the server via a method, processed there, and the db changes made or rejected based on identical permission checks to those used for transactions originating on the server. This would lead to much more maintainable/reliable app code, preserve latency compensation, and allow for a proper 2-phase commit for transactions originating from both client and server.
The text was updated successfully, but these errors were encountered: