{"action":"created","comment":{"url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/pulls/comments/58173847","id":58173847,"diff_hunk":"@@ -0,0 +1,256 @@\n+/*\n+ * Copyright (c) 2011-2016 The original author or authors\n+ *\n+ * All rights reserved. This program and the accompanying materials\n+ * are made available under the terms of the Eclipse Public License v1.0\n+ * and Apache License v2.0 which accompanies this distribution.\n+ *\n+ *      The Eclipse Public License is available at\n+ *      http://www.eclipse.org/legal/epl-v10.html\n+ *\n+ *      The Apache License v2.0 is available at\n+ *      http://www.opensource.org/licenses/apache2.0.php\n+ *\n+ * You may elect to redistribute this code under either of these licenses.\n+ */\n+\n+/**\n+ * = Vert.x Discovery Service\n+ *\n+ * The discovery service provides an infrastructure to publish and discovery various resources, such as service proxies,\n+ * HTTP endpoints, data sources... These resources are called `services`. A `service` is a discoverable\n+ * functionality. It can be qualified by its type, metadata, and location. So a `service` can be a database, a\n+ * service proxy, a HTTP endpoint. It does not have to be a vert.x entity, but can be anything. Each service is\n+ * described by a {@link io.vertx.ext.discovery.Record}.\n+ * \n+ * The discovery service implements the interactions defined in the service-oriented computing. And to some extend,\n+ * also provides the dynamic service-oriented computing interaction. So, application can react to arrival and\n+ * departure of services.\n+ * \n+ * A service provider can:\n+ * \n+ * * publish a service record\n+ * * un-publish a published record\n+ * * update the status of a published service (down, out of service...)\n+ * \n+ * A service consumer can:\n+ * \n+ * * lookup for services\n+ * * bind to a selected service (it gets a {@link io.vertx.ext.discovery.ServiceReference}) and use it\n+ * * release the service once the consumer is done with it\n+ * * listen for arrival, departure and modification of services.\n+ * \n+ * Consumer would 1) lookup for service record matching their need, 2) retrieve the\n+ * {@link io.vertx.ext.discovery.ServiceReference} that give access to the service, 3) get a service object to access\n+ * the service, 4) release the service object once done.\n+ * \n+ * A state above, the central piece of information shared by the providers and consumers are\n+ * {@link io.vertx.ext.discovery.Record records}.\n+ * \n+ * Providers and consumers must create their own {@link io.vertx.ext.discovery.DiscoveryService} instance. These\n+ * instances are collaborating in background (distributed structure) to keep the set of services in sync.\n+ *\n+ * The discovery service supports bridges to import and export services from / to other discovery technologies.\n+ *\n+ * == Using the discovery service\n+ *\n+ * To use the Vert.x discovery service, add the following dependency to the _dependencies_ section of your build\n+ * descriptor:\n+ *\n+ * * Maven (in your `pom.xml`):\n+ *\n+ * [source,xml,subs=\"+attributes\"]\n+ * ----\n+ * <dependency>\n+ *   <groupId>${maven.groupId}</groupId>\n+ *   <artifactId>${maven.artifactId}</artifactId>\n+ *   <version>${maven.version}</version>\n+ * </dependency>\n+ * ----\n+ *\n+ * * Gradle (in your `build.gradle` file):\n+ *\n+ * [source,groovy,subs=\"+attributes\"]\n+ * ----\n+ * compile '${maven.groupId}:${maven.artifactId}:${maven.version}'\n+ * ----\n+ *\n+ * == Overall concepts\n+ *\n+ * The discovery mechanism is based on a few concepts explaining in this section.","path":"vertx-discovery-service/src/main/java/io/vertx/ext/discovery/package-info.java","position":80,"original_position":80,"commit_id":"34c3d23a0f85f72099c2095425457a1ab5a9412d","original_commit_id":"34c3d23a0f85f72099c2095425457a1ab5a9412d","user":{"login":"vietj","id":225674,"avatar_url":"https://avatars.githubusercontent.com/u/225674?v=3","gravatar_id":"","url":"https://api.github.com/users/vietj","html_url":"https://github.com/vietj","followers_url":"https://api.github.com/users/vietj/followers","following_url":"https://api.github.com/users/vietj/following{/other_user}","gists_url":"https://api.github.com/users/vietj/gists{/gist_id}","starred_url":"https://api.github.com/users/vietj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vietj/subscriptions","organizations_url":"https://api.github.com/users/vietj/orgs","repos_url":"https://api.github.com/users/vietj/repos","events_url":"https://api.github.com/users/vietj/events{/privacy}","received_events_url":"https://api.github.com/users/vietj/received_events","type":"User","site_admin":false},"body":"_explained_","created_at":"2016-04-01T08:03:42Z","updated_at":"2016-04-01T08:03:42Z","html_url":"https://github.com/vert-x3/vertx-microservice-toolbox/pull/2#discussion_r58173847","pull_request_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/pulls/comments/58173847"},"html":{"href":"https://github.com/vert-x3/vertx-microservice-toolbox/pull/2#discussion_r58173847"},"pull_request":{"href":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/pulls/2","id":64457415,"html_url":"https://github.com/vert-x3/vertx-microservice-toolbox/pull/2","diff_url":"https://github.com/vert-x3/vertx-microservice-toolbox/pull/2.diff","patch_url":"https://github.com/vert-x3/vertx-microservice-toolbox/pull/2.patch","issue_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/issues/2","number":2,"state":"open","locked":false,"title":"Initial work","user":{"login":"cescoffier","id":402301,"avatar_url":"https://avatars.githubusercontent.com/u/402301?v=3","gravatar_id":"","url":"https://api.github.com/users/cescoffier","html_url":"https://github.com/cescoffier","followers_url":"https://api.github.com/users/cescoffier/followers","following_url":"https://api.github.com/users/cescoffier/following{/other_user}","gists_url":"https://api.github.com/users/cescoffier/gists{/gist_id}","starred_url":"https://api.github.com/users/cescoffier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cescoffier/subscriptions","organizations_url":"https://api.github.com/users/cescoffier/orgs","repos_url":"https://api.github.com/users/cescoffier/repos","events_url":"https://api.github.com/users/cescoffier/events{/privacy}","received_events_url":"https://api.github.com/users/cescoffier/received_events","type":"User","site_admin":false},"body":"Contains:\r\n\r\n* circuit breaker implementation\r\n* discovery service\r\n* 2 discovery bridges (Kubernetes and Docker)\r\n\r\nIt also contains an implementation of the Hazelcast discovery for Kubernetes.","created_at":"2016-03-29T12:30:39Z","updated_at":"2016-04-01T08:03:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"19cf7be431cc47bdfe1843256f2c47d3c463e706","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/pulls/2/commits","review_comments_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/pulls/2/comments","review_comment_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/issues/2/comments","statuses_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/statuses/34c3d23a0f85f72099c2095425457a1ab5a9412d","head":{"label":"vert-x3:initial-work","ref":"initial-work","sha":"34c3d23a0f85f72099c2095425457a1ab5a9412d","user":{"login":"vert-x3","id":8124623,"avatar_url":"https://avatars.githubusercontent.com/u/8124623?v=3","gravatar_id":"","url":"https://api.github.com/users/vert-x3","html_url":"https://github.com/vert-x3","followers_url":"https://api.github.com/users/vert-x3/followers","following_url":"https://api.github.com/users/vert-x3/following{/other_user}","gists_url":"https://api.github.com/users/vert-x3/gists{/gist_id}","starred_url":"https://api.github.com/users/vert-x3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vert-x3/subscriptions","organizations_url":"https://api.github.com/users/vert-x3/orgs","repos_url":"https://api.github.com/users/vert-x3/repos","events_url":"https://api.github.com/users/vert-x3/events{/privacy}","received_events_url":"https://api.github.com/users/vert-x3/received_events","type":"Organization","site_admin":false},"repo":{"id":54370839,"name":"vertx-microservice-toolbox","full_name":"vert-x3/vertx-microservice-toolbox","owner":{"login":"vert-x3","id":8124623,"avatar_url":"https://avatars.githubusercontent.com/u/8124623?v=3","gravatar_id":"","url":"https://api.github.com/users/vert-x3","html_url":"https://github.com/vert-x3","followers_url":"https://api.github.com/users/vert-x3/followers","following_url":"https://api.github.com/users/vert-x3/following{/other_user}","gists_url":"https://api.github.com/users/vert-x3/gists{/gist_id}","starred_url":"https://api.github.com/users/vert-x3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vert-x3/subscriptions","organizations_url":"https://api.github.com/users/vert-x3/orgs","repos_url":"https://api.github.com/users/vert-x3/repos","events_url":"https://api.github.com/users/vert-x3/events{/privacy}","received_events_url":"https://api.github.com/users/vert-x3/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vert-x3/vertx-microservice-toolbox","description":"Some tools one can use for doing microservices with Vert.x","fork":false,"url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox","forks_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/forks","keys_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/teams","hooks_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/hooks","issue_events_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/issues/events{/number}","events_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/events","assignees_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/assignees{/user}","branches_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/branches{/branch}","tags_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/tags","blobs_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/git/refs{/sha}","trees_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/statuses/{sha}","languages_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/languages","stargazers_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/stargazers","contributors_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/contributors","subscribers_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/subscribers","subscription_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/subscription","commits_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/commits{/sha}","git_commits_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/git/commits{/sha}","comments_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/comments{/number}","issue_comment_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/issues/comments{/number}","contents_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/contents/{+path}","compare_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/merges","archive_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/downloads","issues_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/issues{/number}","pulls_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/pulls{/number}","milestones_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/milestones{/number}","notifications_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/labels{/name}","releases_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/releases{/id}","deployments_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/deployments","created_at":"2016-03-21T08:14:16Z","updated_at":"2016-03-21T08:14:16Z","pushed_at":"2016-03-31T14:16:28Z","git_url":"git://github.com/vert-x3/vertx-microservice-toolbox.git","ssh_url":"git@github.com:vert-x3/vertx-microservice-toolbox.git","clone_url":"https://github.com/vert-x3/vertx-microservice-toolbox.git","svn_url":"https://github.com/vert-x3/vertx-microservice-toolbox","homepage":null,"size":159,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"vert-x3:master","ref":"master","sha":"c820308fe9a8b97c9ea04920bcf5fcd158c97bf8","user":{"login":"vert-x3","id":8124623,"avatar_url":"https://avatars.githubusercontent.com/u/8124623?v=3","gravatar_id":"","url":"https://api.github.com/users/vert-x3","html_url":"https://github.com/vert-x3","followers_url":"https://api.github.com/users/vert-x3/followers","following_url":"https://api.github.com/users/vert-x3/following{/other_user}","gists_url":"https://api.github.com/users/vert-x3/gists{/gist_id}","starred_url":"https://api.github.com/users/vert-x3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vert-x3/subscriptions","organizations_url":"https://api.github.com/users/vert-x3/orgs","repos_url":"https://api.github.com/users/vert-x3/repos","events_url":"https://api.github.com/users/vert-x3/events{/privacy}","received_events_url":"https://api.github.com/users/vert-x3/received_events","type":"Organization","site_admin":false},"repo":{"id":54370839,"name":"vertx-microservice-toolbox","full_name":"vert-x3/vertx-microservice-toolbox","owner":{"login":"vert-x3","id":8124623,"avatar_url":"https://avatars.githubusercontent.com/u/8124623?v=3","gravatar_id":"","url":"https://api.github.com/users/vert-x3","html_url":"https://github.com/vert-x3","followers_url":"https://api.github.com/users/vert-x3/followers","following_url":"https://api.github.com/users/vert-x3/following{/other_user}","gists_url":"https://api.github.com/users/vert-x3/gists{/gist_id}","starred_url":"https://api.github.com/users/vert-x3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vert-x3/subscriptions","organizations_url":"https://api.github.com/users/vert-x3/orgs","repos_url":"https://api.github.com/users/vert-x3/repos","events_url":"https://api.github.com/users/vert-x3/events{/privacy}","received_events_url":"https://api.github.com/users/vert-x3/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vert-x3/vertx-microservice-toolbox","description":"Some tools one can use for doing microservices with Vert.x","fork":false,"url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox","forks_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/forks","keys_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/teams","hooks_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/hooks","issue_events_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/issues/events{/number}","events_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/events","assignees_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/assignees{/user}","branches_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/branches{/branch}","tags_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/tags","blobs_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/git/refs{/sha}","trees_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/statuses/{sha}","languages_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/languages","stargazers_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/stargazers","contributors_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/contributors","subscribers_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/subscribers","subscription_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/subscription","commits_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/commits{/sha}","git_commits_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/git/commits{/sha}","comments_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/comments{/number}","issue_comment_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/issues/comments{/number}","contents_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/contents/{+path}","compare_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/merges","archive_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/downloads","issues_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/issues{/number}","pulls_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/pulls{/number}","milestones_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/milestones{/number}","notifications_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/labels{/name}","releases_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/releases{/id}","deployments_url":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/deployments","created_at":"2016-03-21T08:14:16Z","updated_at":"2016-03-21T08:14:16Z","pushed_at":"2016-03-31T14:16:28Z","git_url":"git://github.com/vert-x3/vertx-microservice-toolbox.git","ssh_url":"git@github.com:vert-x3/vertx-microservice-toolbox.git","clone_url":"https://github.com/vert-x3/vertx-microservice-toolbox.git","svn_url":"https://github.com/vert-x3/vertx-microservice-toolbox","homepage":null,"size":159,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"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/vert-x3/vertx-microservice-toolbox/pulls/2"},"html":{"href":"https://github.com/vert-x3/vertx-microservice-toolbox/pull/2"},"issue":{"href":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/issues/2"},"comments":{"href":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/vert-x3/vertx-microservice-toolbox/statuses/34c3d23a0f85f72099c2095425457a1ab5a9412d"}}}}