You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cassandra.apache.org by Prasenjit Sarkar <pr...@datos.io> on 2016/10/07 18:02:07 UTC

Proprietary Replication Strategies: Cassandra Driver Support

Hi everyone,

To the best of my understanding that Datastax has proprietary replication
strategies: Local and Everywhere which are not part of the open source
Apache Cassandra project.

Do we know of any plans in the open source Cassandra driver community to
support these two replication strategies? Would Datastax have a licensing
concern if the open source driver community supported these strategies? I'm
fairly new here and would like to understand the dynamics.

Thanks,
Prasenjit

Re: Proprietary Replication Strategies: Cassandra Driver Support

Posted by Vladimir Yudovin <vl...@winguzone.com>.
Do you mean org.apache.cassandra.locator.LocalStrategy?
If yes it's standard Cassandra strategy use for system and system_schema keyspaces.

Best regards, Vladimir Yudovin, 
Winguzone - Hosted Cloud Cassandra on Azure and SoftLayer.
Launch your cluster in minutes.




---- On Fri, 07 Oct 2016 14:02:07 -0400 Prasenjit Sarkar &lt;prasenjit.sarkar@datos.io&gt; wrote ---- 

Hi everyone, 
 
To the best of my understanding that Datastax has proprietary replication 
strategies: Local and Everywhere which are not part of the open source 
Apache Cassandra project. 
 
Do we know of any plans in the open source Cassandra driver community to 
support these two replication strategies? Would Datastax have a licensing 
concern if the open source driver community supported these strategies? I'm 
fairly new here and would like to understand the dynamics. 
 
Thanks, 
Prasenjit 






Re: Proprietary Replication Strategies: Cassandra Driver Support

Posted by Prasenjit Sarkar <pr...@datos.io>.
Thanks, Jemeriah.

I'm aware of the change, we will use JIRAs to contribute back to the
community.

Prasenjit

On Fri, Oct 7, 2016 at 2:31 PM, J. D. Jordan <je...@gmail.com>
wrote:

> The Python driver does support it, it is supported as a custom strategy. I
> was the one to implement it in
>
> https://datastax-oss.atlassian.net/browse/PYTHON-191
>
> It makes the class for it on the fly.
>
> Not sure what else you want it to do, but if you have a suggestion for an
> improvement to a specific driver you should open up a ticket on that
> drivers JIRA.
>
> -Jeremiah
>
> > On Oct 7, 2016, at 4:06 PM, Prasenjit Sarkar <pr...@datos.io>
> wrote:
> >
> > Thanks Vlad and Jeremiah.
> >
> > There were questions about support, so let me address that in more
> detail.
> >
> > If I look at the latest Cassandra python driver, the support for
> > LocalStrategy is very limited (code snippet shown below) and the support
> > for EverywhereStrategy is non-existent. By limited I mean that the
> > Cassandra python driver only provides the name of the strategy for
> > LocalStrategy and not much else.
> >
> > What I would like (and happy to help) is for the Cassandra python driver
> to
> > provide support for Local and Everywhere to the same extent it is
> provided
> > for Simple and NetworkTopology. I understand that token aware routing is
> > not applicable to either strategy but I would like to get the replication
> > factors of the key-spaces using the strategies in the same way we get the
> > replication factors for Simple and NetworkTopology.
> >
> > Hope this helps,
> > Prasenjit
> >
> >
> > class LocalStrategy(ReplicationStrategy):
> > def __init__(self, options_map):
> > pass
> > def make_token_replica_map(self, token_to_host_owner, ring):
> > return {}
> > def export_for_schema(self):
> > """
> > Returns a string version of these replication options which are
> > suitable for use in a CREATE KEYSPACE statement.
> > """
> > return "{'class': 'LocalStrategy'}"
> > def __eq__(self, other):
> > return isinstance(other, LocalStrategy)
> >
> > On Fri, Oct 7, 2016 at 11:56 AM, Jeremiah D Jordan <
> > jeremiah.jordan@gmail.com> wrote:
> >
> >> What kind of support are you thinking of?  All drivers should support
> them
> >> already, drivers shouldn’t care about replication strategy except when
> >> trying to do token aware routing.
> >> But since anyone can make a custom replication strategy, drivers that do
> >> token aware routing just need to handle falling back to not doing token
> >> aware routing if a replication strategy they don’t know about is in use.
> >> All the open sources drivers I know of do this, so they should all
> >> “support” those strategies already.
> >>
> >> -Jeremiah
> >>
> >>> On Oct 7, 2016, at 1:02 PM, Prasenjit Sarkar <
> prasenjit.sarkar@datos.io>
> >> wrote:
> >>>
> >>> Hi everyone,
> >>>
> >>> To the best of my understanding that Datastax has proprietary
> replication
> >>> strategies: Local and Everywhere which are not part of the open source
> >>> Apache Cassandra project.
> >>>
> >>> Do we know of any plans in the open source Cassandra driver community
> to
> >>> support these two replication strategies? Would Datastax have a
> licensing
> >>> concern if the open source driver community supported these strategies?
> >> I'm
> >>> fairly new here and would like to understand the dynamics.
> >>>
> >>> Thanks,
> >>> Prasenjit
> >>
> >>
>

Re: Proprietary Replication Strategies: Cassandra Driver Support

Posted by "J. D. Jordan" <je...@gmail.com>.
The Python driver does support it, it is supported as a custom strategy. I was the one to implement it in

https://datastax-oss.atlassian.net/browse/PYTHON-191

It makes the class for it on the fly.

Not sure what else you want it to do, but if you have a suggestion for an improvement to a specific driver you should open up a ticket on that drivers JIRA.

-Jeremiah

> On Oct 7, 2016, at 4:06 PM, Prasenjit Sarkar <pr...@datos.io> wrote:
> 
> Thanks Vlad and Jeremiah.
> 
> There were questions about support, so let me address that in more detail.
> 
> If I look at the latest Cassandra python driver, the support for
> LocalStrategy is very limited (code snippet shown below) and the support
> for EverywhereStrategy is non-existent. By limited I mean that the
> Cassandra python driver only provides the name of the strategy for
> LocalStrategy and not much else.
> 
> What I would like (and happy to help) is for the Cassandra python driver to
> provide support for Local and Everywhere to the same extent it is provided
> for Simple and NetworkTopology. I understand that token aware routing is
> not applicable to either strategy but I would like to get the replication
> factors of the key-spaces using the strategies in the same way we get the
> replication factors for Simple and NetworkTopology.
> 
> Hope this helps,
> Prasenjit
> 
> 
> class LocalStrategy(ReplicationStrategy):
> def __init__(self, options_map):
> pass
> def make_token_replica_map(self, token_to_host_owner, ring):
> return {}
> def export_for_schema(self):
> """
> Returns a string version of these replication options which are
> suitable for use in a CREATE KEYSPACE statement.
> """
> return "{'class': 'LocalStrategy'}"
> def __eq__(self, other):
> return isinstance(other, LocalStrategy)
> 
> On Fri, Oct 7, 2016 at 11:56 AM, Jeremiah D Jordan <
> jeremiah.jordan@gmail.com> wrote:
> 
>> What kind of support are you thinking of?  All drivers should support them
>> already, drivers shouldn’t care about replication strategy except when
>> trying to do token aware routing.
>> But since anyone can make a custom replication strategy, drivers that do
>> token aware routing just need to handle falling back to not doing token
>> aware routing if a replication strategy they don’t know about is in use.
>> All the open sources drivers I know of do this, so they should all
>> “support” those strategies already.
>> 
>> -Jeremiah
>> 
>>> On Oct 7, 2016, at 1:02 PM, Prasenjit Sarkar <pr...@datos.io>
>> wrote:
>>> 
>>> Hi everyone,
>>> 
>>> To the best of my understanding that Datastax has proprietary replication
>>> strategies: Local and Everywhere which are not part of the open source
>>> Apache Cassandra project.
>>> 
>>> Do we know of any plans in the open source Cassandra driver community to
>>> support these two replication strategies? Would Datastax have a licensing
>>> concern if the open source driver community supported these strategies?
>> I'm
>>> fairly new here and would like to understand the dynamics.
>>> 
>>> Thanks,
>>> Prasenjit
>> 
>> 

Re: Proprietary Replication Strategies: Cassandra Driver Support

Posted by Ben Bromhead <be...@instaclustr.com>.
FYI there is an everywhere strategy waiting to be accepted:

