{"action":"opened","number":98,"pull_request":{"url":"https://api.github.com/repos/mesosphere/serenity/pulls/98","id":47243901,"html_url":"https://github.com/mesosphere/serenity/pull/98","diff_url":"https://github.com/mesosphere/serenity/pull/98.diff","patch_url":"https://github.com/mesosphere/serenity/pull/98.patch","issue_url":"https://api.github.com/repos/mesosphere/serenity/issues/98","number":98,"state":"open","locked":false,"title":"Added Event Bus for pipeline interconnection messages and integrated it with ValveFilter","user":{"login":"Bplotka","id":6950331,"avatar_url":"https://avatars.githubusercontent.com/u/6950331?v=3","gravatar_id":"","url":"https://api.github.com/users/Bplotka","html_url":"https://github.com/Bplotka","followers_url":"https://api.github.com/users/Bplotka/followers","following_url":"https://api.github.com/users/Bplotka/following{/other_user}","gists_url":"https://api.github.com/users/Bplotka/gists{/gist_id}","starred_url":"https://api.github.com/users/Bplotka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bplotka/subscriptions","organizations_url":"https://api.github.com/users/Bplotka/orgs","repos_url":"https://api.github.com/users/Bplotka/repos","events_url":"https://api.github.com/users/Bplotka/events{/privacy}","received_events_url":"https://api.github.com/users/Bplotka/received_events","type":"User","site_admin":false},"body":"Notes about the bus (from [doc](https://docs.google.com/document/d/10Y0_0BQ-dlPqX7hFLJVXjUh7Gz1zTG6dUiJdcFh27SE/edit#))\r\n- There is only one EventBus (as singleton) in serenity.so\r\n- EventBus and subscriber is a separate libprocess actor (currently ProtobufProcess)\r\n- API inpired by: http://doc.akka.io/docs/akka/snapshot/scala/event-bus.html\r\n- Extremely easy to configure connection between components. Flow:\r\n1. Define message in proto including Envelope. (libprocess limit)\r\n```\r\nmessage SomeEventEnvelope {\r\n    message SomeEvent {\r\n        optional bool first_event_param = 1;\r\n        optional bool second_event_param = 2;\r\n        (...)\r\n     }\r\n     optional SomeEvent message = 1;\r\n }\r\n```\r\n2. Create subscriber. Derive from ProtobufProcess.\r\n3. Install endpoint and handler for SomeEventEnvelope  in Subscriber.\r\n4. Register subscriber: EventBus::subscribe<SomeEventEnvelope>(subscriberPID)\r\n5. When event is ready just do EventBus::publish<SomeEventEnvelope>(msg) \r\n  - Publisher does not need to be an libprocess actor!\r\n\r\nBased on Szymon's bus: https://github.com/mesosphere/serenity/pull/91\r\n\r\nThis PR includes integration with ValveFilter.\r\n","created_at":"2015-10-09T08:03:26Z","updated_at":"2015-10-09T08:03:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mesosphere/serenity/pulls/98/commits","review_comments_url":"https://api.github.com/repos/mesosphere/serenity/pulls/98/comments","review_comment_url":"https://api.github.com/repos/mesosphere/serenity/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mesosphere/serenity/issues/98/comments","statuses_url":"https://api.github.com/repos/mesosphere/serenity/statuses/1546bf3b16164481529dac3aa23aad02920ff7c3","head":{"label":"Bplotka:event_bus_v2","ref":"event_bus_v2","sha":"1546bf3b16164481529dac3aa23aad02920ff7c3","user":{"login":"Bplotka","id":6950331,"avatar_url":"https://avatars.githubusercontent.com/u/6950331?v=3","gravatar_id":"","url":"https://api.github.com/users/Bplotka","html_url":"https://github.com/Bplotka","followers_url":"https://api.github.com/users/Bplotka/followers","following_url":"https://api.github.com/users/Bplotka/following{/other_user}","gists_url":"https://api.github.com/users/Bplotka/gists{/gist_id}","starred_url":"https://api.github.com/users/Bplotka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bplotka/subscriptions","organizations_url":"https://api.github.com/users/Bplotka/orgs","repos_url":"https://api.github.com/users/Bplotka/repos","events_url":"https://api.github.com/users/Bplotka/events{/privacy}","received_events_url":"https://api.github.com/users/Bplotka/received_events","type":"User","site_admin":false},"repo":{"id":37205434,"name":"serenity","full_name":"Bplotka/serenity","owner":{"login":"Bplotka","id":6950331,"avatar_url":"https://avatars.githubusercontent.com/u/6950331?v=3","gravatar_id":"","url":"https://api.github.com/users/Bplotka","html_url":"https://github.com/Bplotka","followers_url":"https://api.github.com/users/Bplotka/followers","following_url":"https://api.github.com/users/Bplotka/following{/other_user}","gists_url":"https://api.github.com/users/Bplotka/gists{/gist_id}","starred_url":"https://api.github.com/users/Bplotka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bplotka/subscriptions","organizations_url":"https://api.github.com/users/Bplotka/orgs","repos_url":"https://api.github.com/users/Bplotka/repos","events_url":"https://api.github.com/users/Bplotka/events{/privacy}","received_events_url":"https://api.github.com/users/Bplotka/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Bplotka/serenity","description":"Repo for Intel:Mesosphere Oversubscription Technologies","fork":true,"url":"https://api.github.com/repos/Bplotka/serenity","forks_url":"https://api.github.com/repos/Bplotka/serenity/forks","keys_url":"https://api.github.com/repos/Bplotka/serenity/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Bplotka/serenity/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Bplotka/serenity/teams","hooks_url":"https://api.github.com/repos/Bplotka/serenity/hooks","issue_events_url":"https://api.github.com/repos/Bplotka/serenity/issues/events{/number}","events_url":"https://api.github.com/repos/Bplotka/serenity/events","assignees_url":"https://api.github.com/repos/Bplotka/serenity/assignees{/user}","branches_url":"https://api.github.com/repos/Bplotka/serenity/branches{/branch}","tags_url":"https://api.github.com/repos/Bplotka/serenity/tags","blobs_url":"https://api.github.com/repos/Bplotka/serenity/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Bplotka/serenity/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Bplotka/serenity/git/refs{/sha}","trees_url":"https://api.github.com/repos/Bplotka/serenity/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Bplotka/serenity/statuses/{sha}","languages_url":"https://api.github.com/repos/Bplotka/serenity/languages","stargazers_url":"https://api.github.com/repos/Bplotka/serenity/stargazers","contributors_url":"https://api.github.com/repos/Bplotka/serenity/contributors","subscribers_url":"https://api.github.com/repos/Bplotka/serenity/subscribers","subscription_url":"https://api.github.com/repos/Bplotka/serenity/subscription","commits_url":"https://api.github.com/repos/Bplotka/serenity/commits{/sha}","git_commits_url":"https://api.github.com/repos/Bplotka/serenity/git/commits{/sha}","comments_url":"https://api.github.com/repos/Bplotka/serenity/comments{/number}","issue_comment_url":"https://api.github.com/repos/Bplotka/serenity/issues/comments{/number}","contents_url":"https://api.github.com/repos/Bplotka/serenity/contents/{+path}","compare_url":"https://api.github.com/repos/Bplotka/serenity/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Bplotka/serenity/merges","archive_url":"https://api.github.com/repos/Bplotka/serenity/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Bplotka/serenity/downloads","issues_url":"https://api.github.com/repos/Bplotka/serenity/issues{/number}","pulls_url":"https://api.github.com/repos/Bplotka/serenity/pulls{/number}","milestones_url":"https://api.github.com/repos/Bplotka/serenity/milestones{/number}","notifications_url":"https://api.github.com/repos/Bplotka/serenity/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Bplotka/serenity/labels{/name}","releases_url":"https://api.github.com/repos/Bplotka/serenity/releases{/id}","created_at":"2015-06-10T15:26:39Z","updated_at":"2015-06-10T15:26:39Z","pushed_at":"2015-10-09T08:01:10Z","git_url":"git://github.com/Bplotka/serenity.git","ssh_url":"git@github.com:Bplotka/serenity.git","clone_url":"https://github.com/Bplotka/serenity.git","svn_url":"https://github.com/Bplotka/serenity","homepage":null,"size":8361,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mesosphere:master","ref":"master","sha":"8b5e4ce1fb8cfe9cf75cc99f96a9468a3aa675cb","user":{"login":"mesosphere","id":3458585,"avatar_url":"https://avatars.githubusercontent.com/u/3458585?v=3","gravatar_id":"","url":"https://api.github.com/users/mesosphere","html_url":"https://github.com/mesosphere","followers_url":"https://api.github.com/users/mesosphere/followers","following_url":"https://api.github.com/users/mesosphere/following{/other_user}","gists_url":"https://api.github.com/users/mesosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/mesosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mesosphere/subscriptions","organizations_url":"https://api.github.com/users/mesosphere/orgs","repos_url":"https://api.github.com/users/mesosphere/repos","events_url":"https://api.github.com/users/mesosphere/events{/privacy}","received_events_url":"https://api.github.com/users/mesosphere/received_events","type":"Organization","site_admin":false},"repo":{"id":35688047,"name":"serenity","full_name":"mesosphere/serenity","owner":{"login":"mesosphere","id":3458585,"avatar_url":"https://avatars.githubusercontent.com/u/3458585?v=3","gravatar_id":"","url":"https://api.github.com/users/mesosphere","html_url":"https://github.com/mesosphere","followers_url":"https://api.github.com/users/mesosphere/followers","following_url":"https://api.github.com/users/mesosphere/following{/other_user}","gists_url":"https://api.github.com/users/mesosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/mesosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mesosphere/subscriptions","organizations_url":"https://api.github.com/users/mesosphere/orgs","repos_url":"https://api.github.com/users/mesosphere/repos","events_url":"https://api.github.com/users/mesosphere/events{/privacy}","received_events_url":"https://api.github.com/users/mesosphere/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mesosphere/serenity","description":"Intel:Mesosphere oversubscription technologies for Apache Mesos","fork":false,"url":"https://api.github.com/repos/mesosphere/serenity","forks_url":"https://api.github.com/repos/mesosphere/serenity/forks","keys_url":"https://api.github.com/repos/mesosphere/serenity/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mesosphere/serenity/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mesosphere/serenity/teams","hooks_url":"https://api.github.com/repos/mesosphere/serenity/hooks","issue_events_url":"https://api.github.com/repos/mesosphere/serenity/issues/events{/number}","events_url":"https://api.github.com/repos/mesosphere/serenity/events","assignees_url":"https://api.github.com/repos/mesosphere/serenity/assignees{/user}","branches_url":"https://api.github.com/repos/mesosphere/serenity/branches{/branch}","tags_url":"https://api.github.com/repos/mesosphere/serenity/tags","blobs_url":"https://api.github.com/repos/mesosphere/serenity/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mesosphere/serenity/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mesosphere/serenity/git/refs{/sha}","trees_url":"https://api.github.com/repos/mesosphere/serenity/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mesosphere/serenity/statuses/{sha}","languages_url":"https://api.github.com/repos/mesosphere/serenity/languages","stargazers_url":"https://api.github.com/repos/mesosphere/serenity/stargazers","contributors_url":"https://api.github.com/repos/mesosphere/serenity/contributors","subscribers_url":"https://api.github.com/repos/mesosphere/serenity/subscribers","subscription_url":"https://api.github.com/repos/mesosphere/serenity/subscription","commits_url":"https://api.github.com/repos/mesosphere/serenity/commits{/sha}","git_commits_url":"https://api.github.com/repos/mesosphere/serenity/git/commits{/sha}","comments_url":"https://api.github.com/repos/mesosphere/serenity/comments{/number}","issue_comment_url":"https://api.github.com/repos/mesosphere/serenity/issues/comments{/number}","contents_url":"https://api.github.com/repos/mesosphere/serenity/contents/{+path}","compare_url":"https://api.github.com/repos/mesosphere/serenity/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mesosphere/serenity/merges","archive_url":"https://api.github.com/repos/mesosphere/serenity/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mesosphere/serenity/downloads","issues_url":"https://api.github.com/repos/mesosphere/serenity/issues{/number}","pulls_url":"https://api.github.com/repos/mesosphere/serenity/pulls{/number}","milestones_url":"https://api.github.com/repos/mesosphere/serenity/milestones{/number}","notifications_url":"https://api.github.com/repos/mesosphere/serenity/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mesosphere/serenity/labels{/name}","releases_url":"https://api.github.com/repos/mesosphere/serenity/releases{/id}","created_at":"2015-05-15T17:46:54Z","updated_at":"2015-10-01T13:53:33Z","pushed_at":"2015-10-09T08:03:27Z","git_url":"git://github.com/mesosphere/serenity.git","ssh_url":"git@github.com:mesosphere/serenity.git","clone_url":"https://github.com/mesosphere/serenity.git","svn_url":"https://github.com/mesosphere/serenity","homepage":"","size":8860,"stargazers_count":26,"watchers_count":26,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":26,"forks":7,"open_issues":26,"watchers":26,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mesosphere/serenity/pulls/98"},"html":{"href":"https://github.com/mesosphere/serenity/pull/98"},"issue":{"href":"https://api.github.com/repos/mesosphere/serenity/issues/98"},"comments":{"href":"https://api.github.com/repos/mesosphere/serenity/issues/98/comments"},"review_comments":{"href":"https://api.github.com/repos/mesosphere/serenity/pulls/98/comments"},"review_comment":{"href":"https://api.github.com/repos/mesosphere/serenity/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mesosphere/serenity/pulls/98/commits"},"statuses":{"href":"https://api.github.com/repos/mesosphere/serenity/statuses/1546bf3b16164481529dac3aa23aad02920ff7c3"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":9,"additions":365,"deletions":5,"changed_files":9}}