{"action":"created","comment":{"url":"https://api.github.com/repos/rozza/mongo-scala-driver/pulls/comments/33717104","id":33717104,"diff_hunk":"@@ -0,0 +1,95 @@\n++++\n+date = \"2015-03-17T15:36:56Z\"\n+title = \"Quick Tour Primer\"\n+[menu.main]\n+  parent = \"Getting Started\"\n+  identifier = \"Primer\"\n+  weight = 20\n+  pre = \"<i class='fa'></i>\"\n++++\n+\n+# Quick Tour Primer\n+\n+The following code snippets come from the `Helpers.scala` example code\n+that can be found with the [examples source]({{< srcref \"examples/tour/src/main/tour/Helpers.scala\">}}).\n+\n+{{% note %}}\n+See the [installation guide]({{< relref \"getting-started/installation-guide.md\" >}})\n+for instructions on how to install the MongoDB Scala Driver.\n+{{% /note %}}\n+\n+## The Observable API\n+\n+One of the core goals of the MongoDB JVM Drivers is to be dependency free and not force users to take on a specific library dependency.\n+Dependency management can cause interoperability and maintainability issues, which can be costly to maintain. \n+The Scala API makes use of an custom implementation of the Observer pattern which comprises three traits:\n+\n+1. Observable\n+2. Observer\n+3. Subscription \n+\n+An `Observable` is a provider of a potentially unbounded number of sequenced elements, published according to the demand received from it's `Subscription`.\n+\n+In response to a call to `Observable.subscribe(Subscriber)` the possible invocation sequences for methods on the `Observer` are given by the following protocol:\n+\n+```\n+onSubscribe onNext* (onError | onComplete)?\n+```\n+\n+This means that `onSubscribe` is always signalled, followed by a possibly unbounded number of `onNext` signals (as requested by the `Subscription`) \n+followed by an `onError` signal if there is a failure, or an `onComplete` signal when no more elements are available—all as long as \n+the `Subscription` is not cancelled.\n+\n+The implementation draws inspiration from the [ReactiveX](http://reactivex.io/) and [reactive streams](http://www.reactive-streams.org) libraries.\n+\n+\n+## From Async Callbacks to Observables\n+\n+The MongoDB Scala Driver is built upon the MongoDB Async driver which is callback driven.\n+The API mirrors the Async driver API and any methods that cause network IO return an instance of the \n+[`Observable[T]`]({{< apiref \"org.mongodb.scala.Observable\">}}) where `T` is the type of response for the operation. The \n+exception to that rule is for methods in the async driver that return a `Void` value in the callback. \n+As an `Observable[Void]` is problematic due it never calling `onNext` and stopping it being composable with other `Observables`. \n+In these circumstances we return a [`Observable[Completed]`]({{< apiref \"org/mongodb/scala/Completed.html\">}}) for the operation instead.\n+\n+### Observable\n+\n+The [`Observable`]({{< apiref \"org.mongodb.scala.Observable\">}}) is a trait wrapping the Java interface and where appropriate \n+implementations of the trait extend it to make a fluent API, on such example is [`FindObservable`]({{< apiref \"org.mongodb.scala.FindObservable\">}}) ","path":"docs/reference/content/getting-started/quick-tour-primer.md","position":58,"original_position":58,"commit_id":"7fadc9a7ffbd57ef2bb2684a046f14a6b47db2c7","original_commit_id":"7fadc9a7ffbd57ef2bb2684a046f14a6b47db2c7","user":{"login":"jyemin","id":1111546,"avatar_url":"https://avatars.githubusercontent.com/u/1111546?v=3","gravatar_id":"","url":"https://api.github.com/users/jyemin","html_url":"https://github.com/jyemin","followers_url":"https://api.github.com/users/jyemin/followers","following_url":"https://api.github.com/users/jyemin/following{/other_user}","gists_url":"https://api.github.com/users/jyemin/gists{/gist_id}","starred_url":"https://api.github.com/users/jyemin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jyemin/subscriptions","organizations_url":"https://api.github.com/users/jyemin/orgs","repos_url":"https://api.github.com/users/jyemin/repos","events_url":"https://api.github.com/users/jyemin/events{/privacy}","received_events_url":"https://api.github.com/users/jyemin/received_events","type":"User","site_admin":false},"body":"Comma before \"accessible\"","created_at":"2015-07-01T19:50:00Z","updated_at":"2015-07-01T19:50:00Z","html_url":"https://github.com/rozza/mongo-scala-driver/pull/7#discussion_r33717104","pull_request_url":"https://api.github.com/repos/rozza/mongo-scala-driver/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/rozza/mongo-scala-driver/pulls/comments/33717104"},"html":{"href":"https://github.com/rozza/mongo-scala-driver/pull/7#discussion_r33717104"},"pull_request":{"href":"https://api.github.com/repos/rozza/mongo-scala-driver/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/rozza/mongo-scala-driver/pulls/7","id":38987423,"html_url":"https://github.com/rozza/mongo-scala-driver/pull/7","diff_url":"https://github.com/rozza/mongo-scala-driver/pull/7.diff","patch_url":"https://github.com/rozza/mongo-scala-driver/pull/7.patch","issue_url":"https://api.github.com/repos/rozza/mongo-scala-driver/issues/7","number":7,"state":"open","locked":false,"title":"QuickTour","user":{"login":"rozza","id":420,"avatar_url":"https://avatars.githubusercontent.com/u/420?v=3","gravatar_id":"","url":"https://api.github.com/users/rozza","html_url":"https://github.com/rozza","followers_url":"https://api.github.com/users/rozza/followers","following_url":"https://api.github.com/users/rozza/following{/other_user}","gists_url":"https://api.github.com/users/rozza/gists{/gist_id}","starred_url":"https://api.github.com/users/rozza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rozza/subscriptions","organizations_url":"https://api.github.com/users/rozza/orgs","repos_url":"https://api.github.com/users/rozza/repos","events_url":"https://api.github.com/users/rozza/events{/privacy}","received_events_url":"https://api.github.com/users/rozza/received_events","type":"User","site_admin":false},"body":"SCALA-195\n\n<!-- Reviewable:start -->\n[<img src=\"https://reviewable.io/review_button.png\" height=40 alt=\"Review on Reviewable\"/>](https://reviewable.io/reviews/rozza/mongo-scala-driver/7)\n<!-- Reviewable:end -->\n","created_at":"2015-07-01T14:26:39Z","updated_at":"2015-07-01T19:50:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"215416b718c3be37d29630b3b0f704acb98f96cf","assignee":{"login":"jyemin","id":1111546,"avatar_url":"https://avatars.githubusercontent.com/u/1111546?v=3","gravatar_id":"","url":"https://api.github.com/users/jyemin","html_url":"https://github.com/jyemin","followers_url":"https://api.github.com/users/jyemin/followers","following_url":"https://api.github.com/users/jyemin/following{/other_user}","gists_url":"https://api.github.com/users/jyemin/gists{/gist_id}","starred_url":"https://api.github.com/users/jyemin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jyemin/subscriptions","organizations_url":"https://api.github.com/users/jyemin/orgs","repos_url":"https://api.github.com/users/jyemin/repos","events_url":"https://api.github.com/users/jyemin/events{/privacy}","received_events_url":"https://api.github.com/users/jyemin/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/rozza/mongo-scala-driver/pulls/7/commits","review_comments_url":"https://api.github.com/repos/rozza/mongo-scala-driver/pulls/7/comments","review_comment_url":"https://api.github.com/repos/rozza/mongo-scala-driver/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rozza/mongo-scala-driver/issues/7/comments","statuses_url":"https://api.github.com/repos/rozza/mongo-scala-driver/statuses/7fadc9a7ffbd57ef2bb2684a046f14a6b47db2c7","head":{"label":"rozza:s195","ref":"s195","sha":"7fadc9a7ffbd57ef2bb2684a046f14a6b47db2c7","user":{"login":"rozza","id":420,"avatar_url":"https://avatars.githubusercontent.com/u/420?v=3","gravatar_id":"","url":"https://api.github.com/users/rozza","html_url":"https://github.com/rozza","followers_url":"https://api.github.com/users/rozza/followers","following_url":"https://api.github.com/users/rozza/following{/other_user}","gists_url":"https://api.github.com/users/rozza/gists{/gist_id}","starred_url":"https://api.github.com/users/rozza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rozza/subscriptions","organizations_url":"https://api.github.com/users/rozza/orgs","repos_url":"https://api.github.com/users/rozza/repos","events_url":"https://api.github.com/users/rozza/events{/privacy}","received_events_url":"https://api.github.com/users/rozza/received_events","type":"User","site_admin":false},"repo":{"id":17707682,"name":"mongo-scala-driver","full_name":"rozza/mongo-scala-driver","owner":{"login":"rozza","id":420,"avatar_url":"https://avatars.githubusercontent.com/u/420?v=3","gravatar_id":"","url":"https://api.github.com/users/rozza","html_url":"https://github.com/rozza","followers_url":"https://api.github.com/users/rozza/followers","following_url":"https://api.github.com/users/rozza/following{/other_user}","gists_url":"https://api.github.com/users/rozza/gists{/gist_id}","starred_url":"https://api.github.com/users/rozza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rozza/subscriptions","organizations_url":"https://api.github.com/users/rozza/orgs","repos_url":"https://api.github.com/users/rozza/repos","events_url":"https://api.github.com/users/rozza/events{/privacy}","received_events_url":"https://api.github.com/users/rozza/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rozza/mongo-scala-driver","description":"","fork":true,"url":"https://api.github.com/repos/rozza/mongo-scala-driver","forks_url":"https://api.github.com/repos/rozza/mongo-scala-driver/forks","keys_url":"https://api.github.com/repos/rozza/mongo-scala-driver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rozza/mongo-scala-driver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rozza/mongo-scala-driver/teams","hooks_url":"https://api.github.com/repos/rozza/mongo-scala-driver/hooks","issue_events_url":"https://api.github.com/repos/rozza/mongo-scala-driver/issues/events{/number}","events_url":"https://api.github.com/repos/rozza/mongo-scala-driver/events","assignees_url":"https://api.github.com/repos/rozza/mongo-scala-driver/assignees{/user}","branches_url":"https://api.github.com/repos/rozza/mongo-scala-driver/branches{/branch}","tags_url":"https://api.github.com/repos/rozza/mongo-scala-driver/tags","blobs_url":"https://api.github.com/repos/rozza/mongo-scala-driver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rozza/mongo-scala-driver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rozza/mongo-scala-driver/git/refs{/sha}","trees_url":"https://api.github.com/repos/rozza/mongo-scala-driver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rozza/mongo-scala-driver/statuses/{sha}","languages_url":"https://api.github.com/repos/rozza/mongo-scala-driver/languages","stargazers_url":"https://api.github.com/repos/rozza/mongo-scala-driver/stargazers","contributors_url":"https://api.github.com/repos/rozza/mongo-scala-driver/contributors","subscribers_url":"https://api.github.com/repos/rozza/mongo-scala-driver/subscribers","subscription_url":"https://api.github.com/repos/rozza/mongo-scala-driver/subscription","commits_url":"https://api.github.com/repos/rozza/mongo-scala-driver/commits{/sha}","git_commits_url":"https://api.github.com/repos/rozza/mongo-scala-driver/git/commits{/sha}","comments_url":"https://api.github.com/repos/rozza/mongo-scala-driver/comments{/number}","issue_comment_url":"https://api.github.com/repos/rozza/mongo-scala-driver/issues/comments{/number}","contents_url":"https://api.github.com/repos/rozza/mongo-scala-driver/contents/{+path}","compare_url":"https://api.github.com/repos/rozza/mongo-scala-driver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rozza/mongo-scala-driver/merges","archive_url":"https://api.github.com/repos/rozza/mongo-scala-driver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rozza/mongo-scala-driver/downloads","issues_url":"https://api.github.com/repos/rozza/mongo-scala-driver/issues{/number}","pulls_url":"https://api.github.com/repos/rozza/mongo-scala-driver/pulls{/number}","milestones_url":"https://api.github.com/repos/rozza/mongo-scala-driver/milestones{/number}","notifications_url":"https://api.github.com/repos/rozza/mongo-scala-driver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rozza/mongo-scala-driver/labels{/name}","releases_url":"https://api.github.com/repos/rozza/mongo-scala-driver/releases{/id}","created_at":"2014-03-13T11:24:55Z","updated_at":"2015-04-07T13:41:44Z","pushed_at":"2015-07-01T14:56:05Z","git_url":"git://github.com/rozza/mongo-scala-driver.git","ssh_url":"git@github.com:rozza/mongo-scala-driver.git","clone_url":"https://github.com/rozza/mongo-scala-driver.git","svn_url":"https://github.com/rozza/mongo-scala-driver","homepage":null,"size":2709,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"rozza:master","ref":"master","sha":"3e9c8c329d3511bf2facd75b86bfe0e578fb0c55","user":{"login":"rozza","id":420,"avatar_url":"https://avatars.githubusercontent.com/u/420?v=3","gravatar_id":"","url":"https://api.github.com/users/rozza","html_url":"https://github.com/rozza","followers_url":"https://api.github.com/users/rozza/followers","following_url":"https://api.github.com/users/rozza/following{/other_user}","gists_url":"https://api.github.com/users/rozza/gists{/gist_id}","starred_url":"https://api.github.com/users/rozza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rozza/subscriptions","organizations_url":"https://api.github.com/users/rozza/orgs","repos_url":"https://api.github.com/users/rozza/repos","events_url":"https://api.github.com/users/rozza/events{/privacy}","received_events_url":"https://api.github.com/users/rozza/received_events","type":"User","site_admin":false},"repo":{"id":17707682,"name":"mongo-scala-driver","full_name":"rozza/mongo-scala-driver","owner":{"login":"rozza","id":420,"avatar_url":"https://avatars.githubusercontent.com/u/420?v=3","gravatar_id":"","url":"https://api.github.com/users/rozza","html_url":"https://github.com/rozza","followers_url":"https://api.github.com/users/rozza/followers","following_url":"https://api.github.com/users/rozza/following{/other_user}","gists_url":"https://api.github.com/users/rozza/gists{/gist_id}","starred_url":"https://api.github.com/users/rozza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rozza/subscriptions","organizations_url":"https://api.github.com/users/rozza/orgs","repos_url":"https://api.github.com/users/rozza/repos","events_url":"https://api.github.com/users/rozza/events{/privacy}","received_events_url":"https://api.github.com/users/rozza/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rozza/mongo-scala-driver","description":"","fork":true,"url":"https://api.github.com/repos/rozza/mongo-scala-driver","forks_url":"https://api.github.com/repos/rozza/mongo-scala-driver/forks","keys_url":"https://api.github.com/repos/rozza/mongo-scala-driver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rozza/mongo-scala-driver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rozza/mongo-scala-driver/teams","hooks_url":"https://api.github.com/repos/rozza/mongo-scala-driver/hooks","issue_events_url":"https://api.github.com/repos/rozza/mongo-scala-driver/issues/events{/number}","events_url":"https://api.github.com/repos/rozza/mongo-scala-driver/events","assignees_url":"https://api.github.com/repos/rozza/mongo-scala-driver/assignees{/user}","branches_url":"https://api.github.com/repos/rozza/mongo-scala-driver/branches{/branch}","tags_url":"https://api.github.com/repos/rozza/mongo-scala-driver/tags","blobs_url":"https://api.github.com/repos/rozza/mongo-scala-driver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rozza/mongo-scala-driver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rozza/mongo-scala-driver/git/refs{/sha}","trees_url":"https://api.github.com/repos/rozza/mongo-scala-driver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rozza/mongo-scala-driver/statuses/{sha}","languages_url":"https://api.github.com/repos/rozza/mongo-scala-driver/languages","stargazers_url":"https://api.github.com/repos/rozza/mongo-scala-driver/stargazers","contributors_url":"https://api.github.com/repos/rozza/mongo-scala-driver/contributors","subscribers_url":"https://api.github.com/repos/rozza/mongo-scala-driver/subscribers","subscription_url":"https://api.github.com/repos/rozza/mongo-scala-driver/subscription","commits_url":"https://api.github.com/repos/rozza/mongo-scala-driver/commits{/sha}","git_commits_url":"https://api.github.com/repos/rozza/mongo-scala-driver/git/commits{/sha}","comments_url":"https://api.github.com/repos/rozza/mongo-scala-driver/comments{/number}","issue_comment_url":"https://api.github.com/repos/rozza/mongo-scala-driver/issues/comments{/number}","contents_url":"https://api.github.com/repos/rozza/mongo-scala-driver/contents/{+path}","compare_url":"https://api.github.com/repos/rozza/mongo-scala-driver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rozza/mongo-scala-driver/merges","archive_url":"https://api.github.com/repos/rozza/mongo-scala-driver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rozza/mongo-scala-driver/downloads","issues_url":"https://api.github.com/repos/rozza/mongo-scala-driver/issues{/number}","pulls_url":"https://api.github.com/repos/rozza/mongo-scala-driver/pulls{/number}","milestones_url":"https://api.github.com/repos/rozza/mongo-scala-driver/milestones{/number}","notifications_url":"https://api.github.com/repos/rozza/mongo-scala-driver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rozza/mongo-scala-driver/labels{/name}","releases_url":"https://api.github.com/repos/rozza/mongo-scala-driver/releases{/id}","created_at":"2014-03-13T11:24:55Z","updated_at":"2015-04-07T13:41:44Z","pushed_at":"2015-07-01T14:56:05Z","git_url":"git://github.com/rozza/mongo-scala-driver.git","ssh_url":"git@github.com:rozza/mongo-scala-driver.git","clone_url":"https://github.com/rozza/mongo-scala-driver.git","svn_url":"https://github.com/rozza/mongo-scala-driver","homepage":null,"size":2709,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rozza/mongo-scala-driver/pulls/7"},"html":{"href":"https://github.com/rozza/mongo-scala-driver/pull/7"},"issue":{"href":"https://api.github.com/repos/rozza/mongo-scala-driver/issues/7"},"comments":{"href":"https://api.github.com/repos/rozza/mongo-scala-driver/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/rozza/mongo-scala-driver/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/rozza/mongo-scala-driver/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rozza/mongo-scala-driver/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/rozza/mongo-scala-driver/statuses/7fadc9a7ffbd57ef2bb2684a046f14a6b47db2c7"}}}}