https://issues.apache.org/jira/browse/CASSANDRA-12629

On Sat, 8 Oct 2016 at 10:56 Vladimir Yudovin <vl...@winguzone.com> wrote:

Well, it can be useful in some scenarios - e.g. temporary tables on nearest
or the same node.



Best regards, Vladimir Yudovin,

Winguzone - Hosted Cloud Cassandra on Azure and SoftLayer.

Launch your cluster in minutes.









---- On Sat, 08 Oct 2016 13:44:00 -0400 Jeff Jirsa&lt;jjirsa@gmail.com&gt;
wrote ----



I'm sure that's what he meant, I just disagree that it sounds useful



--

Jeff Jirsa





&gt; On Oct 8, 2016, at 10:33 AM, Vladimir Yudovin &lt;vladyu@winguzone.com&gt;
wrote:

&gt;

&gt; As far as I understand Edward meant to have option determinate actual
storage node on client side, by driver, disregarding key hash/tokens
mechanism.

&gt;

&gt; Best regards, Vladimir Yudovin,

&gt; Winguzone - Hosted Cloud Cassandra on Azure and SoftLayer.

&gt; Launch your cluster in minutes.

&gt;

&gt;

&gt;

&gt;

&gt; ---- On Sat, 08 Oct 2016 13:17:14 -0400 Jeff Jirsa &
amp;lt;jjirsa@gmail.com&amp;gt; wrote ----

&gt;

&gt; That sounds awful, especially since you could just use SimpleStrategy
with RF=1 and then bootstrap / decom would handle resharding for you as
expected.

&gt;

&gt; --

&gt; Jeff Jirsa

&gt;

&gt;

&gt; &amp;gt; On Oct 8, 2016, at 10:09 AM, Edward Capriolo &
amp;lt;edlinuxguru@gmail.com&amp;gt; wrote:

&gt; &amp;gt;

&gt; &amp;gt; I have contemplated using LocalStrategy as a "do it yourself
client side

&gt; &amp;gt; sharding system".

&gt; &amp;gt;

&gt; &amp;gt; On Sat, Oct 8, 2016 at 12:37 AM, Vladimir Yudovin &
amp;lt;vladyu@winguzone.com&amp;gt;

&gt; &amp;gt; wrote:

&gt; &amp;gt;

&gt; &amp;gt;&amp;gt; Hi Prasenjit,

&gt; &amp;gt;&amp;gt; I would like to get the replication factors of the
key-spaces using the

&gt; &amp;gt;&amp;gt; strategies in the same way we get the replication
factors for Simple and

&gt; &amp;gt;&amp;gt; NetworkTopology.

&gt; &amp;gt;&amp;gt; Actually LocalSarategy has no replication factor:

&gt; &amp;gt;&amp;gt;

&gt; &amp;gt;&amp;gt; SELECT * FROM system_schema.keyspaces WHERE
keyspace_name IN ('system',

&gt; &amp;gt;&amp;gt; 'system_schema');

&gt; &amp;gt;&amp;gt; keyspace_name | durable_writes | replication

&gt; &amp;gt;&amp;gt;
---------------+----------------+---------------------------

&gt; &amp;gt;&amp;gt; -----------------------------------------

&gt; &amp;gt;&amp;gt; system | True | {'class':

&gt; &amp;gt;&amp;gt; 'org.apache.cassandra.locator.LocalStrategy'}

&gt; &amp;gt;&amp;gt; system_schema | True | {'class':

&gt; &amp;gt;&amp;gt; 'org.apache.cassandra.locator.LocalStrategy'}

&gt; &amp;gt;&amp;gt;

&gt; &amp;gt;&amp;gt;

&gt; &amp;gt;&amp;gt; It's used for internal tables and not accessible to
users:

&gt; &amp;gt;&amp;gt;

&gt; &amp;gt;&amp;gt; CREATE KEYSPACE excel WITH replication = {'class':
'LocalStrategy'};

&gt; &amp;gt;&amp;gt; ConfigurationException: Unable to use given strategy
class: LocalStrategy

&gt; &amp;gt;&amp;gt; is reserved for internal use.

&gt; &amp;gt;&amp;gt;

&gt; &amp;gt;&amp;gt;

&gt; &amp;gt;&amp;gt; Best regards, Vladimir Yudovin,

&gt; &amp;gt;&amp;gt; Winguzone - Hosted Cloud Cassandra on Azure and
SoftLayer.

&gt; &amp;gt;&amp;gt; Launch your cluster in minutes.

&gt; &amp;gt;&amp;gt;

&gt; &amp;gt;&amp;gt;

&gt; &amp;gt;&amp;gt;

&gt; &amp;gt;&amp;gt;

&gt; &amp;gt;&amp;gt; ---- On Fri, 07 Oct 2016 17:06:09 -0400 Prasenjit

&gt; &amp;gt;&amp;gt; Sarkar&amp;amp;lt;prasenjit.sarkar@datos.io&amp;amp;gt;
wrote ----

&gt; &amp;gt;&amp;gt;

&gt; &amp;gt;&amp;gt; Thanks Vlad and Jeremiah.

&gt; &amp;gt;&amp;gt;

&gt; &amp;gt;&amp;gt; There were questions about support, so let me address
that in more detail.

&gt; &amp;gt;&amp;gt;

&gt; &amp;gt;&amp;gt; If I look at the latest Cassandra python driver, the
support for

&gt; &amp;gt;&amp;gt; LocalStrategy is very limited (code snippet shown
below) and the support

&gt; &amp;gt;&amp;gt; for EverywhereStrategy is non-existent. By limited I
mean that the

&gt; &amp;gt;&amp;gt; Cassandra python driver only provides the name of the
strategy for

&gt; &amp;gt;&amp;gt; LocalStrategy and not much else.

&gt; &amp;gt;&amp;gt;

&gt; &amp;gt;&amp;gt; What I would like (and happy to help) is for the
Cassandra python driver to

&gt; &amp;gt;&amp;gt; provide support for Local and Everywhere to the same
extent it is provided

&gt; &amp;gt;&amp;gt; for Simple and NetworkTopology. I understand that
token aware routing is

&gt; &amp;gt;&amp;gt; not applicable to either strategy but I would like to
get the replication

&gt; &amp;gt;&amp;gt; factors of the key-spaces using the strategies in the
same way we get the

&gt; &amp;gt;&amp;gt; replication factors for Simple and NetworkTopology.

&gt; &amp;gt;&amp;gt;

&gt; &amp;gt;&amp;gt; Hope this helps,

&gt; &amp;gt;&amp;gt; Prasenjit

&gt; &amp;gt;&amp;gt;

&gt; &amp;gt;&amp;gt;

&gt; &amp;gt;&amp;gt; class LocalStrategy(ReplicationStrategy):

&gt; &amp;gt;&amp;gt; def __init__(self, options_map):

&gt; &amp;gt;&amp;gt; pass

&gt; &amp;gt;&amp;gt; def make_token_replica_map(self, token_to_host_owner,
ring):

&gt; &amp;gt;&amp;gt; return {}

&gt; &amp;gt;&amp;gt; def export_for_schema(self):

&gt; &amp;gt;&amp;gt; """

&gt; &amp;gt;&amp;gt; Returns a string version of these replication options
which are

&gt; &amp;gt;&amp;gt; suitable for use in a CREATE KEYSPACE statement.

&gt; &amp;gt;&amp;gt; """

&gt; &amp;gt;&amp;gt; return "{'class': 'LocalStrategy'}"

&gt; &amp;gt;&amp;gt; def __eq__(self, other):

&gt; &amp;gt;&amp;gt; return isinstance(other, LocalStrategy)

&gt; &amp;gt;&amp;gt;

&gt; &amp;gt;&amp;gt; On Fri, Oct 7, 2016 at 11:56 AM, Jeremiah D Jordan
&amp;amp;lt;

&gt; &amp;gt;&amp;gt; jeremiah.jordan@gmail.com&amp;amp;gt; wrote:

&gt; &amp;gt;&amp;gt;

&gt; &amp;gt;&amp;gt; &amp;amp;gt; What kind of support are you thinking
of? All drivers should support

&gt; &amp;gt;&amp;gt; them

&gt; &amp;gt;&amp;gt; &amp;amp;gt; already, drivers shouldn’t care about
replication strategy except when

&gt; &amp;gt;&amp;gt; &amp;amp;gt; trying to do token aware routing.

