{"action":"created","issue":{"url":"https://api.github.com/repos/eclipse/che/issues/1803","repository_url":"https://api.github.com/repos/eclipse/che","labels_url":"https://api.github.com/repos/eclipse/che/issues/1803/labels{/name}","comments_url":"https://api.github.com/repos/eclipse/che/issues/1803/comments","events_url":"https://api.github.com/repos/eclipse/che/issues/1803/events","html_url":"https://github.com/eclipse/che/issues/1803","id":166075979,"number":1803,"title":"Investigate strategies for cascade entities removing","user":{"login":"skabashnyuk","id":1614429,"avatar_url":"https://avatars.githubusercontent.com/u/1614429?v=3","gravatar_id":"","url":"https://api.github.com/users/skabashnyuk","html_url":"https://github.com/skabashnyuk","followers_url":"https://api.github.com/users/skabashnyuk/followers","following_url":"https://api.github.com/users/skabashnyuk/following{/other_user}","gists_url":"https://api.github.com/users/skabashnyuk/gists{/gist_id}","starred_url":"https://api.github.com/users/skabashnyuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skabashnyuk/subscriptions","organizations_url":"https://api.github.com/users/skabashnyuk/orgs","repos_url":"https://api.github.com/users/skabashnyuk/repos","events_url":"https://api.github.com/users/skabashnyuk/events{/privacy}","received_events_url":"https://api.github.com/users/skabashnyuk/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/eclipse/che/labels/kind/enhancement","name":"kind/enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/eclipse/che/labels/status/pending-merge","name":"status/pending-merge","color":"f7c6c7"},{"url":"https://api.github.com/repos/eclipse/che/labels/team/platform","name":"team/platform","color":"c5def5"}],"state":"open","locked":false,"assignee":{"login":"evoevodin","id":4053805,"avatar_url":"https://avatars.githubusercontent.com/u/4053805?v=3","gravatar_id":"","url":"https://api.github.com/users/evoevodin","html_url":"https://github.com/evoevodin","followers_url":"https://api.github.com/users/evoevodin/followers","following_url":"https://api.github.com/users/evoevodin/following{/other_user}","gists_url":"https://api.github.com/users/evoevodin/gists{/gist_id}","starred_url":"https://api.github.com/users/evoevodin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evoevodin/subscriptions","organizations_url":"https://api.github.com/users/evoevodin/orgs","repos_url":"https://api.github.com/users/evoevodin/repos","events_url":"https://api.github.com/users/evoevodin/events{/privacy}","received_events_url":"https://api.github.com/users/evoevodin/received_events","type":"User","site_admin":false},"assignees":[{"login":"evoevodin","id":4053805,"avatar_url":"https://avatars.githubusercontent.com/u/4053805?v=3","gravatar_id":"","url":"https://api.github.com/users/evoevodin","html_url":"https://github.com/evoevodin","followers_url":"https://api.github.com/users/evoevodin/followers","following_url":"https://api.github.com/users/evoevodin/following{/other_user}","gists_url":"https://api.github.com/users/evoevodin/gists{/gist_id}","starred_url":"https://api.github.com/users/evoevodin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evoevodin/subscriptions","organizations_url":"https://api.github.com/users/evoevodin/orgs","repos_url":"https://api.github.com/users/evoevodin/repos","events_url":"https://api.github.com/users/evoevodin/events{/privacy}","received_events_url":"https://api.github.com/users/evoevodin/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2016-07-18T11:48:35Z","updated_at":"2016-08-28T16:15:50Z","closed_at":null,"body":"_The problem:_\r\nUser removed, but related entities like _Workspaces_, _Factories_ or _Permissions_ are not removed which leaves the system in inconsistent state and causes different problems(e.g. if workspace is not removed than _namespace_ is still aquired by non-existing user, while it is impossible to use that namespace).\r\n\r\n_Requirements:_\r\n1. Entity related data must be removed along with the entity\r\n2. If it is impossible to remove some of entity related data, then entity mustn't be removed either and removed data must be restored. In this way we can create application related constraints which will enforce user to perform some actions before removing the entity.\r\n3. Sometimes it is necessary to know that entity is removed, the mechanism of notifying clients based on the _EntityRemoved_ events which usually published after entity is removed.\r\nSo the strategy of cascade removing should be rather on application-level than on the DBMS level which allows to control _EntityRemoved_ events.\r\n\r\n_What should be done:_\r\nAs a result we should investigate the best way for performing cascade remove which fits our application architecture with all the pros and cons of it. \r\n\r\n_Consider using:_\r\n- EventBus\r\n- Jpa Events"},"comment":{"url":"https://api.github.com/repos/eclipse/che/issues/comments/242983284","html_url":"https://github.com/eclipse/che/issues/1803#issuecomment-242983284","issue_url":"https://api.github.com/repos/eclipse/che/issues/1803","id":242983284,"user":{"login":"TylerJewell","id":392458,"avatar_url":"https://avatars.githubusercontent.com/u/392458?v=3","gravatar_id":"","url":"https://api.github.com/users/TylerJewell","html_url":"https://github.com/TylerJewell","followers_url":"https://api.github.com/users/TylerJewell/followers","following_url":"https://api.github.com/users/TylerJewell/following{/other_user}","gists_url":"https://api.github.com/users/TylerJewell/gists{/gist_id}","starred_url":"https://api.github.com/users/TylerJewell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TylerJewell/subscriptions","organizations_url":"https://api.github.com/users/TylerJewell/orgs","repos_url":"https://api.github.com/users/TylerJewell/repos","events_url":"https://api.github.com/users/TylerJewell/events{/privacy}","received_events_url":"https://api.github.com/users/TylerJewell/received_events","type":"User","site_admin":false},"created_at":"2016-08-28T16:15:49Z","updated_at":"2016-08-28T16:15:49Z","body":"@skabashnyuk - I think we can close this issue, correct?  This was an investigation issue and we have already completed the implementation and merge."}}
{"actor":{"display_login":"TylerJewell"}}