{"action":"created","issue":{"url":"https://api.github.com/repos/matehat/cqerl/issues/94","repository_url":"https://api.github.com/repos/matehat/cqerl","labels_url":"https://api.github.com/repos/matehat/cqerl/issues/94/labels{/name}","comments_url":"https://api.github.com/repos/matehat/cqerl/issues/94/comments","events_url":"https://api.github.com/repos/matehat/cqerl/issues/94/events","html_url":"https://github.com/matehat/cqerl/pull/94","id":150695877,"number":94,"title":"v1.0 pre","user":{"login":"matehat","id":1283,"avatar_url":"https://avatars.githubusercontent.com/u/1283?v=3","gravatar_id":"","url":"https://api.github.com/users/matehat","html_url":"https://github.com/matehat","followers_url":"https://api.github.com/users/matehat/followers","following_url":"https://api.github.com/users/matehat/following{/other_user}","gists_url":"https://api.github.com/users/matehat/gists{/gist_id}","starred_url":"https://api.github.com/users/matehat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matehat/subscriptions","organizations_url":"https://api.github.com/users/matehat/orgs","repos_url":"https://api.github.com/users/matehat/repos","events_url":"https://api.github.com/users/matehat/events{/privacy}","received_events_url":"https://api.github.com/users/matehat/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-04-24T20:12:41Z","updated_at":"2016-04-26T02:35:15Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/matehat/cqerl/pulls/94","html_url":"https://github.com/matehat/cqerl/pull/94","diff_url":"https://github.com/matehat/cqerl/pull/94.diff","patch_url":"https://github.com/matehat/cqerl/pull/94.patch"},"body":"##### This is a work-in-progress PR for version 1.0\r\n\r\nSuggested changes:\r\n\r\n1. Make `hash` mode the default (addresses #49), and still support `pooler` mode when set explicitly\r\n2. Support multiple configured C* clusters (addresses #59), with simpler old-style \"single-cluster\" mode seamlessly supported\r\n3. Discuss if we can bake in token-aware policy (addresses #48)\r\n\r\n---\r\n\r\n##### Cluster support\r\n\r\nThe information about the members of a cluster is kept in a protected ets table, readable from the user's process, so no bottleneck is introduced in this mechanism, just one more hop to a ETS table.\r\n\r\n```erlang\r\n\r\n%% sys.config\r\n\r\n{cqerl, [ {cassandra_clusters, #{\r\n    change_log => [\r\n      { {\"123.123.123.123\", 9042}, [{keyspace, change_log}]},\r\n      { {\"124.124.124.124\", 9042}, [{keyspace, change_log}]}\r\n    ]\r\n}]}\r\n\r\n> cqerl_cluster:get_any_from_cluster(change_log).\r\n{ok, {<0.78.0>,#Ref<0.0.8.367>}}\r\n\r\n> cqerl_cluster:add_clients_to_cluster(messages, [\r\n    { {\"123.123.123.123\", 9042}, [{keyspace, messages}]},\r\n    { {\"124.124.124.124\", 9042}, [{keyspace, messages}]}\r\n]).\r\nok\r\n\r\n> cqerl_cluster:get_any_from_cluster(messages).\r\n{ok, {<0.73.0>,#Ref<0.0.8.366>}}\r\n```\r\n\r\n##### Simple clusters\r\n\r\n```erlang\r\n%% sys.config\r\n\r\n{cqerl, [ {cassandra_nodes, [\r\n      { {\"123.123.123.123\", 9042}, [{keyspace, change_log}]}\r\n]]}\r\n\r\n> cqerl_cluster:add_clients([\r\n    { {\"124.124.124.124\", 9042}, [{keyspace, change_log}]}\r\n]).\r\nok\r\n\r\n> cqerl_cluster:get_any().\r\n{ok, {<0.73.0>,#Ref<0.0.8.366>}}\r\n```"},"comment":{"url":"https://api.github.com/repos/matehat/cqerl/issues/comments/214589286","html_url":"https://github.com/matehat/cqerl/pull/94#issuecomment-214589286","issue_url":"https://api.github.com/repos/matehat/cqerl/issues/94","id":214589286,"user":{"login":"matehat","id":1283,"avatar_url":"https://avatars.githubusercontent.com/u/1283?v=3","gravatar_id":"","url":"https://api.github.com/users/matehat","html_url":"https://github.com/matehat","followers_url":"https://api.github.com/users/matehat/followers","following_url":"https://api.github.com/users/matehat/following{/other_user}","gists_url":"https://api.github.com/users/matehat/gists{/gist_id}","starred_url":"https://api.github.com/users/matehat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matehat/subscriptions","organizations_url":"https://api.github.com/users/matehat/orgs","repos_url":"https://api.github.com/users/matehat/repos","events_url":"https://api.github.com/users/matehat/events{/privacy}","received_events_url":"https://api.github.com/users/matehat/received_events","type":"User","site_admin":false},"created_at":"2016-04-26T02:35:15Z","updated_at":"2016-04-26T02:35:15Z","body":"About the exposed API, would you see it exposed as `cqerl:get_client/0,1`?"}}