&gt; &amp;gt;&amp;gt; &amp;amp;gt; But since anyone can make a custom
replication strategy, drivers that

&gt; &amp;gt;&amp;gt; do

&gt; &amp;gt;&amp;gt; &amp;amp;gt; token aware routing just need to handle
falling back to not doing

&gt; &amp;gt;&amp;gt; token

&gt; &amp;gt;&amp;gt; &amp;amp;gt; aware routing if a replication strategy
they don’t know about is in

&gt; &amp;gt;&amp;gt; use.

&gt; &amp;gt;&amp;gt; &amp;amp;gt; All the open sources drivers I know of
do this, so they should all

&gt; &amp;gt;&amp;gt; &amp;amp;gt; “support” those strategies already.

&gt; &amp;gt;&amp;gt; &amp;amp;gt;

&gt; &amp;gt;&amp;gt; &amp;amp;gt; -Jeremiah

&gt; &amp;gt;&amp;gt; &amp;amp;gt;

&gt; &amp;gt;&amp;gt; &amp;amp;gt; &amp;amp;gt; On Oct 7, 2016, at 1:02 PM,
Prasenjit Sarkar &amp;amp;

&gt; &amp;gt;&amp;gt; lt;prasenjit.sarkar@datos.io&amp;amp;gt;

&gt; &amp;gt;&amp;gt; &amp;amp;gt; wrote:

&gt; &amp;gt;&amp;gt; &amp;amp;gt; &amp;amp;gt;

&gt; &amp;gt;&amp;gt; &amp;amp;gt; &amp;amp;gt; Hi everyone,

&gt; &amp;gt;&amp;gt; &amp;amp;gt; &amp;amp;gt;

&gt; &amp;gt;&amp;gt; &amp;amp;gt; &amp;amp;gt; To the best of my
understanding that Datastax has proprietary

&gt; &amp;gt;&amp;gt; replication

&gt; &amp;gt;&amp;gt; &amp;amp;gt; &amp;amp;gt; strategies: Local and
Everywhere which are not part of the open

&gt; &amp;gt;&amp;gt; source

&gt; &amp;gt;&amp;gt; &amp;amp;gt; &amp;amp;gt; Apache Cassandra project.

&gt; &amp;gt;&amp;gt; &amp;amp;gt; &amp;amp;gt;

&gt; &amp;gt;&amp;gt; &amp;amp;gt; &amp;amp;gt; Do we know of any plans in
the open source Cassandra driver

&gt; &amp;gt;&amp;gt; community to

&gt; &amp;gt;&amp;gt; &amp;amp;gt; &amp;amp;gt; support these two
replication strategies? Would Datastax have a

&gt; &amp;gt;&amp;gt; licensing

&gt; &amp;gt;&amp;gt; &amp;amp;gt; &amp;amp;gt; concern if the open source
driver community supported these

&gt; &amp;gt;&amp;gt; strategies?

&gt; &amp;gt;&amp;gt; &amp;amp;gt; I'm

&gt; &amp;gt;&amp;gt; &amp;amp;gt; &amp;amp;gt; fairly new here and would
like to understand the dynamics.

&gt; &amp;gt;&amp;gt; &amp;amp;gt; &amp;amp;gt;

&gt; &amp;gt;&amp;gt; &amp;amp;gt; &amp;amp;gt; Thanks,

&gt; &amp;gt;&amp;gt; &amp;amp;gt; &amp;amp;gt; Prasenjit

&gt; &amp;gt;&amp;gt; &amp;amp;gt;

&gt; &amp;gt;&amp;gt; &amp;amp;gt;

&gt; &amp;gt;&amp;gt;

&gt; &amp;gt;&amp;gt;

&gt; &amp;gt;&amp;gt;

&gt; &amp;gt;&amp;gt;

&gt; &amp;gt;&amp;gt;

&gt; &amp;gt;&amp;gt;

&gt;

&gt;

&gt;

&gt;

&gt;











-- 
Ben Bromhead
CTO | Instaclustr <https://www.instaclustr.com/>
+1 650 284 9692
Managed Cassandra / Spark on AWS, Azure and Softlayer

Re: Proprietary Replication Strategies: Cassandra Driver Support

Posted by Vladimir Yudovin <vl...@winguzone.com>.
Well, it can be useful in some scenarios - e.g. temporary tables on nearest or the same node.

Best regards, Vladimir Yudovin, 
Winguzone - Hosted Cloud Cassandra on Azure and SoftLayer.
Launch your cluster in minutes.




---- On Sat, 08 Oct 2016 13:44:00 -0400 Jeff Jirsa&lt;jjirsa@gmail.com&gt; wrote ---- 

I'm sure that's what he meant, I just disagree that it sounds useful 
 
