{"action":"created","comment":{"url":"https://api.github.com/repos/ipfs/specs/pulls/comments/32289535","id":32289535,"diff_hunk":"@@ -0,0 +1,79 @@\n+# PDD for MultiStream (example/use case)\n+\n+## Protocol\n+\n+Defined here:\n+- https://github.com/ipfs/specs/blob/wire/protocol/network/wire.md#multistream---self-describing-protocol-stream\n+- https://github.com/ipfs/specs/blob/wire/protocol/network/wire.md#multistream-selector---self-describing-protocol-stream-selector\n+\n+## Protocol Compliance Tests Spec\n+\n+Given the protocol spec, an implementation of the multistream-select protocol has to comply with the following scenarios:\n+\n+#### 1 - push-stream\n+\n+In a push-stream example (one-way stream), we have two agents:\n+\n+- 'broadcast' - where messages are emited \n+- 'silent' - listener to the messages emited by the broadcast counterparty\n+\n+Compliance test 1 (human readable format):\n+```\n+# With a connection established between silent - broadcast\n+< /multistream/1.0.0       # multistream header\n+< /bird/3.2.1              # Protocol header\n+< hey, how is it going?    # First protocol message\n+```\n+\n+#### 2 - duplex-stream\n+\n+In a duplex-stream example (interactive conversation), we have two agents:\n+\n+- 'select' - waiting for connections, hosts several protocols from where a client can pick from\n+- 'interactive' - connects to a select agent and queries that agent for a specific protocol\n+\n+Compliance test 2 (human readable format):\n+```\n+# With a connection established between interactive - select\n+< /multistream/1.0.0\n+> /multistream/1.0.0\n+> ls\n+< [\"/dogs/0.1.0\",\"/cats/1.2.11\"]\n+> /mouse/1.1.0\n+< na\n+> /dogs/0.1.0\n+< /dogs/0.1.0\n+> hey\n+```","path":"pdd/PDD-multistream.md","position":47,"original_position":47,"commit_id":"5404c810a0a0ce2fd96bd322d8c46a53ddb2eb10","original_commit_id":"5404c810a0a0ce2fd96bd322d8c46a53ddb2eb10","user":{"login":"wking","id":209920,"avatar_url":"https://avatars.githubusercontent.com/u/209920?v=3","gravatar_id":"","url":"https://api.github.com/users/wking","html_url":"https://github.com/wking","followers_url":"https://api.github.com/users/wking/followers","following_url":"https://api.github.com/users/wking/following{/other_user}","gists_url":"https://api.github.com/users/wking/gists{/gist_id}","starred_url":"https://api.github.com/users/wking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wking/subscriptions","organizations_url":"https://api.github.com/users/wking/orgs","repos_url":"https://api.github.com/users/wking/repos","events_url":"https://api.github.com/users/wking/events{/privacy}","received_events_url":"https://api.github.com/users/wking/received_events","type":"User","site_admin":false},"body":"On Thu, Jun 11, 2015 at 08:55:04PM -0700, Juan Batiz-Benet wrote:\n> ideally the test could try to fuzz all possible message orderings…\n\nHow do you know what the possible message orderings are without a\nprotocol spec to tell you?\n","created_at":"2015-06-12T04:24:42Z","updated_at":"2015-06-12T04:24:42Z","html_url":"https://github.com/ipfs/specs/pull/12#discussion_r32289535","pull_request_url":"https://api.github.com/repos/ipfs/specs/pulls/12","_links":{"self":{"href":"https://api.github.com/repos/ipfs/specs/pulls/comments/32289535"},"html":{"href":"https://github.com/ipfs/specs/pull/12#discussion_r32289535"},"pull_request":{"href":"https://api.github.com/repos/ipfs/specs/pulls/12"}}},"pull_request":{"url":"https://api.github.com/repos/ipfs/specs/pulls/12","id":37461076,"html_url":"https://github.com/ipfs/specs/pull/12","diff_url":"https://github.com/ipfs/specs/pull/12.diff","patch_url":"https://github.com/ipfs/specs/pull/12.patch","issue_url":"https://api.github.com/repos/ipfs/specs/issues/12","number":12,"state":"open","locked":false,"title":"Add pdd protocol and multistream example as .md files for easier review and upgrade collaboratively","user":{"login":"diasdavid","id":1211152,"avatar_url":"https://avatars.githubusercontent.com/u/1211152?v=3","gravatar_id":"","url":"https://api.github.com/users/diasdavid","html_url":"https://github.com/diasdavid","followers_url":"https://api.github.com/users/diasdavid/followers","following_url":"https://api.github.com/users/diasdavid/following{/other_user}","gists_url":"https://api.github.com/users/diasdavid/gists{/gist_id}","starred_url":"https://api.github.com/users/diasdavid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diasdavid/subscriptions","organizations_url":"https://api.github.com/users/diasdavid/orgs","repos_url":"https://api.github.com/users/diasdavid/repos","events_url":"https://api.github.com/users/diasdavid/events{/privacy}","received_events_url":"https://api.github.com/users/diasdavid/received_events","type":"User","site_admin":false},"body":"Continuation of the work started here:\r\n\r\nhttps://github.com/ipfs/specs/issues/11#issuecomment-110943607","created_at":"2015-06-11T13:07:55Z","updated_at":"2015-06-12T04:24:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3c44d886d5f5da8323536dc7f13f58a90700d314","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ipfs/specs/pulls/12/commits","review_comments_url":"https://api.github.com/repos/ipfs/specs/pulls/12/comments","review_comment_url":"https://api.github.com/repos/ipfs/specs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ipfs/specs/issues/12/comments","statuses_url":"https://api.github.com/repos/ipfs/specs/statuses/5404c810a0a0ce2fd96bd322d8c46a53ddb2eb10","head":{"label":"diasdavid:pdd-multistream","ref":"pdd-multistream","sha":"5404c810a0a0ce2fd96bd322d8c46a53ddb2eb10","user":{"login":"diasdavid","id":1211152,"avatar_url":"https://avatars.githubusercontent.com/u/1211152?v=3","gravatar_id":"","url":"https://api.github.com/users/diasdavid","html_url":"https://github.com/diasdavid","followers_url":"https://api.github.com/users/diasdavid/followers","following_url":"https://api.github.com/users/diasdavid/following{/other_user}","gists_url":"https://api.github.com/users/diasdavid/gists{/gist_id}","starred_url":"https://api.github.com/users/diasdavid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diasdavid/subscriptions","organizations_url":"https://api.github.com/users/diasdavid/orgs","repos_url":"https://api.github.com/users/diasdavid/repos","events_url":"https://api.github.com/users/diasdavid/events{/privacy}","received_events_url":"https://api.github.com/users/diasdavid/received_events","type":"User","site_admin":false},"repo":{"id":37261539,"name":"specs","full_name":"diasdavid/specs","owner":{"login":"diasdavid","id":1211152,"avatar_url":"https://avatars.githubusercontent.com/u/1211152?v=3","gravatar_id":"","url":"https://api.github.com/users/diasdavid","html_url":"https://github.com/diasdavid","followers_url":"https://api.github.com/users/diasdavid/followers","following_url":"https://api.github.com/users/diasdavid/following{/other_user}","gists_url":"https://api.github.com/users/diasdavid/gists{/gist_id}","starred_url":"https://api.github.com/users/diasdavid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diasdavid/subscriptions","organizations_url":"https://api.github.com/users/diasdavid/orgs","repos_url":"https://api.github.com/users/diasdavid/repos","events_url":"https://api.github.com/users/diasdavid/events{/privacy}","received_events_url":"https://api.github.com/users/diasdavid/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/diasdavid/specs","description":"Specs for IPFS","fork":true,"url":"https://api.github.com/repos/diasdavid/specs","forks_url":"https://api.github.com/repos/diasdavid/specs/forks","keys_url":"https://api.github.com/repos/diasdavid/specs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/diasdavid/specs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/diasdavid/specs/teams","hooks_url":"https://api.github.com/repos/diasdavid/specs/hooks","issue_events_url":"https://api.github.com/repos/diasdavid/specs/issues/events{/number}","events_url":"https://api.github.com/repos/diasdavid/specs/events","assignees_url":"https://api.github.com/repos/diasdavid/specs/assignees{/user}","branches_url":"https://api.github.com/repos/diasdavid/specs/branches{/branch}","tags_url":"https://api.github.com/repos/diasdavid/specs/tags","blobs_url":"https://api.github.com/repos/diasdavid/specs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/diasdavid/specs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/diasdavid/specs/git/refs{/sha}","trees_url":"https://api.github.com/repos/diasdavid/specs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/diasdavid/specs/statuses/{sha}","languages_url":"https://api.github.com/repos/diasdavid/specs/languages","stargazers_url":"https://api.github.com/repos/diasdavid/specs/stargazers","contributors_url":"https://api.github.com/repos/diasdavid/specs/contributors","subscribers_url":"https://api.github.com/repos/diasdavid/specs/subscribers","subscription_url":"https://api.github.com/repos/diasdavid/specs/subscription","commits_url":"https://api.github.com/repos/diasdavid/specs/commits{/sha}","git_commits_url":"https://api.github.com/repos/diasdavid/specs/git/commits{/sha}","comments_url":"https://api.github.com/repos/diasdavid/specs/comments{/number}","issue_comment_url":"https://api.github.com/repos/diasdavid/specs/issues/comments{/number}","contents_url":"https://api.github.com/repos/diasdavid/specs/contents/{+path}","compare_url":"https://api.github.com/repos/diasdavid/specs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/diasdavid/specs/merges","archive_url":"https://api.github.com/repos/diasdavid/specs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/diasdavid/specs/downloads","issues_url":"https://api.github.com/repos/diasdavid/specs/issues{/number}","pulls_url":"https://api.github.com/repos/diasdavid/specs/pulls{/number}","milestones_url":"https://api.github.com/repos/diasdavid/specs/milestones{/number}","notifications_url":"https://api.github.com/repos/diasdavid/specs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/diasdavid/specs/labels{/name}","releases_url":"https://api.github.com/repos/diasdavid/specs/releases{/id}","created_at":"2015-06-11T13:06:57Z","updated_at":"2015-06-09T01:48:33Z","pushed_at":"2015-06-11T13:07:26Z","git_url":"git://github.com/diasdavid/specs.git","ssh_url":"git@github.com:diasdavid/specs.git","clone_url":"https://github.com/diasdavid/specs.git","svn_url":"https://github.com/diasdavid/specs","homepage":"http://ipfs.io","size":9321,"stargazers_count":0,"watchers_count":0,"language":null,"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":"ipfs:master","ref":"master","sha":"b7d3ead1d80086940409206f5bd1a7a858ab6c95","user":{"login":"ipfs","id":10536621,"avatar_url":"https://avatars.githubusercontent.com/u/10536621?v=3","gravatar_id":"","url":"https://api.github.com/users/ipfs","html_url":"https://github.com/ipfs","followers_url":"https://api.github.com/users/ipfs/followers","following_url":"https://api.github.com/users/ipfs/following{/other_user}","gists_url":"https://api.github.com/users/ipfs/gists{/gist_id}","starred_url":"https://api.github.com/users/ipfs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ipfs/subscriptions","organizations_url":"https://api.github.com/users/ipfs/orgs","repos_url":"https://api.github.com/users/ipfs/repos","events_url":"https://api.github.com/users/ipfs/events{/privacy}","received_events_url":"https://api.github.com/users/ipfs/received_events","type":"Organization","site_admin":false},"repo":{"id":32023078,"name":"specs","full_name":"ipfs/specs","owner":{"login":"ipfs","id":10536621,"avatar_url":"https://avatars.githubusercontent.com/u/10536621?v=3","gravatar_id":"","url":"https://api.github.com/users/ipfs","html_url":"https://github.com/ipfs","followers_url":"https://api.github.com/users/ipfs/followers","following_url":"https://api.github.com/users/ipfs/following{/other_user}","gists_url":"https://api.github.com/users/ipfs/gists{/gist_id}","starred_url":"https://api.github.com/users/ipfs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ipfs/subscriptions","organizations_url":"https://api.github.com/users/ipfs/orgs","repos_url":"https://api.github.com/users/ipfs/repos","events_url":"https://api.github.com/users/ipfs/events{/privacy}","received_events_url":"https://api.github.com/users/ipfs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ipfs/specs","description":"Specs for IPFS","fork":false,"url":"https://api.github.com/repos/ipfs/specs","forks_url":"https://api.github.com/repos/ipfs/specs/forks","keys_url":"https://api.github.com/repos/ipfs/specs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ipfs/specs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ipfs/specs/teams","hooks_url":"https://api.github.com/repos/ipfs/specs/hooks","issue_events_url":"https://api.github.com/repos/ipfs/specs/issues/events{/number}","events_url":"https://api.github.com/repos/ipfs/specs/events","assignees_url":"https://api.github.com/repos/ipfs/specs/assignees{/user}","branches_url":"https://api.github.com/repos/ipfs/specs/branches{/branch}","tags_url":"https://api.github.com/repos/ipfs/specs/tags","blobs_url":"https://api.github.com/repos/ipfs/specs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ipfs/specs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ipfs/specs/git/refs{/sha}","trees_url":"https://api.github.com/repos/ipfs/specs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ipfs/specs/statuses/{sha}","languages_url":"https://api.github.com/repos/ipfs/specs/languages","stargazers_url":"https://api.github.com/repos/ipfs/specs/stargazers","contributors_url":"https://api.github.com/repos/ipfs/specs/contributors","subscribers_url":"https://api.github.com/repos/ipfs/specs/subscribers","subscription_url":"https://api.github.com/repos/ipfs/specs/subscription","commits_url":"https://api.github.com/repos/ipfs/specs/commits{/sha}","git_commits_url":"https://api.github.com/repos/ipfs/specs/git/commits{/sha}","comments_url":"https://api.github.com/repos/ipfs/specs/comments{/number}","issue_comment_url":"https://api.github.com/repos/ipfs/specs/issues/comments{/number}","contents_url":"https://api.github.com/repos/ipfs/specs/contents/{+path}","compare_url":"https://api.github.com/repos/ipfs/specs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ipfs/specs/merges","archive_url":"https://api.github.com/repos/ipfs/specs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ipfs/specs/downloads","issues_url":"https://api.github.com/repos/ipfs/specs/issues{/number}","pulls_url":"https://api.github.com/repos/ipfs/specs/pulls{/number}","milestones_url":"https://api.github.com/repos/ipfs/specs/milestones{/number}","notifications_url":"https://api.github.com/repos/ipfs/specs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ipfs/specs/labels{/name}","releases_url":"https://api.github.com/repos/ipfs/specs/releases{/id}","created_at":"2015-03-11T14:47:16Z","updated_at":"2015-06-09T01:48:33Z","pushed_at":"2015-06-11T13:07:55Z","git_url":"git://github.com/ipfs/specs.git","ssh_url":"git@github.com:ipfs/specs.git","clone_url":"https://github.com/ipfs/specs.git","svn_url":"https://github.com/ipfs/specs","homepage":"http://ipfs.io","size":9321,"stargazers_count":58,"watchers_count":58,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":9,"forks":5,"open_issues":9,"watchers":58,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ipfs/specs/pulls/12"},"html":{"href":"https://github.com/ipfs/specs/pull/12"},"issue":{"href":"https://api.github.com/repos/ipfs/specs/issues/12"},"comments":{"href":"https://api.github.com/repos/ipfs/specs/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/ipfs/specs/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/ipfs/specs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ipfs/specs/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/ipfs/specs/statuses/5404c810a0a0ce2fd96bd322d8c46a53ddb2eb10"}}}}