GitHub PullRequestReviewCommentEvent at 2014-12-14 05:32:56
Repository: andes
Actor: Asitha
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/wso2-dev/andes/pulls/comments/21794009","id":21794009,"diff_hunk":"@@ -0,0 +1,65 @@\n+/*\n+ * Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.\n+ *\n+ * WSO2 Inc. licenses this file to you under the Apache License,\n+ * Version 2.0 (the \"License\"); you may not use this file except\n+ * in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *    http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing,\n+ * software distributed under the License is distributed on an\n+ * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n+ * KIND, either express or implied.  See the License for the\n+ * specific language governing permissions and limitations\n+ * under the License.\n+ */\n+\n+package org.wso2.andes.kernel.distrupter;\n+\n+import org.apache.commons.logging.Log;\n+import org.apache.commons.logging.LogFactory;\n+import org.wso2.andes.kernel.AndesMessage;\n+import org.wso2.andes.kernel.MessagingEngine;\n+\n+import java.util.ArrayList;\n+import java.util.List;\n+\n+/**\n+ * Writes messages in Disruptor ring buffer to message store in batches.\n+ */\n+public class messageWriter implements BatchEventHandler {","path":"modules/andes-core/broker/src/main/java/org/wso2/andes/kernel/distrupter/messageWriter.java","position":32,"original_position":32,"commit_id":"14c150d01080987ae97f8d7a4eec4ba361d35a63","original_commit_id":"14c150d01080987ae97f8d7a4eec4ba361d35a63","user":{"login":"Asitha","id":919462,"avatar_url":"https://avatars.githubusercontent.com/u/919462?v=3","gravatar_id":"","url":"https://api.github.com/users/Asitha","html_url":"https://github.com/Asitha","followers_url":"https://api.github.com/users/Asitha/followers","following_url":"https://api.github.com/users/Asitha/following{/other_user}","gists_url":"https://api.github.com/users/Asitha/gists{/gist_id}","starred_url":"https://api.github.com/users/Asitha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Asitha/subscriptions","organizations_url":"https://api.github.com/users/Asitha/orgs","repos_url":"https://api.github.com/users/Asitha/repos","events_url":"https://api.github.com/users/Asitha/events{/privacy}","received_events_url":"https://api.github.com/users/Asitha/received_events","type":"User","site_admin":false},"body":"Fixed with PR https://github.com/wso2-dev/andes/pull/218","created_at":"2014-12-14T05:32:56Z","updated_at":"2014-12-14T05:32:56Z","html_url":"https://github.com/wso2-dev/andes/pull/211#discussion_r21794009","pull_request_url":"https://api.github.com/repos/wso2-dev/andes/pulls/211","_links":{"self":{"href":"https://api.github.com/repos/wso2-dev/andes/pulls/comments/21794009"},"html":{"href":"https://github.com/wso2-dev/andes/pull/211#discussion_r21794009"},"pull_request":{"href":"https://api.github.com/repos/wso2-dev/andes/pulls/211"}}},"pull_request":{"url":"https://api.github.com/repos/wso2-dev/andes/pulls/211","id":25878359,"html_url":"https://github.com/wso2-dev/andes/pull/211","diff_url":"https://github.com/wso2-dev/andes/pull/211.diff","patch_url":"https://github.com/wso2-dev/andes/pull/211.patch","issue_url":"https://api.github.com/repos/wso2-dev/andes/issues/211","number":211,"state":"closed","locked":false,"title":"Disruptor based inbound event handling implementation","user":{"login":"Asitha","id":919462,"avatar_url":"https://avatars.githubusercontent.com/u/919462?v=3","gravatar_id":"","url":"https://api.github.com/users/Asitha","html_url":"https://github.com/Asitha","followers_url":"https://api.github.com/users/Asitha/followers","following_url":"https://api.github.com/users/Asitha/following{/other_user}","gists_url":"https://api.github.com/users/Asitha/gists{/gist_id}","starred_url":"https://api.github.com/users/Asitha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Asitha/subscriptions","organizations_url":"https://api.github.com/users/Asitha/orgs","repos_url":"https://api.github.com/users/Asitha/repos","events_url":"https://api.github.com/users/Asitha/events{/privacy}","received_events_url":"https://api.github.com/users/Asitha/received_events","type":"User","site_admin":false},"body":"- Introduced Andes class for all Andes related interactions from outside. This works as a facade\r\n  for MessagingEngine SubscriptionManager and AndesContextInformationManager\r\n\r\n- All the events coming to Andes are directed to a Disruptor ringBuffer. And then handled by relevant\r\n  Event handlers and directed to relevant entity within Andes. ( e.g.: MessagingEngine, SubscriptionManager)\r\n\r\n- Introduced AndesMessage class to wrap AndesMessageMetadata and AndesMessagePart. Andes only accept AndesMessages when receiving messages. No separate methods to handle message parts and message meta data at Andes level. This is to avoid unwanted complexity in handling a message as two separated entities.\r\n\r\n- Disruptor has four event handler types to handle events.\r\n    - *MessagePreProcessor :*\r\n          This event handler goes through the ring buffer first. Updates the message routing information if\r\n          necessary. Specially for topics if message cloning needed clones the messages and Updated the\r\n          AndesMessage list in the same position in ring buffer.\r\n\r\n    - *ConcurrentMessageWriter :*\r\n          There are multiple message writers that goes through the ring buffer after message pre processor\r\n          This writes messages to the data base. All the necessary information is updated by message pre\r\n          processor.\r\n\r\n    - *AckHandler :*\r\n          Acknowledgement related database update and state changes handle by this. There are multiple ack handlers that run in parallel after the MessagePreProcessor. ConcurrentMessageWriters and           AckHandlers run in parallel.\r\n\r\n    - *StateEventHandler :*\r\n          All the Andes state changes related logic, except for the acknowledgement handling logic, is handled through this event handler. e.g.: slot update logic for incoming new messages, channel open event This even handler goes through the list after all the event handlers have processed a slot in          ring buffer.","created_at":"2014-12-11T05:54:09Z","updated_at":"2014-12-14T05:32:56Z","closed_at":"2014-12-11T05:56:15Z","merged_at":"2014-12-11T05:56:15Z","merge_commit_sha":"f0d66b1d10554dab909ff9ecd28079c60af0e1a0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/wso2-dev/andes/pulls/211/commits","review_comments_url":"https://api.github.com/repos/wso2-dev/andes/pulls/211/comments","review_comment_url":"https://api.github.com/repos/wso2-dev/andes/pulls/comments/{number}","comments_url":"https://api.github.com/repos/wso2-dev/andes/issues/211/comments","statuses_url":"https://api.github.com/repos/wso2-dev/andes/statuses/14c150d01080987ae97f8d7a4eec4ba361d35a63","head":{"label":"Asitha:disruptor-inbound-event","ref":"disruptor-inbound-event","sha":"14c150d01080987ae97f8d7a4eec4ba361d35a63","user":{"login":"Asitha","id":919462,"avatar_url":"https://avatars.githubusercontent.com/u/919462?v=3","gravatar_id":"","url":"https://api.github.com/users/Asitha","html_url":"https://github.com/Asitha","followers_url":"https://api.github.com/users/Asitha/followers","following_url":"https://api.github.com/users/Asitha/following{/other_user}","gists_url":"https://api.github.com/users/Asitha/gists{/gist_id}","starred_url":"https://api.github.com/users/Asitha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Asitha/subscriptions","organizations_url":"https://api.github.com/users/Asitha/orgs","repos_url":"https://api.github.com/users/Asitha/repos","events_url":"https://api.github.com/users/Asitha/events{/privacy}","received_events_url":"https://api.github.com/users/Asitha/received_events","type":"User","site_admin":false},"repo":{"id":21349046,"name":"andes","full_name":"Asitha/andes","owner":{"login":"Asitha","id":919462,"avatar_url":"https://avatars.githubusercontent.com/u/919462?v=3","gravatar_id":"","url":"https://api.github.com/users/Asitha","html_url":"https://github.com/Asitha","followers_url":"https://api.github.com/users/Asitha/followers","following_url":"https://api.github.com/users/Asitha/following{/other_user}","gists_url":"https://api.github.com/users/Asitha/gists{/gist_id}","starred_url":"https://api.github.com/users/Asitha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Asitha/subscriptions","organizations_url":"https://api.github.com/users/Asitha/orgs","repos_url":"https://api.github.com/users/Asitha/repos","events_url":"https://api.github.com/users/Asitha/events{/privacy}","received_events_url":"https://api.github.com/users/Asitha/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Asitha/andes","description":"","fork":true,"url":"https://api.github.com/repos/Asitha/andes","forks_url":"https://api.github.com/repos/Asitha/andes/forks","keys_url":"https://api.github.com/repos/Asitha/andes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Asitha/andes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Asitha/andes/teams","hooks_url":"https://api.github.com/repos/Asitha/andes/hooks","issue_events_url":"https://api.github.com/repos/Asitha/andes/issues/events{/number}","events_url":"https://api.github.com/repos/Asitha/andes/events","assignees_url":"https://api.github.com/repos/Asitha/andes/assignees{/user}","branches_url":"https://api.github.com/repos/Asitha/andes/branches{/branch}","tags_url":"https://api.github.com/repos/Asitha/andes/tags","blobs_url":"https://api.github.com/repos/Asitha/andes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Asitha/andes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Asitha/andes/git/refs{/sha}","trees_url":"https://api.github.com/repos/Asitha/andes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Asitha/andes/statuses/{sha}","languages_url":"https://api.github.com/repos/Asitha/andes/languages","stargazers_url":"https://api.github.com/repos/Asitha/andes/stargazers","contributors_url":"https://api.github.com/repos/Asitha/andes/contributors","subscribers_url":"https://api.github.com/repos/Asitha/andes/subscribers","subscription_url":"https://api.github.com/repos/Asitha/andes/subscription","commits_url":"https://api.github.com/repos/Asitha/andes/commits{/sha}","git_commits_url":"https://api.github.com/repos/Asitha/andes/git/commits{/sha}","comments_url":"https://api.github.com/repos/Asitha/andes/comments{/number}","issue_comment_url":"https://api.github.com/repos/Asitha/andes/issues/comments/{number}","contents_url":"https://api.github.com/repos/Asitha/andes/contents/{+path}","compare_url":"https://api.github.com/repos/Asitha/andes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Asitha/andes/merges","archive_url":"https://api.github.com/repos/Asitha/andes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Asitha/andes/downloads","issues_url":"https://api.github.com/repos/Asitha/andes/issues{/number}","pulls_url":"https://api.github.com/repos/Asitha/andes/pulls{/number}","milestones_url":"https://api.github.com/repos/Asitha/andes/milestones{/number}","notifications_url":"https://api.github.com/repos/Asitha/andes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Asitha/andes/labels{/name}","releases_url":"https://api.github.com/repos/Asitha/andes/releases{/id}","created_at":"2014-06-30T11:37:08Z","updated_at":"2014-06-30T06:02:50Z","pushed_at":"2014-12-14T05:04:41Z","git_url":"git://github.com/Asitha/andes.git","ssh_url":"git@github.com:Asitha/andes.git","clone_url":"https://github.com/Asitha/andes.git","svn_url":"https://github.com/Asitha/andes","homepage":null,"size":63204,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"wso2-dev:master","ref":"master","sha":"6f4ff040493643881323191c3b4e78114bd647a5","user":{"login":"wso2-dev","id":6744733,"avatar_url":"https://avatars.githubusercontent.com/u/6744733?v=3","gravatar_id":"","url":"https://api.github.com/users/wso2-dev","html_url":"https://github.com/wso2-dev","followers_url":"https://api.github.com/users/wso2-dev/followers","following_url":"https://api.github.com/users/wso2-dev/following{/other_user}","gists_url":"https://api.github.com/users/wso2-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2-dev/subscriptions","organizations_url":"https://api.github.com/users/wso2-dev/orgs","repos_url":"https://api.github.com/users/wso2-dev/repos","events_url":"https://api.github.com/users/wso2-dev/events{/privacy}","received_events_url":"https://api.github.com/users/wso2-dev/received_events","type":"Organization","site_admin":false},"repo":{"id":20559274,"name":"andes","full_name":"wso2-dev/andes","owner":{"login":"wso2-dev","id":6744733,"avatar_url":"https://avatars.githubusercontent.com/u/6744733?v=3","gravatar_id":"","url":"https://api.github.com/users/wso2-dev","html_url":"https://github.com/wso2-dev","followers_url":"https://api.github.com/users/wso2-dev/followers","following_url":"https://api.github.com/users/wso2-dev/following{/other_user}","gists_url":"https://api.github.com/users/wso2-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2-dev/subscriptions","organizations_url":"https://api.github.com/users/wso2-dev/orgs","repos_url":"https://api.github.com/users/wso2-dev/repos","events_url":"https://api.github.com/users/wso2-dev/events{/privacy}","received_events_url":"https://api.github.com/users/wso2-dev/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wso2-dev/andes","description":"","fork":true,"url":"https://api.github.com/repos/wso2-dev/andes","forks_url":"https://api.github.com/repos/wso2-dev/andes/forks","keys_url":"https://api.github.com/repos/wso2-dev/andes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wso2-dev/andes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wso2-dev/andes/teams","hooks_url":"https://api.github.com/repos/wso2-dev/andes/hooks","issue_events_url":"https://api.github.com/repos/wso2-dev/andes/issues/events{/number}","events_url":"https://api.github.com/repos/wso2-dev/andes/events","assignees_url":"https://api.github.com/repos/wso2-dev/andes/assignees{/user}","branches_url":"https://api.github.com/repos/wso2-dev/andes/branches{/branch}","tags_url":"https://api.github.com/repos/wso2-dev/andes/tags","blobs_url":"https://api.github.com/repos/wso2-dev/andes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wso2-dev/andes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wso2-dev/andes/git/refs{/sha}","trees_url":"https://api.github.com/repos/wso2-dev/andes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wso2-dev/andes/statuses/{sha}","languages_url":"https://api.github.com/repos/wso2-dev/andes/languages","stargazers_url":"https://api.github.com/repos/wso2-dev/andes/stargazers","contributors_url":"https://api.github.com/repos/wso2-dev/andes/contributors","subscribers_url":"https://api.github.com/repos/wso2-dev/andes/subscribers","subscription_url":"https://api.github.com/repos/wso2-dev/andes/subscription","commits_url":"https://api.github.com/repos/wso2-dev/andes/commits{/sha}","git_commits_url":"https://api.github.com/repos/wso2-dev/andes/git/commits{/sha}","comments_url":"https://api.github.com/repos/wso2-dev/andes/comments{/number}","issue_comment_url":"https://api.github.com/repos/wso2-dev/andes/issues/comments/{number}","contents_url":"https://api.github.com/repos/wso2-dev/andes/contents/{+path}","compare_url":"https://api.github.com/repos/wso2-dev/andes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wso2-dev/andes/merges","archive_url":"https://api.github.com/repos/wso2-dev/andes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wso2-dev/andes/downloads","issues_url":"https://api.github.com/repos/wso2-dev/andes/issues{/number}","pulls_url":"https://api.github.com/repos/wso2-dev/andes/pulls{/number}","milestones_url":"https://api.github.com/repos/wso2-dev/andes/milestones{/number}","notifications_url":"https://api.github.com/repos/wso2-dev/andes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wso2-dev/andes/labels{/name}","releases_url":"https://api.github.com/repos/wso2-dev/andes/releases{/id}","created_at":"2014-06-06T10:04:30Z","updated_at":"2014-12-14T05:03:51Z","pushed_at":"2014-12-14T05:03:50Z","git_url":"git://github.com/wso2-dev/andes.git","ssh_url":"git@github.com:wso2-dev/andes.git","clone_url":"https://github.com/wso2-dev/andes.git","svn_url":"https://github.com/wso2-dev/andes","homepage":null,"size":64042,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":4,"forks":21,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wso2-dev/andes/pulls/211"},"html":{"href":"https://github.com/wso2-dev/andes/pull/211"},"issue":{"href":"https://api.github.com/repos/wso2-dev/andes/issues/211"},"comments":{"href":"https://api.github.com/repos/wso2-dev/andes/issues/211/comments"},"review_comments":{"href":"https://api.github.com/repos/wso2-dev/andes/pulls/211/comments"},"review_comment":{"href":"https://api.github.com/repos/wso2-dev/andes/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/wso2-dev/andes/pulls/211/commits"},"statuses":{"href":"https://api.github.com/repos/wso2-dev/andes/statuses/14c150d01080987ae97f8d7a4eec4ba361d35a63"}}}}