-- 
Jeff Jirsa 
 
 
&gt; On Oct 8, 2016, at 10:33 AM, Vladimir Yudovin &lt;vladyu@winguzone.com&gt; wrote: 
&gt; 
&gt; As far as I understand Edward meant to have option determinate actual storage node on client side, by driver, disregarding key hash/tokens mechanism. 
&gt; 
&gt; Best regards, Vladimir Yudovin, 
&gt; Winguzone - Hosted Cloud Cassandra on Azure and SoftLayer. 
&gt; Launch your cluster in minutes. 
&gt; 
&gt; 
&gt; 
&gt; 
&gt; ---- On Sat, 08 Oct 2016 13:17:14 -0400 Jeff Jirsa &amp;lt;jjirsa@gmail.com&amp;gt; wrote ---- 
&gt; 
&gt; That sounds awful, especially since you could just use SimpleStrategy with RF=1 and then bootstrap / decom would handle resharding for you as expected. 
&gt; 
&gt; -- 
&gt; Jeff Jirsa 
&gt; 
&gt; 
&gt; &amp;gt; On Oct 8, 2016, at 10:09 AM, Edward Capriolo &amp;lt;edlinuxguru@gmail.com&amp;gt; wrote: 
&gt; &amp;gt; 
&gt; &amp;gt; I have contemplated using LocalStrategy as a "do it yourself client side 
&gt; &amp;gt; sharding system". 
&gt; &amp;gt; 
&gt; &amp;gt; On Sat, Oct 8, 2016 at 12:37 AM, Vladimir Yudovin &amp;lt;vladyu@winguzone.com&amp;gt; 
&gt; &amp;gt; wrote: 
&gt; &amp;gt; 
&gt; &amp;gt;&amp;gt; Hi Prasenjit, 
&gt; &amp;gt;&amp;gt; I would like to get the replication factors of the key-spaces using the 
&gt; &amp;gt;&amp;gt; strategies in the same way we get the replication factors for Simple and 
&gt; &amp;gt;&amp;gt; NetworkTopology. 
&gt; &amp;gt;&amp;gt; Actually LocalSarategy has no replication factor: 
&gt; &amp;gt;&amp;gt; 
&gt; &amp;gt;&amp;gt; SELECT * FROM system_schema.keyspaces WHERE keyspace_name IN ('system', 
&gt; &amp;gt;&amp;gt; 'system_schema'); 
&gt; &amp;gt;&amp;gt; keyspace_name | durable_writes | replication 
&gt; &amp;gt;&amp;gt; ---------------+----------------+--------------------------- 
&gt; &amp;gt;&amp;gt; ----------------------------------------- 
&gt; &amp;gt;&amp;gt; system | True | {'class': 
&gt; &amp;gt;&amp;gt; 'org.apache.cassandra.locator.LocalStrategy'} 
&gt; &amp;gt;&amp;gt; system_schema | True | {'class': 
&gt; &amp;gt;&amp;gt; 'org.apache.cassandra.locator.LocalStrategy'} 
&gt; &amp;gt;&amp;gt; 
&gt; &amp;gt;&amp;gt; 
&gt; &amp;gt;&amp;gt; It's used for internal tables and not accessible to users: 
&gt; &amp;gt;&amp;gt; 
&gt; &amp;gt;&amp;gt; CREATE KEYSPACE excel WITH replication = {'class': 'LocalStrategy'}; 
&gt; &amp;gt;&amp;gt; ConfigurationException: Unable to use given strategy class: LocalStrategy 
&gt; &amp;gt;&amp;gt; is reserved for internal use. 
&gt; &amp;gt;&amp;gt; 
&gt; &amp;gt;&amp;gt; 
&gt; &amp;gt;&amp;gt; Best regards, Vladimir Yudovin, 
&gt; &amp;gt;&amp;gt; Winguzone - Hosted Cloud Cassandra on Azure and SoftLayer. 
&gt; &amp;gt;&amp;gt; Launch your cluster in minutes. 
&gt; &amp;gt;&amp;gt; 
&gt; &amp;gt;&amp;gt; 
&gt; &amp;gt;&amp;gt; 
&gt; &amp;gt;&amp;gt; 
&gt; &amp;gt;&amp;gt; ---- On Fri, 07 Oct 2016 17:06:09 -0400 Prasenjit 
&gt; &amp;gt;&amp;gt; Sarkar&amp;amp;lt;prasenjit.sarkar@datos.io&amp;amp;gt; wrote ---- 
&gt; &amp;gt;&amp;gt; 
&gt; &amp;gt;&amp;gt; Thanks Vlad and Jeremiah. 
&gt; &amp;gt;&amp;gt; 
&gt; &amp;gt;&amp;gt; There were questions about support, so let me address that in more detail. 
&gt; &amp;gt;&amp;gt; 
&gt; &amp;gt;&amp;gt; If I look at the latest Cassandra python driver, the support for 
&gt; &amp;gt;&amp;gt; LocalStrategy is very limited (code snippet shown below) and the support 
&gt; &amp;gt;&amp;gt; for EverywhereStrategy is non-existent. By limited I mean that the 
&gt; &amp;gt;&amp;gt; Cassandra python driver only provides the name of the strategy for 
&gt; &amp;gt;&amp;gt; LocalStrategy and not much else. 
&gt; &amp;gt;&amp;gt; 
&gt; &amp;gt;&amp;gt; What I would like (and happy to help) is for the Cassandra python driver to 
&gt; &amp;gt;&amp;gt; provide support for Local and Everywhere to the same extent it is provided 
&gt; &amp;gt;&amp;gt; for Simple and NetworkTopology. I understand that token aware routing is 
&gt; &amp;gt;&amp;gt; not applicable to either strategy but I would like to get the replication 
&gt; &amp;gt;&amp;gt; factors of the key-spaces using the strategies in the same way we get the 
&gt; &amp;gt;&amp;gt; replication factors for Simple and NetworkTopology. 
&gt; &amp;gt;&amp;gt; 
&gt; &amp;gt;&amp;gt; Hope this helps, 
&gt; &amp;gt;&amp;gt; Prasenjit 
&gt; &amp;gt;&amp;gt; 
&gt; &amp;gt;&amp;gt; 
&gt; &amp;gt;&amp;gt; class LocalStrategy(ReplicationStrategy): 
&gt; &amp;gt;&amp;gt; def __init__(self, options_map): 
&gt; &amp;gt;&amp;gt; pass 
&gt; &amp;gt;&amp;gt; def make_token_replica_map(self, token_to_host_owner, ring): 
&gt; &amp;gt;&amp;gt; return {} 
&gt; &amp;gt;&amp;gt; def export_for_schema(self): 
&gt; &amp;gt;&amp;gt; """ 
&gt; &amp;gt;&amp;gt; Returns a string version of these replication options which are 
&gt; &amp;gt;&amp;gt; suitable for use in a CREATE KEYSPACE statement. 
&gt; &amp;gt;&amp;gt; """ 
&gt; &amp;gt;&amp;gt; return "{'class': 'LocalStrategy'}" 
&gt; &amp;gt;&amp;gt; def __eq__(self, other): 
&gt; &amp;gt;&amp;gt; return isinstance(other, LocalStrategy) 
&gt; &amp;gt;&amp;gt; 
&gt; &amp;gt;&amp;gt; On Fri, Oct 7, 2016 at 11:56 AM, Jeremiah D Jordan &amp;amp;lt; 
&gt; &amp;gt;&amp;gt; jeremiah.jordan@gmail.com&amp;amp;gt; wrote: 
&gt; &amp;gt;&amp;gt; 
&gt; &amp;gt;&amp;gt; &amp;amp;gt; What kind of support are you thinking of? All drivers should support 
&gt; &amp;gt;&amp;gt; them 
&gt; &amp;gt;&amp;gt; &amp;amp;gt; already, drivers shouldn’t care about replication strategy except when 
&gt; &amp;gt;&amp;gt; &amp;amp;gt; trying to do token aware routing. 
&gt; &amp;gt;&amp;gt; &amp;amp;gt; But since anyone can make a custom replication strategy, drivers that 
&gt; &amp;gt;&amp;gt; do 
&gt; &amp;gt;&amp;gt; &amp;amp;gt; token aware routing just need to handle falling back to not doing 
&gt; &amp;gt;&amp;gt; token 
&gt; &amp;gt;&amp;gt; &amp;amp;gt; aware routing if a replication strategy they don’t know about is in 
&gt; &amp;gt;&amp;gt; use. 
&gt; &amp;gt;&amp;gt; &amp;amp;gt; All the open sources drivers I know of do this, so they should all 
&gt; &amp;gt;&amp;gt; &amp;amp;gt; “support” those strategies already. 
&gt; &amp;gt;&amp;gt; &amp;amp;gt; 
&gt; &amp;gt;&amp;gt; &amp;amp;gt; -Jeremiah 
&gt; &amp;gt;&amp;gt; &amp;amp;gt; 
&gt; &amp;gt;&amp;gt; &amp;amp;gt; &amp;amp;gt; On Oct 7, 2016, at 1:02 PM, Prasenjit Sarkar &amp;amp; 
&gt; &amp;gt;&amp;gt; lt;prasenjit.sarkar@datos.io&amp;amp;gt; 
&gt; &amp;gt;&amp;gt; &amp;amp;gt; wrote: 
&gt; &amp;gt;&amp;gt; &amp;amp;gt; &amp;amp;gt; 
&gt; &amp;gt;&amp;gt; &amp;amp;gt; &amp;amp;gt; Hi everyone, 
&gt; &amp;gt;&amp;gt; &amp;amp;gt; &amp;amp;gt; 
&gt; &amp;gt;&amp;gt; &amp;amp;gt; &amp;amp;gt; To the best of my understanding that Datastax has proprietary 
&gt; &amp;gt;&amp;gt; replication 
&gt; &amp;gt;&amp;gt; &amp;amp;gt; &amp;amp;gt; strategies: Local and Everywhere which are not part of the open 
&gt; &amp;gt;&amp;gt; source 
&gt; &amp;gt;&amp;gt; &amp;amp;gt; &amp;amp;gt; Apache Cassandra project. 
&gt; &amp;gt;&amp;gt; &amp;amp;gt; &amp;amp;gt; 
&gt; &amp;gt;&amp;gt; &amp;amp;gt; &amp;amp;gt; Do we know of any plans in the open source Cassandra driver 
&gt; &amp;gt;&amp;gt; community to 
&gt; &amp;gt;&amp;gt; &amp;amp;gt; &amp;amp;gt; support these two replication strategies? Would Datastax have a 
&gt; &amp;gt;&amp;gt; licensing 
&gt; &amp;gt;&amp;gt; &amp;amp;gt; &amp;amp;gt; concern if the open source driver community supported these 
&gt; &amp;gt;&amp;gt; strategies? 
&gt; &amp;gt;&amp;gt; &amp;amp;gt; I'm 
&gt; &amp;gt;&amp;gt; &amp;amp;gt; &amp;amp;gt; fairly new here and would like to understand the dynamics. 
&gt; &amp;gt;&amp;gt; &amp;amp;gt; &amp;amp;gt; 
&gt; &amp;gt;&amp;gt; &amp;amp;gt; &amp;amp;gt; Thanks, 
&gt; &amp;gt;&amp;gt; &amp;amp;gt; &amp;amp;gt; Prasenjit 
&gt; &amp;gt;&amp;gt; &amp;amp;gt; 
&gt; &amp;gt;&amp;gt; &amp;amp;gt; 
&gt; &amp;gt;&amp;gt; 
&gt; &amp;gt;&amp;gt; 
&gt; &amp;gt;&amp;gt; 
&gt; &amp;gt;&amp;gt; 
&gt; &amp;gt;&amp;gt; 
&gt; &amp;gt;&amp;gt; 
&gt; 
&gt; 
&gt; 
&gt; 
&gt; 






Re: Proprietary Replication Strategies: Cassandra Driver Support

Posted by Jeff Jirsa <jj...@gmail.com>.
I'm sure that's what he meant, I just disagree that it sounds useful

-- 
Jeff Jirsa


