{"action":"created","issue":{"url":"https://api.github.com/repos/JackAdams/meteor-transactions/issues/5","labels_url":"https://api.github.com/repos/JackAdams/meteor-transactions/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/JackAdams/meteor-transactions/issues/5/comments","events_url":"https://api.github.com/repos/JackAdams/meteor-transactions/issues/5/events","html_url":"https://github.com/JackAdams/meteor-transactions/issues/5","id":53988161,"number":5,"title":"Mongo 2-phase commit should be implemented","user":{"login":"JackAdams","id":1647779,"avatar_url":"https://avatars.githubusercontent.com/u/1647779?v=3","gravatar_id":"","url":"https://api.github.com/users/JackAdams","html_url":"https://github.com/JackAdams","followers_url":"https://api.github.com/users/JackAdams/followers","following_url":"https://api.github.com/users/JackAdams/following{/other_user}","gists_url":"https://api.github.com/users/JackAdams/gists{/gist_id}","starred_url":"https://api.github.com/users/JackAdams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JackAdams/subscriptions","organizations_url":"https://api.github.com/users/JackAdams/orgs","repos_url":"https://api.github.com/users/JackAdams/repos","events_url":"https://api.github.com/users/JackAdams/events{/privacy}","received_events_url":"https://api.github.com/users/JackAdams/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/JackAdams/meteor-transactions/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-01-11T10:38:22Z","updated_at":"2015-03-11T03:48:58Z","closed_at":null,"body":"[The mongo 2-phase commit approach](http://docs.mongodb.org/manual/tutorial/perform-two-phase-commits/) 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.\r\n\r\nIt 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."},"comment":{"url":"https://api.github.com/repos/JackAdams/meteor-transactions/issues/comments/78200657","html_url":"https://github.com/JackAdams/meteor-transactions/issues/5#issuecomment-78200657","issue_url":"https://api.github.com/repos/JackAdams/meteor-transactions/issues/5","id":78200657,"user":{"login":"dcworldwide","id":4898751,"avatar_url":"https://avatars.githubusercontent.com/u/4898751?v=3","gravatar_id":"","url":"https://api.github.com/users/dcworldwide","html_url":"https://github.com/dcworldwide","followers_url":"https://api.github.com/users/dcworldwide/followers","following_url":"https://api.github.com/users/dcworldwide/following{/other_user}","gists_url":"https://api.github.com/users/dcworldwide/gists{/gist_id}","starred_url":"https://api.github.com/users/dcworldwide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcworldwide/subscriptions","organizations_url":"https://api.github.com/users/dcworldwide/orgs","repos_url":"https://api.github.com/users/dcworldwide/repos","events_url":"https://api.github.com/users/dcworldwide/events{/privacy}","received_events_url":"https://api.github.com/users/dcworldwide/received_events","type":"User","site_admin":false},"created_at":"2015-03-11T03:48:58Z","updated_at":"2015-03-11T03:48:58Z","body":":+1: "}}