{"action":"created","issue":{"url":"https://api.github.com/repos/saros-project/saros/issues/355","repository_url":"https://api.github.com/repos/saros-project/saros","labels_url":"https://api.github.com/repos/saros-project/saros/issues/355/labels{/name}","comments_url":"https://api.github.com/repos/saros-project/saros/issues/355/comments","events_url":"https://api.github.com/repos/saros-project/saros/issues/355/events","html_url":"https://github.com/saros-project/saros/pull/355","id":391078244,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM4Njk1NDk5","number":355,"title":"[FEATURE] Non-host project sharing","user":{"login":"Drakulix","id":4404502,"node_id":"MDQ6VXNlcjQ0MDQ1MDI=","avatar_url":"https://avatars2.githubusercontent.com/u/4404502?v=4","gravatar_id":"","url":"https://api.github.com/users/Drakulix","html_url":"https://github.com/Drakulix","followers_url":"https://api.github.com/users/Drakulix/followers","following_url":"https://api.github.com/users/Drakulix/following{/other_user}","gists_url":"https://api.github.com/users/Drakulix/gists{/gist_id}","starred_url":"https://api.github.com/users/Drakulix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Drakulix/subscriptions","organizations_url":"https://api.github.com/users/Drakulix/orgs","repos_url":"https://api.github.com/users/Drakulix/repos","events_url":"https://api.github.com/users/Drakulix/events{/privacy}","received_events_url":"https://api.github.com/users/Drakulix/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-12-14T11:43:15Z","updated_at":"2018-12-19T13:43:10Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/saros-project/saros/pulls/355","html_url":"https://github.com/saros-project/saros/pull/355","diff_url":"https://github.com/saros-project/saros/pull/355.diff","patch_url":"https://github.com/saros-project/saros/pull/355.patch"},"body":"Continuation of @denisw patchset [gerrit#2264](https://saros-build.imp.fu-berlin.de/gerrit/#/c/2264/9)\r\n\r\nThis patch allows users other than hosts to add projects to the session.\r\n\r\nThis works by first sharing the projects with the host, who then shares the project with all other users in the session. Normal project negotiations are used for both sharing steps. The host is free to reject non-host projects, and thus still in complete control over which projects are part of the session.\r\n\r\nBecause non-hosts don't consider projects they want to share as part of the session until the host accepts them, `AbstractOutgoingProjectNegotiation` (and all derived `ProjectNegotiation`)s cannot rely on `SarosSession` to find out which resources to share.\r\n\r\nFor this reason, a `ProjectSharingData` class encapsulating this information is introduced and passed to the `OutgoingProjectNegotiation`s constructors.\r\n\r\nNote that the ID of a project is always chosen by the project negotiation's initiator, even if that is not the host. While that doesn't increase the probability of ID collisions per se, it allows a malicious non-host to choose a conflicting ID *deliberaitely*. Given that the Saros protocol seems to assume a relatively high amount of trust between the participants, though, this may not be such a big problem.\r\n\r\nFirst tests work even in complex scenarios (3+ users). No modification during transmission of either the client->host or the host->other clients by the host or the first sender was not correctly queued and transmitted to all participants afterwards. No inconsistencies have yet been found.\r\n\r\nThis was not tested with the new and experimental `InstantOutgoingProjectNegotiation`, although steps were taken to support that as well.\r\n\r\n@stefaus I have [moved](https://github.com/saros-project/saros/pull/355/files#diff-ba48fd2931f14e2e2d97b270df6eac2eR139) the queuing code out of the `Archive`- and `InstantIncomingProjectNegotiation` as they were identical and I had to add a `isHost` check there.\r\nThis will probably conflict with your PRs #156 (and likely other related ones).\r\n\r\nThis also conflicts with @srossbach's #341, replacing the `SessionManager` queuing infrastructure.\r\n\r\nThis patch also deliberately ignores @stefaus new `ProjectNegotiationCollector` introduced with #272 and instead directly runs the follow-up `ProjectNegotiation`s for the other clients in the [`negotiationTerminated` handler](https://github.com/saros-project/saros/pull/355/files#diff-1fd39cf856f7eb86e245d7507b4f2792R138) of the first (client->host) negotiation.\r\n\r\nBy doing so the multiple project negotiations of this process cannot be interrupted by other project negotiations, which should not be a problem code-wise, but is not desirable from the a user-experience point of view. The user should perceive the whole process as one giant negotiation.\r\n\r\nThe second commit allows the Eclipse UI to share projects with the host.\r\n@tobous Are similar changes necessary for the IntelliJ UI? Can you give me some hints, what I would need to look for?\r\n\r\n~~**Note**: For everyone wanting to test this, you also need #354 as project sharing is currently broken in the master.~~ merged."},"comment":{"url":"https://api.github.com/repos/saros-project/saros/issues/comments/448600849","html_url":"https://github.com/saros-project/saros/pull/355#issuecomment-448600849","issue_url":"https://api.github.com/repos/saros-project/saros/issues/355","id":448600849,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0ODYwMDg0OQ==","user":{"login":"Drakulix","id":4404502,"node_id":"MDQ6VXNlcjQ0MDQ1MDI=","avatar_url":"https://avatars2.githubusercontent.com/u/4404502?v=4","gravatar_id":"","url":"https://api.github.com/users/Drakulix","html_url":"https://github.com/Drakulix","followers_url":"https://api.github.com/users/Drakulix/followers","following_url":"https://api.github.com/users/Drakulix/following{/other_user}","gists_url":"https://api.github.com/users/Drakulix/gists{/gist_id}","starred_url":"https://api.github.com/users/Drakulix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Drakulix/subscriptions","organizations_url":"https://api.github.com/users/Drakulix/orgs","repos_url":"https://api.github.com/users/Drakulix/repos","events_url":"https://api.github.com/users/Drakulix/events{/privacy}","received_events_url":"https://api.github.com/users/Drakulix/received_events","type":"User","site_admin":false},"created_at":"2018-12-19T13:43:10Z","updated_at":"2018-12-19T13:43:10Z","author_association":"CONTRIBUTOR","body":"Rebased and added STF test"}}
{"actor":{"display_login":"Drakulix"}}