> On Oct 8, 2016, at 10:33 AM, Vladimir Yudovin <vl...@winguzone.com> wrote:
> 
> As far as I understand Edward meant to have option determinate actual storage node on client side, by driver, disregarding key hash/tokens mechanism.
> 
> Best regards, Vladimir Yudovin, 
> Winguzone - Hosted Cloud Cassandra on Azure and SoftLayer.
> Launch your cluster in minutes.
> 
> 
> 
> 
> ---- On Sat, 08 Oct 2016 13:17:14 -0400 Jeff Jirsa &lt;jjirsa@gmail.com&gt; wrote ---- 
> 
> That sounds awful, especially since you could just use SimpleStrategy with RF=1 and then bootstrap / decom would handle resharding for you as expected. 
> 
> -- 
> Jeff Jirsa 
> 
> 
> &gt; On Oct 8, 2016, at 10:09 AM, Edward Capriolo &lt;edlinuxguru@gmail.com&gt; wrote: 
> &gt; 
> &gt; I have contemplated using LocalStrategy as a "do it yourself client side 
> &gt; sharding system". 
> &gt; 
> &gt; On Sat, Oct 8, 2016 at 12:37 AM, Vladimir Yudovin &lt;vladyu@winguzone.com&gt; 
> &gt; wrote: 
> &gt; 
> &gt;&gt; Hi Prasenjit, 
> &gt;&gt; I would like to get the replication factors of the key-spaces using the 
> &gt;&gt; strategies in the same way we get the replication factors for Simple and 
> &gt;&gt; NetworkTopology. 
> &gt;&gt; Actually LocalSarategy has no replication factor: 
> &gt;&gt; 
> &gt;&gt; SELECT * FROM system_schema.keyspaces WHERE keyspace_name IN ('system', 
> &gt;&gt; 'system_schema'); 
> &gt;&gt; keyspace_name | durable_writes | replication 
> &gt;&gt; ---------------+----------------+--------------------------- 
> &gt;&gt; ----------------------------------------- 
> &gt;&gt; system | True | {'class': 
> &gt;&gt; 'org.apache.cassandra.locator.LocalStrategy'} 
> &gt;&gt; system_schema | True | {'class': 
> &gt;&gt; 'org.apache.cassandra.locator.LocalStrategy'} 
> &gt;&gt; 
> &gt;&gt; 
> &gt;&gt; It's used for internal tables and not accessible to users: 
> &gt;&gt; 
> &gt;&gt; CREATE KEYSPACE excel WITH replication = {'class': 'LocalStrategy'}; 
> &gt;&gt; ConfigurationException: Unable to use given strategy class: LocalStrategy 
> &gt;&gt; is reserved for internal use. 
> &gt;&gt; 
> &gt;&gt; 
> &gt;&gt; Best regards, Vladimir Yudovin, 
> &gt;&gt; Winguzone - Hosted Cloud Cassandra on Azure and SoftLayer. 
> &gt;&gt; Launch your cluster in minutes. 
> &gt;&gt; 
> &gt;&gt; 
> &gt;&gt; 
> &gt;&gt; 
> &gt;&gt; ---- On Fri, 07 Oct 2016 17:06:09 -0400 Prasenjit 
> &gt;&gt; Sarkar&amp;lt;prasenjit.sarkar@datos.io&amp;gt; wrote ---- 
> &gt;&gt; 
> &gt;&gt; Thanks Vlad and Jeremiah. 
> &gt;&gt; 
> &gt;&gt; There were questions about support, so let me address that in more detail. 
> &gt;&gt; 
> &gt;&gt; If I look at the latest Cassandra python driver, the support for 
> &gt;&gt; LocalStrategy is very limited (code snippet shown below) and the support 
> &gt;&gt; for EverywhereStrategy is non-existent. By limited I mean that the 
> &gt;&gt; Cassandra python driver only provides the name of the strategy for 
> &gt;&gt; LocalStrategy and not much else. 
> &gt;&gt; 
> &gt;&gt; What I would like (and happy to help) is for the Cassandra python driver to 
> &gt;&gt; provide support for Local and Everywhere to the same extent it is provided 
> &gt;&gt; for Simple and NetworkTopology. I understand that token aware routing is 
> &gt;&gt; not applicable to either strategy but I would like to get the replication 
> &gt;&gt; factors of the key-spaces using the strategies in the same way we get the 
> &gt;&gt; replication factors for Simple and NetworkTopology. 
> &gt;&gt; 
> &gt;&gt; Hope this helps, 
> &gt;&gt; Prasenjit 
> &gt;&gt; 
> &gt;&gt; 
> &gt;&gt; class LocalStrategy(ReplicationStrategy): 
> &gt;&gt; def __init__(self, options_map): 
> &gt;&gt; pass 
> &gt;&gt; def make_token_replica_map(self, token_to_host_owner, ring): 
> &gt;&gt; return {} 
> &gt;&gt; def export_for_schema(self): 
> &gt;&gt; """ 
> &gt;&gt; Returns a string version of these replication options which are 
> &gt;&gt; suitable for use in a CREATE KEYSPACE statement. 
> &gt;&gt; """ 
> &gt;&gt; return "{'class': 'LocalStrategy'}" 
> &gt;&gt; def __eq__(self, other): 
> &gt;&gt; return isinstance(other, LocalStrategy) 
> &gt;&gt; 
> &gt;&gt; On Fri, Oct 7, 2016 at 11:56 AM, Jeremiah D Jordan &amp;lt; 
> &gt;&gt; jeremiah.jordan@gmail.com&amp;gt; wrote: 
> &gt;&gt; 
> &gt;&gt; &amp;gt; What kind of support are you thinking of? All drivers should support 
> &gt;&gt; them 
> &gt;&gt; &amp;gt; already, drivers shouldn’t care about replication strategy except when 
> &gt;&gt; &amp;gt; trying to do token aware routing. 
> &gt;&gt; &amp;gt; But since anyone can make a custom replication strategy, drivers that 
> &gt;&gt; do 
> &gt;&gt; &amp;gt; token aware routing just need to handle falling back to not doing 
> &gt;&gt; token 
> &gt;&gt; &amp;gt; aware routing if a replication strategy they don’t know about is in 
> &gt;&gt; use. 
> &gt;&gt; &amp;gt; All the open sources drivers I know of do this, so they should all 
> &gt;&gt; &amp;gt; “support” those strategies already. 
> &gt;&gt; &amp;gt; 
> &gt;&gt; &amp;gt; -Jeremiah 
> &gt;&gt; &amp;gt; 
> &gt;&gt; &amp;gt; &amp;gt; On Oct 7, 2016, at 1:02 PM, Prasenjit Sarkar &amp; 
> &gt;&gt; lt;prasenjit.sarkar@datos.io&amp;gt;
> &gt;&gt; &amp;gt; wrote: 
> &gt;&gt; &amp;gt; &amp;gt; 
> &gt;&gt; &amp;gt; &amp;gt; Hi everyone, 
> &gt;&gt; &amp;gt; &amp;gt; 
> &gt;&gt; &amp;gt; &amp;gt; To the best of my understanding that Datastax has proprietary 
> &gt;&gt; replication 
> &gt;&gt; &amp;gt; &amp;gt; strategies: Local and Everywhere which are not part of the open 
> &gt;&gt; source 
> &gt;&gt; &amp;gt; &amp;gt; Apache Cassandra project. 
> &gt;&gt; &amp;gt; &amp;gt; 
> &gt;&gt; &amp;gt; &amp;gt; Do we know of any plans in the open source Cassandra driver 
> &gt;&gt; community to 
> &gt;&gt; &amp;gt; &amp;gt; support these two replication strategies? Would Datastax have a 
> &gt;&gt; licensing 
> &gt;&gt; &amp;gt; &amp;gt; concern if the open source driver community supported these 
> &gt;&gt; strategies? 
> &gt;&gt; &amp;gt; I'm 
> &gt;&gt; &amp;gt; &amp;gt; fairly new here and would like to understand the dynamics. 
> &gt;&gt; &amp;gt; &amp;gt; 
> &gt;&gt; &amp;gt; &amp;gt; Thanks, 
> &gt;&gt; &amp;gt; &amp;gt; Prasenjit 
> &gt;&gt; &amp;gt; 
> &gt;&gt; &amp;gt; 
> &gt;&gt; 
> &gt;&gt; 
> &gt;&gt; 
> &gt;&gt; 
> &gt;&gt; 
> &gt;&gt; 
> 
> 
> 
> 
> 

