{"action":"created","issue":{"url":"https://api.github.com/repos/orbitjs/orbit.js/issues/155","labels_url":"https://api.github.com/repos/orbitjs/orbit.js/issues/155/labels{/name}","comments_url":"https://api.github.com/repos/orbitjs/orbit.js/issues/155/comments","events_url":"https://api.github.com/repos/orbitjs/orbit.js/issues/155/events","html_url":"https://github.com/orbitjs/orbit.js/issues/155","id":89123490,"number":155,"title":"Proposal: extract related inverse operations generation","user":{"login":"opsb","id":46232,"avatar_url":"https://avatars.githubusercontent.com/u/46232?v=3","gravatar_id":"","url":"https://api.github.com/users/opsb","html_url":"https://github.com/opsb","followers_url":"https://api.github.com/users/opsb/followers","following_url":"https://api.github.com/users/opsb/following{/other_user}","gists_url":"https://api.github.com/users/opsb/gists{/gist_id}","starred_url":"https://api.github.com/users/opsb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opsb/subscriptions","organizations_url":"https://api.github.com/users/opsb/orgs","repos_url":"https://api.github.com/users/opsb/repos","events_url":"https://api.github.com/users/opsb/events{/privacy}","received_events_url":"https://api.github.com/users/opsb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":21,"created_at":"2015-06-17T20:53:11Z","updated_at":"2015-06-25T01:11:04Z","closed_at":null,"body":"In orbit-firebase I was previously relying on the memory-source to generate the related inverse operations which were then propagated across to the orbit-firebase source. I'm very happy to see that the inverse operations aren't propagated anymore but it now means that I need to generate the inverse operations inside orbit-firebase.\r\n\r\nCurrently the related-inverse-links processor generates inverse operations for a particular link but it doesn't handle the transitive inverse operations (this is handled by the recursive calls to cache.transform). \r\n\r\nIdeally we could extract the recursion from cache.transform so that relatedInverseLinksProcessor.process too care of it. This would mean separating generation of the inverse links and the reverse links (currently they're handled in the same code path) so that we'd end up with something like:\r\n\r\n    transform: function(operation){\r\n        var relatedOperations = relatedOperationsLinkProcessor.process(operation);\r\n        this._transformCache(relatedOperations);\r\n        this._addReverseLinks(relatedOperations);\r\n    }\r\n\r\nWould need to work dependentOps in there as well somehow (not sure if they could be performed in a batch after the relatedOperations or if they need to be mixed in as they currently are).  \r\n\r\n@dgeb how does this sit with you as a general approach?"},"comment":{"url":"https://api.github.com/repos/orbitjs/orbit.js/issues/comments/115059951","html_url":"https://github.com/orbitjs/orbit.js/issues/155#issuecomment-115059951","issue_url":"https://api.github.com/repos/orbitjs/orbit.js/issues/155","id":115059951,"user":{"login":"dgeb","id":29122,"avatar_url":"https://avatars.githubusercontent.com/u/29122?v=3","gravatar_id":"","url":"https://api.github.com/users/dgeb","html_url":"https://github.com/dgeb","followers_url":"https://api.github.com/users/dgeb/followers","following_url":"https://api.github.com/users/dgeb/following{/other_user}","gists_url":"https://api.github.com/users/dgeb/gists{/gist_id}","starred_url":"https://api.github.com/users/dgeb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgeb/subscriptions","organizations_url":"https://api.github.com/users/dgeb/orgs","repos_url":"https://api.github.com/users/dgeb/repos","events_url":"https://api.github.com/users/dgeb/events{/privacy}","received_events_url":"https://api.github.com/users/dgeb/received_events","type":"User","site_admin":false},"created_at":"2015-06-25T01:11:04Z","updated_at":"2015-06-25T01:11:04Z","body":"Since we need to solve this problem before this next release, this is probably the right time to explore all our options, even if they involve radical changes."}}