{"action":"created","comment":{"url":"https://api.github.com/repos/Particular/docs.particular.net/pulls/comments/35054569","id":35054569,"diff_hunk":"@@ -110,4 +110,14 @@ Sagas often play the role of coordinator, especially when used in integration sc\n \n A typical scenario is a saga controlling the process of billing a customer through Visa or MasterCard. In this case you probably have separate endpoints for making the web service/rest-calls to each payment provider and a saga coordinating retries and fallback rules. Each payment request would be a separate saga instance, so how would we know which instance to hydrate and invoke when the response returns?\n \n-The usual way is to correlate on some kind of ID and let the user tell you how to find the correct saga instance using that ID. While this is easily done we decided that this was common enough to warrant native support in NServiceBus for these type of interactions. In V3.0, NServiceBus handles all this for you without getting in your way. If you do `IBus.Reply` in response to a message coming from a saga, NServiceBus will detect it and automatically set the correct headers so that you can correlate the reply back to the saga instance that issued the request. The exception to this rule is the request/response message exchange between two sagas. In such case the automatic correlation won't work and the reply message needs to be explicitly mapped using `ConfigureHowToFindSaga`.\n\\ No newline at end of file\n+The usual way is to correlate on some kind of ID and let the user tell you how to find the correct saga instance using that ID. While this is easily done we decided that this was common enough to warrant native support in NServiceBus for these type of interactions. In V3.0, NServiceBus handles all this for you without getting in your way. If you do `IBus.Reply` in response to a message coming from a saga, NServiceBus will detect it and automatically set the correct headers so that you can correlate the reply back to the saga instance that issued the request. The exception to this rule is the request/response message exchange between two sagas. In such case the automatic correlation won't work and the reply message needs to be explicitly mapped using `ConfigureHowToFindSaga`.\n+\n+## Querying Saga Data\n+Sagas manage state of potentially long-running business processes. When we are building User interfaces that represent those business processes we suddenly feel the urge to query the saga data directly. It can be done, but we recommend to avoid it. It has the following implications:\n+\n+* The way a given persistence chooses to store the saga data is an implementation detail to the specific persistence that can potentially change over time. By directly querying for the saga data you are coupling that query to this implementation and risk being affected by format changes.\n+* By exposing the data outside of the safeguards of the business logic in the saga you risk the data is not treated as read-only. Eventually, a component tries to bypass the saga and directly modify the data. \n+* Querying the data might require additional indexes, resources etc. which need to be managed by the component issuing the query. It can influence saga performance and lead in high contention scenarios to more concurrency conflicts.","path":"nservicebus/sagas/index.md","position":13,"original_position":13,"commit_id":"22b675598139cc3402e4b43115ed18fb715c440c","original_commit_id":"22b675598139cc3402e4b43115ed18fb715c440c","user":{"login":"SimonCropp","id":122666,"avatar_url":"https://avatars.githubusercontent.com/u/122666?v=3","gravatar_id":"","url":"https://api.github.com/users/SimonCropp","html_url":"https://github.com/SimonCropp","followers_url":"https://api.github.com/users/SimonCropp/followers","following_url":"https://api.github.com/users/SimonCropp/following{/other_user}","gists_url":"https://api.github.com/users/SimonCropp/gists{/gist_id}","starred_url":"https://api.github.com/users/SimonCropp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimonCropp/subscriptions","organizations_url":"https://api.github.com/users/SimonCropp/orgs","repos_url":"https://api.github.com/users/SimonCropp/repos","events_url":"https://api.github.com/users/SimonCropp/events{/privacy}","received_events_url":"https://api.github.com/users/SimonCropp/received_events","type":"User","site_admin":false},"body":"> to more concurrency conflicts\r\n\r\nisnt that redundant?","created_at":"2015-07-20T23:04:46Z","updated_at":"2015-07-20T23:04:46Z","html_url":"https://github.com/Particular/docs.particular.net/pull/709#discussion_r35054569","pull_request_url":"https://api.github.com/repos/Particular/docs.particular.net/pulls/709","_links":{"self":{"href":"https://api.github.com/repos/Particular/docs.particular.net/pulls/comments/35054569"},"html":{"href":"https://github.com/Particular/docs.particular.net/pull/709#discussion_r35054569"},"pull_request":{"href":"https://api.github.com/repos/Particular/docs.particular.net/pulls/709"}}},"pull_request":{"url":"https://api.github.com/repos/Particular/docs.particular.net/pulls/709","id":40363515,"html_url":"https://github.com/Particular/docs.particular.net/pull/709","diff_url":"https://github.com/Particular/docs.particular.net/pull/709.diff","patch_url":"https://github.com/Particular/docs.particular.net/pull/709.patch","issue_url":"https://api.github.com/repos/Particular/docs.particular.net/issues/709","number":709,"state":"open","locked":false,"title":"Querying saga data","user":{"login":"danielmarbach","id":174258,"avatar_url":"https://avatars.githubusercontent.com/u/174258?v=3","gravatar_id":"","url":"https://api.github.com/users/danielmarbach","html_url":"https://github.com/danielmarbach","followers_url":"https://api.github.com/users/danielmarbach/followers","following_url":"https://api.github.com/users/danielmarbach/following{/other_user}","gists_url":"https://api.github.com/users/danielmarbach/gists{/gist_id}","starred_url":"https://api.github.com/users/danielmarbach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielmarbach/subscriptions","organizations_url":"https://api.github.com/users/danielmarbach/orgs","repos_url":"https://api.github.com/users/danielmarbach/repos","events_url":"https://api.github.com/users/danielmarbach/events{/privacy}","received_events_url":"https://api.github.com/users/danielmarbach/received_events","type":"User","site_admin":false},"body":"I just got this question from a customer case. This has been asked before. I tried to summarize my own thoughts and those from @kijanawoodard, @jbogard and @mauroservienti in this thread here https://groups.google.com/forum/#!topic/particularsoftware/gS8WSpJsVjo\r\n\r\nFeel free to tear it apart @Particular/documentation ","created_at":"2015-07-20T15:22:24Z","updated_at":"2015-07-20T23:04:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d26ae694d705f272bedef696f743c29554369a71","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Particular/docs.particular.net/pulls/709/commits","review_comments_url":"https://api.github.com/repos/Particular/docs.particular.net/pulls/709/comments","review_comment_url":"https://api.github.com/repos/Particular/docs.particular.net/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Particular/docs.particular.net/issues/709/comments","statuses_url":"https://api.github.com/repos/Particular/docs.particular.net/statuses/22b675598139cc3402e4b43115ed18fb715c440c","head":{"label":"Particular:QueryingSagas","ref":"QueryingSagas","sha":"22b675598139cc3402e4b43115ed18fb715c440c","user":{"login":"Particular","id":5038441,"avatar_url":"https://avatars.githubusercontent.com/u/5038441?v=3","gravatar_id":"","url":"https://api.github.com/users/Particular","html_url":"https://github.com/Particular","followers_url":"https://api.github.com/users/Particular/followers","following_url":"https://api.github.com/users/Particular/following{/other_user}","gists_url":"https://api.github.com/users/Particular/gists{/gist_id}","starred_url":"https://api.github.com/users/Particular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Particular/subscriptions","organizations_url":"https://api.github.com/users/Particular/orgs","repos_url":"https://api.github.com/users/Particular/repos","events_url":"https://api.github.com/users/Particular/events{/privacy}","received_events_url":"https://api.github.com/users/Particular/received_events","type":"Organization","site_admin":false},"repo":{"id":11727301,"name":"docs.particular.net","full_name":"Particular/docs.particular.net","owner":{"login":"Particular","id":5038441,"avatar_url":"https://avatars.githubusercontent.com/u/5038441?v=3","gravatar_id":"","url":"https://api.github.com/users/Particular","html_url":"https://github.com/Particular","followers_url":"https://api.github.com/users/Particular/followers","following_url":"https://api.github.com/users/Particular/following{/other_user}","gists_url":"https://api.github.com/users/Particular/gists{/gist_id}","starred_url":"https://api.github.com/users/Particular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Particular/subscriptions","organizations_url":"https://api.github.com/users/Particular/orgs","repos_url":"https://api.github.com/users/Particular/repos","events_url":"https://api.github.com/users/Particular/events{/privacy}","received_events_url":"https://api.github.com/users/Particular/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Particular/docs.particular.net","description":"Contains all the content for the Particular documentation site","fork":false,"url":"https://api.github.com/repos/Particular/docs.particular.net","forks_url":"https://api.github.com/repos/Particular/docs.particular.net/forks","keys_url":"https://api.github.com/repos/Particular/docs.particular.net/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Particular/docs.particular.net/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Particular/docs.particular.net/teams","hooks_url":"https://api.github.com/repos/Particular/docs.particular.net/hooks","issue_events_url":"https://api.github.com/repos/Particular/docs.particular.net/issues/events{/number}","events_url":"https://api.github.com/repos/Particular/docs.particular.net/events","assignees_url":"https://api.github.com/repos/Particular/docs.particular.net/assignees{/user}","branches_url":"https://api.github.com/repos/Particular/docs.particular.net/branches{/branch}","tags_url":"https://api.github.com/repos/Particular/docs.particular.net/tags","blobs_url":"https://api.github.com/repos/Particular/docs.particular.net/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Particular/docs.particular.net/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Particular/docs.particular.net/git/refs{/sha}","trees_url":"https://api.github.com/repos/Particular/docs.particular.net/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Particular/docs.particular.net/statuses/{sha}","languages_url":"https://api.github.com/repos/Particular/docs.particular.net/languages","stargazers_url":"https://api.github.com/repos/Particular/docs.particular.net/stargazers","contributors_url":"https://api.github.com/repos/Particular/docs.particular.net/contributors","subscribers_url":"https://api.github.com/repos/Particular/docs.particular.net/subscribers","subscription_url":"https://api.github.com/repos/Particular/docs.particular.net/subscription","commits_url":"https://api.github.com/repos/Particular/docs.particular.net/commits{/sha}","git_commits_url":"https://api.github.com/repos/Particular/docs.particular.net/git/commits{/sha}","comments_url":"https://api.github.com/repos/Particular/docs.particular.net/comments{/number}","issue_comment_url":"https://api.github.com/repos/Particular/docs.particular.net/issues/comments{/number}","contents_url":"https://api.github.com/repos/Particular/docs.particular.net/contents/{+path}","compare_url":"https://api.github.com/repos/Particular/docs.particular.net/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Particular/docs.particular.net/merges","archive_url":"https://api.github.com/repos/Particular/docs.particular.net/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Particular/docs.particular.net/downloads","issues_url":"https://api.github.com/repos/Particular/docs.particular.net/issues{/number}","pulls_url":"https://api.github.com/repos/Particular/docs.particular.net/pulls{/number}","milestones_url":"https://api.github.com/repos/Particular/docs.particular.net/milestones{/number}","notifications_url":"https://api.github.com/repos/Particular/docs.particular.net/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Particular/docs.particular.net/labels{/name}","releases_url":"https://api.github.com/repos/Particular/docs.particular.net/releases{/id}","created_at":"2013-07-28T23:18:15Z","updated_at":"2015-07-20T15:35:33Z","pushed_at":"2015-07-20T15:35:49Z","git_url":"git://github.com/Particular/docs.particular.net.git","ssh_url":"git@github.com:Particular/docs.particular.net.git","clone_url":"https://github.com/Particular/docs.particular.net.git","svn_url":"https://github.com/Particular/docs.particular.net","homepage":"http://docs.particular.net","size":31568,"stargazers_count":13,"watchers_count":13,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":69,"mirror_url":null,"open_issues_count":64,"forks":69,"open_issues":64,"watchers":13,"default_branch":"master"}},"base":{"label":"Particular:master","ref":"master","sha":"04ad4377ad91331068fc56efca3e71f62dfe3277","user":{"login":"Particular","id":5038441,"avatar_url":"https://avatars.githubusercontent.com/u/5038441?v=3","gravatar_id":"","url":"https://api.github.com/users/Particular","html_url":"https://github.com/Particular","followers_url":"https://api.github.com/users/Particular/followers","following_url":"https://api.github.com/users/Particular/following{/other_user}","gists_url":"https://api.github.com/users/Particular/gists{/gist_id}","starred_url":"https://api.github.com/users/Particular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Particular/subscriptions","organizations_url":"https://api.github.com/users/Particular/orgs","repos_url":"https://api.github.com/users/Particular/repos","events_url":"https://api.github.com/users/Particular/events{/privacy}","received_events_url":"https://api.github.com/users/Particular/received_events","type":"Organization","site_admin":false},"repo":{"id":11727301,"name":"docs.particular.net","full_name":"Particular/docs.particular.net","owner":{"login":"Particular","id":5038441,"avatar_url":"https://avatars.githubusercontent.com/u/5038441?v=3","gravatar_id":"","url":"https://api.github.com/users/Particular","html_url":"https://github.com/Particular","followers_url":"https://api.github.com/users/Particular/followers","following_url":"https://api.github.com/users/Particular/following{/other_user}","gists_url":"https://api.github.com/users/Particular/gists{/gist_id}","starred_url":"https://api.github.com/users/Particular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Particular/subscriptions","organizations_url":"https://api.github.com/users/Particular/orgs","repos_url":"https://api.github.com/users/Particular/repos","events_url":"https://api.github.com/users/Particular/events{/privacy}","received_events_url":"https://api.github.com/users/Particular/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Particular/docs.particular.net","description":"Contains all the content for the Particular documentation site","fork":false,"url":"https://api.github.com/repos/Particular/docs.particular.net","forks_url":"https://api.github.com/repos/Particular/docs.particular.net/forks","keys_url":"https://api.github.com/repos/Particular/docs.particular.net/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Particular/docs.particular.net/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Particular/docs.particular.net/teams","hooks_url":"https://api.github.com/repos/Particular/docs.particular.net/hooks","issue_events_url":"https://api.github.com/repos/Particular/docs.particular.net/issues/events{/number}","events_url":"https://api.github.com/repos/Particular/docs.particular.net/events","assignees_url":"https://api.github.com/repos/Particular/docs.particular.net/assignees{/user}","branches_url":"https://api.github.com/repos/Particular/docs.particular.net/branches{/branch}","tags_url":"https://api.github.com/repos/Particular/docs.particular.net/tags","blobs_url":"https://api.github.com/repos/Particular/docs.particular.net/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Particular/docs.particular.net/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Particular/docs.particular.net/git/refs{/sha}","trees_url":"https://api.github.com/repos/Particular/docs.particular.net/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Particular/docs.particular.net/statuses/{sha}","languages_url":"https://api.github.com/repos/Particular/docs.particular.net/languages","stargazers_url":"https://api.github.com/repos/Particular/docs.particular.net/stargazers","contributors_url":"https://api.github.com/repos/Particular/docs.particular.net/contributors","subscribers_url":"https://api.github.com/repos/Particular/docs.particular.net/subscribers","subscription_url":"https://api.github.com/repos/Particular/docs.particular.net/subscription","commits_url":"https://api.github.com/repos/Particular/docs.particular.net/commits{/sha}","git_commits_url":"https://api.github.com/repos/Particular/docs.particular.net/git/commits{/sha}","comments_url":"https://api.github.com/repos/Particular/docs.particular.net/comments{/number}","issue_comment_url":"https://api.github.com/repos/Particular/docs.particular.net/issues/comments{/number}","contents_url":"https://api.github.com/repos/Particular/docs.particular.net/contents/{+path}","compare_url":"https://api.github.com/repos/Particular/docs.particular.net/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Particular/docs.particular.net/merges","archive_url":"https://api.github.com/repos/Particular/docs.particular.net/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Particular/docs.particular.net/downloads","issues_url":"https://api.github.com/repos/Particular/docs.particular.net/issues{/number}","pulls_url":"https://api.github.com/repos/Particular/docs.particular.net/pulls{/number}","milestones_url":"https://api.github.com/repos/Particular/docs.particular.net/milestones{/number}","notifications_url":"https://api.github.com/repos/Particular/docs.particular.net/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Particular/docs.particular.net/labels{/name}","releases_url":"https://api.github.com/repos/Particular/docs.particular.net/releases{/id}","created_at":"2013-07-28T23:18:15Z","updated_at":"2015-07-20T15:35:33Z","pushed_at":"2015-07-20T15:35:49Z","git_url":"git://github.com/Particular/docs.particular.net.git","ssh_url":"git@github.com:Particular/docs.particular.net.git","clone_url":"https://github.com/Particular/docs.particular.net.git","svn_url":"https://github.com/Particular/docs.particular.net","homepage":"http://docs.particular.net","size":31568,"stargazers_count":13,"watchers_count":13,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":69,"mirror_url":null,"open_issues_count":64,"forks":69,"open_issues":64,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Particular/docs.particular.net/pulls/709"},"html":{"href":"https://github.com/Particular/docs.particular.net/pull/709"},"issue":{"href":"https://api.github.com/repos/Particular/docs.particular.net/issues/709"},"comments":{"href":"https://api.github.com/repos/Particular/docs.particular.net/issues/709/comments"},"review_comments":{"href":"https://api.github.com/repos/Particular/docs.particular.net/pulls/709/comments"},"review_comment":{"href":"https://api.github.com/repos/Particular/docs.particular.net/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Particular/docs.particular.net/pulls/709/commits"},"statuses":{"href":"https://api.github.com/repos/Particular/docs.particular.net/statuses/22b675598139cc3402e4b43115ed18fb715c440c"}}}}