Re: Re: Proprietary Replication Strategies: Cassandra Driver Support

Posted by Vladimir Yudovin <vl...@winguzone.com>.
As far as I understand Edward meant to have option determinate actual storage node on client side, by driver, disregarding key hash/tokens mechanism.

Best regards, Vladimir Yudovin, 
Winguzone - Hosted Cloud Cassandra on Azure and SoftLayer.
Launch your cluster in minutes.




---- On Sat, 08 Oct 2016 13:17:14 -0400 Jeff Jirsa &lt;jjirsa@gmail.com&gt; wrote ---- 

That sounds awful, especially since you could just use SimpleStrategy with RF=1 and then bootstrap / decom would handle resharding for you as expected. 
 
-- 
Jeff Jirsa 
 
 
&gt; On Oct 8, 2016, at 10:09 AM, Edward Capriolo &lt;edlinuxguru@gmail.com&gt; wrote: 
&gt; 
&gt; I have contemplated using LocalStrategy as a "do it yourself client side 
&gt; sharding system". 
&gt; 
&gt; On Sat, Oct 8, 2016 at 12:37 AM, Vladimir Yudovin &lt;vladyu@winguzone.com&gt; 
&gt; wrote: 
&gt; 
&gt;&gt; Hi Prasenjit, 
&gt;&gt; I would like to get the replication factors of the key-spaces using the 
&gt;&gt; strategies in the same way we get the replication factors for Simple and 
&gt;&gt; NetworkTopology. 
&gt;&gt; Actually LocalSarategy has no replication factor: 
&gt;&gt; 
&gt;&gt; SELECT * FROM system_schema.keyspaces WHERE keyspace_name IN ('system', 
&gt;&gt; 'system_schema'); 
&gt;&gt; keyspace_name | durable_writes | replication 
&gt;&gt; ---------------+----------------+--------------------------- 
&gt;&gt; ----------------------------------------- 
&gt;&gt; system | True | {'class': 
&gt;&gt; 'org.apache.cassandra.locator.LocalStrategy'} 
&gt;&gt; system_schema | True | {'class': 
&gt;&gt; 'org.apache.cassandra.locator.LocalStrategy'} 
&gt;&gt; 
&gt;&gt; 
&gt;&gt; It's used for internal tables and not accessible to users: 
&gt;&gt; 
&gt;&gt; CREATE KEYSPACE excel WITH replication = {'class': 'LocalStrategy'}; 
&gt;&gt; ConfigurationException: Unable to use given strategy class: LocalStrategy 
&gt;&gt; is reserved for internal use. 
&gt;&gt; 
&gt;&gt; 
&gt;&gt; Best regards, Vladimir Yudovin, 
&gt;&gt; Winguzone - Hosted Cloud Cassandra on Azure and SoftLayer. 
&gt;&gt; Launch your cluster in minutes. 
&gt;&gt; 
&gt;&gt; 
&gt;&gt; 
&gt;&gt; 
&gt;&gt; ---- On Fri, 07 Oct 2016 17:06:09 -0400 Prasenjit 
&gt;&gt; Sarkar&amp;lt;prasenjit.sarkar@datos.io&amp;gt; wrote ---- 
&gt;&gt; 
&gt;&gt; Thanks Vlad and Jeremiah. 
&gt;&gt; 
&gt;&gt; There were questions about support, so let me address that in more detail. 
&gt;&gt; 
&gt;&gt; If I look at the latest Cassandra python driver, the support for 
&gt;&gt; LocalStrategy is very limited (code snippet shown below) and the support 
&gt;&gt; for EverywhereStrategy is non-existent. By limited I mean that the 
&gt;&gt; Cassandra python driver only provides the name of the strategy for 
&gt;&gt; LocalStrategy and not much else. 
&gt;&gt; 
&gt;&gt; What I would like (and happy to help) is for the Cassandra python driver to 
&gt;&gt; provide support for Local and Everywhere to the same extent it is provided 
&gt;&gt; for Simple and NetworkTopology. I understand that token aware routing is 
&gt;&gt; not applicable to either strategy but I would like to get the replication 
&gt;&gt; factors of the key-spaces using the strategies in the same way we get the 
&gt;&gt; replication factors for Simple and NetworkTopology. 
&gt;&gt; 
&gt;&gt; Hope this helps, 
&gt;&gt; Prasenjit 
&gt;&gt; 
&gt;&gt; 
&gt;&gt; class LocalStrategy(ReplicationStrategy): 
&gt;&gt; def __init__(self, options_map): 
&gt;&gt; pass 
&gt;&gt; def make_token_replica_map(self, token_to_host_owner, ring): 
&gt;&gt; return {} 
&gt;&gt; def export_for_schema(self): 
&gt;&gt; """ 
&gt;&gt; Returns a string version of these replication options which are 
&gt;&gt; suitable for use in a CREATE KEYSPACE statement. 
&gt;&gt; """ 
&gt;&gt; return "{'class': 'LocalStrategy'}" 
&gt;&gt; def __eq__(self, other): 
&gt;&gt; return isinstance(other, LocalStrategy) 
&gt;&gt; 
&gt;&gt; On Fri, Oct 7, 2016 at 11:56 AM, Jeremiah D Jordan &amp;lt; 
&gt;&gt; jeremiah.jordan@gmail.com&amp;gt; wrote: 
&gt;&gt; 
&gt;&gt; &amp;gt; What kind of support are you thinking of? All drivers should support 
&gt;&gt; them 
&gt;&gt; &amp;gt; already, drivers shouldn’t care about replication strategy except when 
&gt;&gt; &amp;gt; trying to do token aware routing. 
&gt;&gt; &amp;gt; But since anyone can make a custom replication strategy, drivers that 
&gt;&gt; do 
&gt;&gt; &amp;gt; token aware routing just need to handle falling back to not doing 
&gt;&gt; token 
&gt;&gt; &amp;gt; aware routing if a replication strategy they don’t know about is in 
&gt;&gt; use. 
&gt;&gt; &amp;gt; All the open sources drivers I know of do this, so they should all 
&gt;&gt; &amp;gt; “support” those strategies already. 
&gt;&gt; &amp;gt; 
&gt;&gt; &amp;gt; -Jeremiah 
&gt;&gt; &amp;gt; 
&gt;&gt; &amp;gt; &amp;gt; On Oct 7, 2016, at 1:02 PM, Prasenjit Sarkar &amp; 
&gt;&gt; lt;prasenjit.sarkar@datos.io&amp;gt; 
&gt;&gt; &amp;gt; wrote: 
&gt;&gt; &amp;gt; &amp;gt; 
&gt;&gt; &amp;gt; &amp;gt; Hi everyone, 
&gt;&gt; &amp;gt; &amp;gt; 
&gt;&gt; &amp;gt; &amp;gt; To the best of my understanding that Datastax has proprietary 
&gt;&gt; replication 
&gt;&gt; &amp;gt; &amp;gt; strategies: Local and Everywhere which are not part of the open 
&gt;&gt; source 
&gt;&gt; &amp;gt; &amp;gt; Apache Cassandra project. 
&gt;&gt; &amp;gt; &amp;gt; 
&gt;&gt; &amp;gt; &amp;gt; Do we know of any plans in the open source Cassandra driver 
&gt;&gt; community to 
&gt;&gt; &amp;gt; &amp;gt; support these two replication strategies? Would Datastax have a 
&gt;&gt; licensing 
&gt;&gt; &amp;gt; &amp;gt; concern if the open source driver community supported these 
&gt;&gt; strategies? 
&gt;&gt; &amp;gt; I'm 
&gt;&gt; &amp;gt; &amp;gt; fairly new here and would like to understand the dynamics. 
&gt;&gt; &amp;gt; &amp;gt; 
&gt;&gt; &amp;gt; &amp;gt; Thanks, 
&gt;&gt; &amp;gt; &amp;gt; Prasenjit 
&gt;&gt; &amp;gt; 
&gt;&gt; &amp;gt; 
&gt;&gt; 
&gt;&gt; 
&gt;&gt; 
&gt;&gt; 
&gt;&gt; 
&gt;&gt; 






Re: Proprietary Replication Strategies: Cassandra Driver Support

Posted by Jeff Jirsa <jj...@gmail.com>.
That sounds awful, especially since you could just use SimpleStrategy with RF=1 and then bootstrap / decom would handle resharding for you as expected.

-- 
Jeff Jirsa


