{"action":"created","comment":{"url":"https://api.github.com/repos/esl/MongooseIM/pulls/comments/51405953","id":51405953,"diff_hunk":"@@ -662,3 +650,78 @@ maybe_encode_compact_uuid(undefined, _) ->\n     undefined;\n maybe_encode_compact_uuid(Microseconds, NodeID) ->\n     encode_compact_uuid(Microseconds, NodeID).\n+\n+\n+%% ----------------------------------------------------------------------\n+%% Optimizations\n+\n+packet_to_stored_binary(Packet) ->\n+    case odbc_message_format() of","path":"apps/ejabberd/src/mod_mam_muc_odbc_arch.erl","position":64,"original_position":64,"commit_id":"501c7cc6c2b7061d08adf32e24283d19b4c0b053","original_commit_id":"501c7cc6c2b7061d08adf32e24283d19b4c0b053","user":{"login":"arcusfelis","id":639796,"avatar_url":"https://avatars.githubusercontent.com/u/639796?v=3","gravatar_id":"","url":"https://api.github.com/users/arcusfelis","html_url":"https://github.com/arcusfelis","followers_url":"https://api.github.com/users/arcusfelis/followers","following_url":"https://api.github.com/users/arcusfelis/following{/other_user}","gists_url":"https://api.github.com/users/arcusfelis/gists{/gist_id}","starred_url":"https://api.github.com/users/arcusfelis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arcusfelis/subscriptions","organizations_url":"https://api.github.com/users/arcusfelis/orgs","repos_url":"https://api.github.com/users/arcusfelis/repos","events_url":"https://api.github.com/users/arcusfelis/events{/privacy}","received_events_url":"https://api.github.com/users/arcusfelis/received_events","type":"User","site_admin":false},"body":"I suggest add another option `odbc_message_format() -> {callback, fun .....}`.\r\nSo, it will be:\r\n- compressed_term\r\n- term\r\n- xml\r\n- `{callback, fun my_mod:packet_to_stored_binary/1}`","created_at":"2016-02-01T11:14:46Z","updated_at":"2016-02-01T11:14:46Z","html_url":"https://github.com/esl/MongooseIM/pull/657#discussion_r51405953","pull_request_url":"https://api.github.com/repos/esl/MongooseIM/pulls/657","_links":{"self":{"href":"https://api.github.com/repos/esl/MongooseIM/pulls/comments/51405953"},"html":{"href":"https://github.com/esl/MongooseIM/pull/657#discussion_r51405953"},"pull_request":{"href":"https://api.github.com/repos/esl/MongooseIM/pulls/657"}}},"pull_request":{"url":"https://api.github.com/repos/esl/MongooseIM/pulls/657","id":57824791,"html_url":"https://github.com/esl/MongooseIM/pull/657","diff_url":"https://github.com/esl/MongooseIM/pull/657.diff","patch_url":"https://github.com/esl/MongooseIM/pull/657.patch","issue_url":"https://api.github.com/repos/esl/MongooseIM/issues/657","number":657,"state":"open","locked":false,"title":"Store messages in XML","user":{"login":"arcusfelis","id":639796,"avatar_url":"https://avatars.githubusercontent.com/u/639796?v=3","gravatar_id":"","url":"https://api.github.com/users/arcusfelis","html_url":"https://github.com/arcusfelis","followers_url":"https://api.github.com/users/arcusfelis/followers","following_url":"https://api.github.com/users/arcusfelis/following{/other_user}","gists_url":"https://api.github.com/users/arcusfelis/gists{/gist_id}","starred_url":"https://api.github.com/users/arcusfelis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arcusfelis/subscriptions","organizations_url":"https://api.github.com/users/arcusfelis/orgs","repos_url":"https://api.github.com/users/arcusfelis/repos","events_url":"https://api.github.com/users/arcusfelis/events{/privacy}","received_events_url":"https://api.github.com/users/arcusfelis/received_events","type":"User","site_admin":false},"body":"mod_mam_odbc_arch and mod_mam_muc_odbc_arch gets a new parameter `simple`.\r\nMessages are stored in XML and JIDs are stored as `user@server/resource`.\r\n\r\nBy default `simple` parameter is `false` to remain compatible with previous configurations.\r\n\r\n\r\n+ `hand_made_partitions` is not an macro anymore. This option that allows to store messages in 16 separate tables to improve scalability. By default disabled.","created_at":"2016-02-01T11:05:17Z","updated_at":"2016-02-01T11:14:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"68238fbeb97f4423b0fdcbd82c21ddd0d8cf8f6b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/esl/MongooseIM/pulls/657/commits","review_comments_url":"https://api.github.com/repos/esl/MongooseIM/pulls/657/comments","review_comment_url":"https://api.github.com/repos/esl/MongooseIM/pulls/comments{/number}","comments_url":"https://api.github.com/repos/esl/MongooseIM/issues/657/comments","statuses_url":"https://api.github.com/repos/esl/MongooseIM/statuses/501c7cc6c2b7061d08adf32e24283d19b4c0b053","head":{"label":"esl:arc-mam-simple-db","ref":"arc-mam-simple-db","sha":"501c7cc6c2b7061d08adf32e24283d19b4c0b053","user":{"login":"esl","id":283412,"avatar_url":"https://avatars.githubusercontent.com/u/283412?v=3","gravatar_id":"","url":"https://api.github.com/users/esl","html_url":"https://github.com/esl","followers_url":"https://api.github.com/users/esl/followers","following_url":"https://api.github.com/users/esl/following{/other_user}","gists_url":"https://api.github.com/users/esl/gists{/gist_id}","starred_url":"https://api.github.com/users/esl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esl/subscriptions","organizations_url":"https://api.github.com/users/esl/orgs","repos_url":"https://api.github.com/users/esl/repos","events_url":"https://api.github.com/users/esl/events{/privacy}","received_events_url":"https://api.github.com/users/esl/received_events","type":"Organization","site_admin":false},"repo":{"id":2354240,"name":"MongooseIM","full_name":"esl/MongooseIM","owner":{"login":"esl","id":283412,"avatar_url":"https://avatars.githubusercontent.com/u/283412?v=3","gravatar_id":"","url":"https://api.github.com/users/esl","html_url":"https://github.com/esl","followers_url":"https://api.github.com/users/esl/followers","following_url":"https://api.github.com/users/esl/following{/other_user}","gists_url":"https://api.github.com/users/esl/gists{/gist_id}","starred_url":"https://api.github.com/users/esl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esl/subscriptions","organizations_url":"https://api.github.com/users/esl/orgs","repos_url":"https://api.github.com/users/esl/repos","events_url":"https://api.github.com/users/esl/events{/privacy}","received_events_url":"https://api.github.com/users/esl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/esl/MongooseIM","description":"Jabber / XMPP server with focus on performance and scalability, by Erlang Solutions","fork":false,"url":"https://api.github.com/repos/esl/MongooseIM","forks_url":"https://api.github.com/repos/esl/MongooseIM/forks","keys_url":"https://api.github.com/repos/esl/MongooseIM/keys{/key_id}","collaborators_url":"https://api.github.com/repos/esl/MongooseIM/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/esl/MongooseIM/teams","hooks_url":"https://api.github.com/repos/esl/MongooseIM/hooks","issue_events_url":"https://api.github.com/repos/esl/MongooseIM/issues/events{/number}","events_url":"https://api.github.com/repos/esl/MongooseIM/events","assignees_url":"https://api.github.com/repos/esl/MongooseIM/assignees{/user}","branches_url":"https://api.github.com/repos/esl/MongooseIM/branches{/branch}","tags_url":"https://api.github.com/repos/esl/MongooseIM/tags","blobs_url":"https://api.github.com/repos/esl/MongooseIM/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/esl/MongooseIM/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/esl/MongooseIM/git/refs{/sha}","trees_url":"https://api.github.com/repos/esl/MongooseIM/git/trees{/sha}","statuses_url":"https://api.github.com/repos/esl/MongooseIM/statuses/{sha}","languages_url":"https://api.github.com/repos/esl/MongooseIM/languages","stargazers_url":"https://api.github.com/repos/esl/MongooseIM/stargazers","contributors_url":"https://api.github.com/repos/esl/MongooseIM/contributors","subscribers_url":"https://api.github.com/repos/esl/MongooseIM/subscribers","subscription_url":"https://api.github.com/repos/esl/MongooseIM/subscription","commits_url":"https://api.github.com/repos/esl/MongooseIM/commits{/sha}","git_commits_url":"https://api.github.com/repos/esl/MongooseIM/git/commits{/sha}","comments_url":"https://api.github.com/repos/esl/MongooseIM/comments{/number}","issue_comment_url":"https://api.github.com/repos/esl/MongooseIM/issues/comments{/number}","contents_url":"https://api.github.com/repos/esl/MongooseIM/contents/{+path}","compare_url":"https://api.github.com/repos/esl/MongooseIM/compare/{base}...{head}","merges_url":"https://api.github.com/repos/esl/MongooseIM/merges","archive_url":"https://api.github.com/repos/esl/MongooseIM/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/esl/MongooseIM/downloads","issues_url":"https://api.github.com/repos/esl/MongooseIM/issues{/number}","pulls_url":"https://api.github.com/repos/esl/MongooseIM/pulls{/number}","milestones_url":"https://api.github.com/repos/esl/MongooseIM/milestones{/number}","notifications_url":"https://api.github.com/repos/esl/MongooseIM/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/esl/MongooseIM/labels{/name}","releases_url":"https://api.github.com/repos/esl/MongooseIM/releases{/id}","deployments_url":"https://api.github.com/repos/esl/MongooseIM/deployments","created_at":"2011-09-09T08:19:18Z","updated_at":"2016-01-31T22:28:37Z","pushed_at":"2016-02-01T11:05:17Z","git_url":"git://github.com/esl/MongooseIM.git","ssh_url":"git@github.com:esl/MongooseIM.git","clone_url":"https://github.com/esl/MongooseIM.git","svn_url":"https://github.com/esl/MongooseIM","homepage":"https://www.erlang-solutions.com/products/mongooseim.html","size":16155,"stargazers_count":469,"watchers_count":469,"language":"Erlang","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":188,"mirror_url":null,"open_issues_count":54,"forks":188,"open_issues":54,"watchers":469,"default_branch":"master"}},"base":{"label":"esl:master","ref":"master","sha":"f75391188db14f61f7ffa26959d621503e036566","user":{"login":"esl","id":283412,"avatar_url":"https://avatars.githubusercontent.com/u/283412?v=3","gravatar_id":"","url":"https://api.github.com/users/esl","html_url":"https://github.com/esl","followers_url":"https://api.github.com/users/esl/followers","following_url":"https://api.github.com/users/esl/following{/other_user}","gists_url":"https://api.github.com/users/esl/gists{/gist_id}","starred_url":"https://api.github.com/users/esl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esl/subscriptions","organizations_url":"https://api.github.com/users/esl/orgs","repos_url":"https://api.github.com/users/esl/repos","events_url":"https://api.github.com/users/esl/events{/privacy}","received_events_url":"https://api.github.com/users/esl/received_events","type":"Organization","site_admin":false},"repo":{"id":2354240,"name":"MongooseIM","full_name":"esl/MongooseIM","owner":{"login":"esl","id":283412,"avatar_url":"https://avatars.githubusercontent.com/u/283412?v=3","gravatar_id":"","url":"https://api.github.com/users/esl","html_url":"https://github.com/esl","followers_url":"https://api.github.com/users/esl/followers","following_url":"https://api.github.com/users/esl/following{/other_user}","gists_url":"https://api.github.com/users/esl/gists{/gist_id}","starred_url":"https://api.github.com/users/esl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esl/subscriptions","organizations_url":"https://api.github.com/users/esl/orgs","repos_url":"https://api.github.com/users/esl/repos","events_url":"https://api.github.com/users/esl/events{/privacy}","received_events_url":"https://api.github.com/users/esl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/esl/MongooseIM","description":"Jabber / XMPP server with focus on performance and scalability, by Erlang Solutions","fork":false,"url":"https://api.github.com/repos/esl/MongooseIM","forks_url":"https://api.github.com/repos/esl/MongooseIM/forks","keys_url":"https://api.github.com/repos/esl/MongooseIM/keys{/key_id}","collaborators_url":"https://api.github.com/repos/esl/MongooseIM/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/esl/MongooseIM/teams","hooks_url":"https://api.github.com/repos/esl/MongooseIM/hooks","issue_events_url":"https://api.github.com/repos/esl/MongooseIM/issues/events{/number}","events_url":"https://api.github.com/repos/esl/MongooseIM/events","assignees_url":"https://api.github.com/repos/esl/MongooseIM/assignees{/user}","branches_url":"https://api.github.com/repos/esl/MongooseIM/branches{/branch}","tags_url":"https://api.github.com/repos/esl/MongooseIM/tags","blobs_url":"https://api.github.com/repos/esl/MongooseIM/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/esl/MongooseIM/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/esl/MongooseIM/git/refs{/sha}","trees_url":"https://api.github.com/repos/esl/MongooseIM/git/trees{/sha}","statuses_url":"https://api.github.com/repos/esl/MongooseIM/statuses/{sha}","languages_url":"https://api.github.com/repos/esl/MongooseIM/languages","stargazers_url":"https://api.github.com/repos/esl/MongooseIM/stargazers","contributors_url":"https://api.github.com/repos/esl/MongooseIM/contributors","subscribers_url":"https://api.github.com/repos/esl/MongooseIM/subscribers","subscription_url":"https://api.github.com/repos/esl/MongooseIM/subscription","commits_url":"https://api.github.com/repos/esl/MongooseIM/commits{/sha}","git_commits_url":"https://api.github.com/repos/esl/MongooseIM/git/commits{/sha}","comments_url":"https://api.github.com/repos/esl/MongooseIM/comments{/number}","issue_comment_url":"https://api.github.com/repos/esl/MongooseIM/issues/comments{/number}","contents_url":"https://api.github.com/repos/esl/MongooseIM/contents/{+path}","compare_url":"https://api.github.com/repos/esl/MongooseIM/compare/{base}...{head}","merges_url":"https://api.github.com/repos/esl/MongooseIM/merges","archive_url":"https://api.github.com/repos/esl/MongooseIM/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/esl/MongooseIM/downloads","issues_url":"https://api.github.com/repos/esl/MongooseIM/issues{/number}","pulls_url":"https://api.github.com/repos/esl/MongooseIM/pulls{/number}","milestones_url":"https://api.github.com/repos/esl/MongooseIM/milestones{/number}","notifications_url":"https://api.github.com/repos/esl/MongooseIM/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/esl/MongooseIM/labels{/name}","releases_url":"https://api.github.com/repos/esl/MongooseIM/releases{/id}","deployments_url":"https://api.github.com/repos/esl/MongooseIM/deployments","created_at":"2011-09-09T08:19:18Z","updated_at":"2016-01-31T22:28:37Z","pushed_at":"2016-02-01T11:05:17Z","git_url":"git://github.com/esl/MongooseIM.git","ssh_url":"git@github.com:esl/MongooseIM.git","clone_url":"https://github.com/esl/MongooseIM.git","svn_url":"https://github.com/esl/MongooseIM","homepage":"https://www.erlang-solutions.com/products/mongooseim.html","size":16155,"stargazers_count":469,"watchers_count":469,"language":"Erlang","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":188,"mirror_url":null,"open_issues_count":54,"forks":188,"open_issues":54,"watchers":469,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/esl/MongooseIM/pulls/657"},"html":{"href":"https://github.com/esl/MongooseIM/pull/657"},"issue":{"href":"https://api.github.com/repos/esl/MongooseIM/issues/657"},"comments":{"href":"https://api.github.com/repos/esl/MongooseIM/issues/657/comments"},"review_comments":{"href":"https://api.github.com/repos/esl/MongooseIM/pulls/657/comments"},"review_comment":{"href":"https://api.github.com/repos/esl/MongooseIM/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/esl/MongooseIM/pulls/657/commits"},"statuses":{"href":"https://api.github.com/repos/esl/MongooseIM/statuses/501c7cc6c2b7061d08adf32e24283d19b4c0b053"}}}}