> On Oct 8, 2016, at 10:09 AM, Edward Capriolo <ed...@gmail.com> wrote:
> 
> I have contemplated using LocalStrategy as a "do it yourself client side
> sharding system".
> 
> On Sat, Oct 8, 2016 at 12:37 AM, Vladimir Yudovin <vl...@winguzone.com>
> wrote:
> 
>> Hi Prasenjit,
>> I would like to get the replication factors of the key-spaces using the
>> strategies in the same way we get the replication factors for Simple and
>> NetworkTopology.
>> Actually LocalSarategy has no replication factor:
>> 
>> SELECT * FROM system_schema.keyspaces WHERE keyspace_name IN ('system',
>> 'system_schema');
>> keyspace_name | durable_writes | replication
>> ---------------+----------------+---------------------------
>> -----------------------------------------
>>        system       |                 True | {'class':
>> 'org.apache.cassandra.locator.LocalStrategy'}
>> system_schema |                 True | {'class':
>> 'org.apache.cassandra.locator.LocalStrategy'}
>> 
>> 
>> It's used for internal tables and not accessible to users:
>> 
>> CREATE KEYSPACE excel WITH replication = {'class': 'LocalStrategy'};
>> ConfigurationException: Unable to use given strategy class: LocalStrategy
>> is reserved for internal use.
>> 
>> 
>> Best regards, Vladimir Yudovin,
>> Winguzone - Hosted Cloud Cassandra on Azure and SoftLayer.
>> Launch your cluster in minutes.
>> 
>> 
>> 
>> 
>> ---- On Fri, 07 Oct 2016 17:06:09 -0400 Prasenjit
>> Sarkar&lt;prasenjit.sarkar@datos.io&gt; wrote ----
>> 
>> Thanks Vlad and Jeremiah.
>> 
>> There were questions about support, so let me address that in more detail.
>> 
>> If I look at the latest Cassandra python driver, the support for
>> LocalStrategy is very limited (code snippet shown below) and the support
>> for EverywhereStrategy is non-existent. By limited I mean that the
>> Cassandra python driver only provides the name of the strategy for
>> LocalStrategy and not much else.
>> 
>> What I would like (and happy to help) is for the Cassandra python driver to
>> provide support for Local and Everywhere to the same extent it is provided
>> for Simple and NetworkTopology. I understand that token aware routing is
>> not applicable to either strategy but I would like to get the replication
>> factors of the key-spaces using the strategies in the same way we get the
>> replication factors for Simple and NetworkTopology.
>> 
>> Hope this helps,
>> Prasenjit
>> 
>> 
>> class LocalStrategy(ReplicationStrategy):
>> def __init__(self, options_map):
>> pass
>> def make_token_replica_map(self, token_to_host_owner, ring):
>> return {}
>> def export_for_schema(self):
>> """
>> Returns a string version of these replication options which are
>> suitable for use in a CREATE KEYSPACE statement.
>> """
>> return "{'class': 'LocalStrategy'}"
>> def __eq__(self, other):
>> return isinstance(other, LocalStrategy)
>> 
>> On Fri, Oct 7, 2016 at 11:56 AM, Jeremiah D Jordan &lt;
>> jeremiah.jordan@gmail.com&gt; wrote:
>> 
>> &gt; What kind of support are you thinking of? All drivers should support
>> them
>> &gt; already, drivers shouldn’t care about replication strategy except when
>> &gt; trying to do token aware routing.
>> &gt; But since anyone can make a custom replication strategy, drivers that
>> do
>> &gt; token aware routing just need to handle falling back to not doing
>> token
>> &gt; aware routing if a replication strategy they don’t know about is in
>> use.
>> &gt; All the open sources drivers I know of do this, so they should all
>> &gt; “support” those strategies already.
>> &gt;
>> &gt; -Jeremiah
>> &gt;
>> &gt; &gt; On Oct 7, 2016, at 1:02 PM, Prasenjit Sarkar &
>> lt;prasenjit.sarkar@datos.io&gt;
>> &gt; wrote:
>> &gt; &gt;
>> &gt; &gt; Hi everyone,
>> &gt; &gt;
>> &gt; &gt; To the best of my understanding that Datastax has proprietary
>> replication
>> &gt; &gt; strategies: Local and Everywhere which are not part of the open
>> source
>> &gt; &gt; Apache Cassandra project.
>> &gt; &gt;
>> &gt; &gt; Do we know of any plans in the open source Cassandra driver
>> community to
>> &gt; &gt; support these two replication strategies? Would Datastax have a
>> licensing
>> &gt; &gt; concern if the open source driver community supported these
>> strategies?
>> &gt; I'm
>> &gt; &gt; fairly new here and would like to understand the dynamics.
>> &gt; &gt;
>> &gt; &gt; Thanks,
>> &gt; &gt; Prasenjit
>> &gt;
>> &gt;
>> 
>> 
>> 
>> 
>> 
>> 

Re: Proprietary Replication Strategies: Cassandra Driver Support

Posted by Edward Capriolo <ed...@gmail.com>.
I have contemplated using LocalStrategy as a "do it yourself client side
sharding system".

On Sat, Oct 8, 2016 at 12:37 AM, Vladimir Yudovin <vl...@winguzone.com>
wrote:

> Hi Prasenjit,
> I would like to get the replication factors of the key-spaces using the
> strategies in the same way we get the replication factors for Simple and
> NetworkTopology.
>  Actually LocalSarategy has no replication factor:
>
> SELECT * FROM system_schema.keyspaces WHERE keyspace_name IN ('system',
> 'system_schema');
>  keyspace_name | durable_writes | replication
> ---------------+----------------+---------------------------
> -----------------------------------------
>         system       |                 True | {'class':
> 'org.apache.cassandra.locator.LocalStrategy'}
>  system_schema |                 True | {'class':
> 'org.apache.cassandra.locator.LocalStrategy'}
>
>
> It's used for internal tables and not accessible to users:
>
> CREATE KEYSPACE excel WITH replication = {'class': 'LocalStrategy'};
> ConfigurationException: Unable to use given strategy class: LocalStrategy
> is reserved for internal use.
>
>
> Best regards, Vladimir Yudovin,
> Winguzone - Hosted Cloud Cassandra on Azure and SoftLayer.
> Launch your cluster in minutes.
>
>
>
>
> ---- On Fri, 07 Oct 2016 17:06:09 -0400 Prasenjit
> Sarkar&lt;prasenjit.sarkar@datos.io&gt; wrote ----
>
> Thanks Vlad and Jeremiah.
>
> There were questions about support, so let me address that in more detail.
>
> If I look at the latest Cassandra python driver, the support for
> LocalStrategy is very limited (code snippet shown below) and the support
> for EverywhereStrategy is non-existent. By limited I mean that the
> Cassandra python driver only provides the name of the strategy for
> LocalStrategy and not much else.
>
> What I would like (and happy to help) is for the Cassandra python driver to
> provide support for Local and Everywhere to the same extent it is provided
> for Simple and NetworkTopology. I understand that token aware routing is
> not applicable to either strategy but I would like to get the replication
> factors of the key-spaces using the strategies in the same way we get the
> replication factors for Simple and NetworkTopology.
>
> Hope this helps,
> Prasenjit
>
>
> class LocalStrategy(ReplicationStrategy):
> def __init__(self, options_map):
> pass
> def make_token_replica_map(self, token_to_host_owner, ring):
> return {}
> def export_for_schema(self):
> """
> Returns a string version of these replication options which are
> suitable for use in a CREATE KEYSPACE statement.
> """
> return "{'class': 'LocalStrategy'}"
> def __eq__(self, other):
> return isinstance(other, LocalStrategy)
>
> On Fri, Oct 7, 2016 at 11:56 AM, Jeremiah D Jordan &lt;
> jeremiah.jordan@gmail.com&gt; wrote:
>
> &gt; What kind of support are you thinking of? All drivers should support
> them
> &gt; already, drivers shouldn’t care about replication strategy except when
> &gt; trying to do token aware routing.
> &gt; But since anyone can make a custom replication strategy, drivers that
> do
> &gt; token aware routing just need to handle falling back to not doing
> token
> &gt; aware routing if a replication strategy they don’t know about is in
> use.
> &gt; All the open sources drivers I know of do this, so they should all
> &gt; “support” those strategies already.
> &gt;
> &gt; -Jeremiah
> &gt;
> &gt; &gt; On Oct 7, 2016, at 1:02 PM, Prasenjit Sarkar &
> lt;prasenjit.sarkar@datos.io&gt;
> &gt; wrote:
> &gt; &gt;
> &gt; &gt; Hi everyone,
> &gt; &gt;
> &gt; &gt; To the best of my understanding that Datastax has proprietary
> replication
> &gt; &gt; strategies: Local and Everywhere which are not part of the open
> source
> &gt; &gt; Apache Cassandra project.
> &gt; &gt;
> &gt; &gt; Do we know of any plans in the open source Cassandra driver
> community to
> &gt; &gt; support these two replication strategies? Would Datastax have a
> licensing
> &gt; &gt; concern if the open source driver community supported these
> strategies?
> &gt; I'm
> &gt; &gt; fairly new here and would like to understand the dynamics.
> &gt; &gt;
> &gt; &gt; Thanks,
> &gt; &gt; Prasenjit
> &gt;
> &gt;
>
>
>
>
>
>

Re: Proprietary Replication Strategies: Cassandra Driver Support

Posted by Vladimir Yudovin <vl...@winguzone.com>.
Hi Prasenjit,
I would like to get the replication factors of the key-spaces using the strategies in the same way we get the replication factors for Simple and NetworkTopology. 
 Actually LocalSarategy has no replication factor:

SELECT * FROM system_schema.keyspaces WHERE keyspace_name IN ('system', 'system_schema');
 keyspace_name | durable_writes | replication 
---------------+----------------+--------------------------------------------------------------------
        system       |                 True | {'class': 'org.apache.cassandra.locator.LocalStrategy'}
 system_schema |                 True | {'class': 'org.apache.cassandra.locator.LocalStrategy'}


It's used for internal tables and not accessible to users:

CREATE KEYSPACE excel WITH replication = {'class': 'LocalStrategy'};
ConfigurationException: Unable to use given strategy class: LocalStrategy is reserved for internal use.


Best regards, Vladimir Yudovin, 
Winguzone - Hosted Cloud Cassandra on Azure and SoftLayer.
Launch your cluster in minutes.




---- On Fri, 07 Oct 2016 17:06:09 -0400 Prasenjit Sarkar&lt;prasenjit.sarkar@datos.io&gt; wrote ---- 

Thanks Vlad and Jeremiah. 
 
There were questions about support, so let me address that in more detail. 
 
If I look at the latest Cassandra python driver, the support for 
LocalStrategy is very limited (code snippet shown below) and the support 
for EverywhereStrategy is non-existent. By limited I mean that the 
Cassandra python driver only provides the name of the strategy for 
LocalStrategy and not much else. 
 
What I would like (and happy to help) is for the Cassandra python driver to 
provide support for Local and Everywhere to the same extent it is provided 
for Simple and NetworkTopology. I understand that token aware routing is 
not applicable to either strategy but I would like to get the replication 
factors of the key-spaces using the strategies in the same way we get the 
replication factors for Simple and NetworkTopology. 
 
Hope this helps, 
Prasenjit 
 
 
class LocalStrategy(ReplicationStrategy): 
def __init__(self, options_map): 
pass 
def make_token_replica_map(self, token_to_host_owner, ring): 
return {} 
def export_for_schema(self): 
""" 
Returns a string version of these replication options which are 
suitable for use in a CREATE KEYSPACE statement. 
""" 
return "{'class': 'LocalStrategy'}" 
def __eq__(self, other): 
return isinstance(other, LocalStrategy) 
 
On Fri, Oct 7, 2016 at 11:56 AM, Jeremiah D Jordan &lt; 
jeremiah.jordan@gmail.com&gt; wrote: 
 
&gt; What kind of support are you thinking of? All drivers should support them 
&gt; already, drivers shouldn’t care about replication strategy except when 
&gt; trying to do token aware routing. 
&gt; But since anyone can make a custom replication strategy, drivers that do 
&gt; token aware routing just need to handle falling back to not doing token 
&gt; aware routing if a replication strategy they don’t know about is in use. 
&gt; All the open sources drivers I know of do this, so they should all 
&gt; “support” those strategies already. 
&gt; 
&gt; -Jeremiah 
&gt; 
&gt; &gt; On Oct 7, 2016, at 1:02 PM, Prasenjit Sarkar &lt;prasenjit.sarkar@datos.io&gt; 
&gt; wrote: 
&gt; &gt; 
&gt; &gt; Hi everyone, 
&gt; &gt; 
&gt; &gt; To the best of my understanding that Datastax has proprietary replication 
&gt; &gt; strategies: Local and Everywhere which are not part of the open source 
&gt; &gt; Apache Cassandra project. 
&gt; &gt; 
&gt; &gt; Do we know of any plans in the open source Cassandra driver community to 
&gt; &gt; support these two replication strategies? Would Datastax have a licensing 
&gt; &gt; concern if the open source driver community supported these strategies? 
&gt; I'm 
&gt; &gt; fairly new here and would like to understand the dynamics. 
&gt; &gt; 
&gt; &gt; Thanks, 
&gt; &gt; Prasenjit 
&gt; 
&gt; 






Re: Proprietary Replication Strategies: Cassandra Driver Support

Posted by Prasenjit Sarkar <pr...@datos.io>.
Thanks Vlad and Jeremiah.

There were questions about support, so let me address that in more detail.

If I look at the latest Cassandra python driver, the support for
LocalStrategy is very limited (code snippet shown below) and the support
for EverywhereStrategy is non-existent. By limited I mean that the
Cassandra python driver only provides the name of the strategy for
LocalStrategy and not much else.

What I would like (and happy to help) is for the Cassandra python driver to
provide support for Local and Everywhere to the same extent it is provided
for Simple and NetworkTopology. I understand that token aware routing is
not applicable to either strategy but I would like to get the replication
factors of the key-spaces using the strategies in the same way we get the
replication factors for Simple and NetworkTopology.

Hope this helps,
Prasenjit


class LocalStrategy(ReplicationStrategy):
def __init__(self, options_map):
pass
def make_token_replica_map(self, token_to_host_owner, ring):
return {}
def export_for_schema(self):
"""
Returns a string version of these replication options which are
suitable for use in a CREATE KEYSPACE statement.
"""
return "{'class': 'LocalStrategy'}"
def __eq__(self, other):
return isinstance(other, LocalStrategy)

On Fri, Oct 7, 2016 at 11:56 AM, Jeremiah D Jordan <
jeremiah.jordan@gmail.com> wrote:

> What kind of support are you thinking of?  All drivers should support them
> already, drivers shouldn’t care about replication strategy except when
> trying to do token aware routing.
> But since anyone can make a custom replication strategy, drivers that do
> token aware routing just need to handle falling back to not doing token
> aware routing if a replication strategy they don’t know about is in use.
> All the open sources drivers I know of do this, so they should all
> “support” those strategies already.
>
> -Jeremiah
>
> > On Oct 7, 2016, at 1:02 PM, Prasenjit Sarkar <pr...@datos.io>
> wrote:
> >
> > Hi everyone,
> >
> > To the best of my understanding that Datastax has proprietary replication
> > strategies: Local and Everywhere which are not part of the open source
> > Apache Cassandra project.
> >
> > Do we know of any plans in the open source Cassandra driver community to
> > support these two replication strategies? Would Datastax have a licensing
> > concern if the open source driver community supported these strategies?
> I'm
> > fairly new here and would like to understand the dynamics.
> >
> > Thanks,
> > Prasenjit
>
>

Re: Proprietary Replication Strategies: Cassandra Driver Support

Posted by Jeremiah D Jordan <je...@gmail.com>.
What kind of support are you thinking of?  All drivers should support them already, drivers shouldn’t care about replication strategy except when trying to do token aware routing.
But since anyone can make a custom replication strategy, drivers that do token aware routing just need to handle falling back to not doing token aware routing if a replication strategy they don’t know about is in use.
All the open sources drivers I know of do this, so they should all “support” those strategies already.

-Jeremiah

> On Oct 7, 2016, at 1:02 PM, Prasenjit Sarkar <pr...@datos.io> wrote:
> 
> Hi everyone,
> 
> To the best of my understanding that Datastax has proprietary replication
> strategies: Local and Everywhere which are not part of the open source
> Apache Cassandra project.
> 
> Do we know of any plans in the open source Cassandra driver community to
> support these two replication strategies? Would Datastax have a licensing
> concern if the open source driver community supported these strategies? I'm
> fairly new here and would like to understand the dynamics.
> 
> Thanks,
> Prasenjit