Re: Using Cassandra as local db without cluster

2018-10-19 Thread Abdelkrim Fitouri
Thanks for the infos,

I will try aerospike also, they are always including a one node
installation on there benchmarking and are also talking about vertical
scalability.

Kind regards.


Le jeu. 18 oct. 2018 14:44, Aleksey Yeshchenko  a écrit :

> I agree with Jeff here.
>
> Furthermore, Cassandra should generally be your solution of last resort -
> if nothing else works out.
>
> In your case I’d try sqlite or leveldb (or rocksdb).
>
> > On 18 Oct 2018, at 11:46, Jeff Jirsa  wrote:
> >
> > I can’t think of a situation where I’d choose Cassandra as a database in
> a single-host use case (if you’re sure it’ll never be more than one
> machine).
> >
> > --
> > Jeff Jirsa
> >
> >
> >> On Oct 18, 2018, at 12:31 PM, Abdelkrim Fitouri 
> wrote:
> >>
> >> Hello,
> >>
> >> I am wondering if using cassandra as one local database without the
> cluster
> >> capabilities has a sens, (i cannot do multi node cluster due to a
> technical
> >> constraint)
> >>
> >> I have an application with a purpose to store a dynamic number of
> colones
> >> on each rows (thing that i cannot do with classical relational
> database),
> >> and i don't want to use documents based nosql database to avoid using
> Json
> >> marshal and unmarshal treatments...
> >>
> >> Does cassandra with only one node and with a well designer model based
> on
> >> queries and partition keys can lead to best performance than postgresql
> ?
> >>
> >> Does cassandra have some limitation about the size of data ? about the
> >> number of partition on a node ?
> >>
> >> Thanks for any details or help.
> >>
> >> --
> >>
> >> Best Regards.
> >
> > -
> > To unsubscribe, e-mail: dev-unsubscr...@cassandra.apache.org
> > For additional commands, e-mail: dev-h...@cassandra.apache.org
> >
>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@cassandra.apache.org
> For additional commands, e-mail: dev-h...@cassandra.apache.org
>
>


Re: Using Cassandra as local db without cluster

2018-10-18 Thread Abdelkrim Fitouri
>
> ---> Postgresql  allows you tu use array type or map type with dynamic
> number of records, provided of course that the cardinality of the
> collection is not "too" big
>

Thanks for these details, but what do you mean about the cardinality of the
collection is not too big ?

In my solution a collection can have between 5 elements and 500 elements
and an element is about 256 caracter.

Kind regards.

On Thu, Oct 18, 2018 at 12:31 PM Abdelkrim Fitouri 
> wrote:
>
> > Hello,
> >
> > I am wondering if using cassandra as one local database without the
> cluster
> > capabilities has a sens, (i cannot do multi node cluster due to a
> technical
> > constraint)
> >
> > I have an application with a purpose to store a dynamic number of colones
> > on each rows (thing that i cannot do with classical relational database),
> > and i don't want to use documents based nosql database to avoid using
> Json
> > marshal and unmarshal treatments...
> >
> > Does cassandra with only one node and with a well designer model based on
> > queries and partition keys can lead to best performance than postgresql ?
> >
> > Does cassandra have some limitation about the size of data ? about the
> > number of partition on a node ?
> >
> > Thanks for any details or help.
> >
> > --
> >
> > Best Regards.
> >
>


Using Cassandra as local db without cluster

2018-10-18 Thread Abdelkrim Fitouri
Hello,

I am wondering if using cassandra as one local database without the cluster
capabilities has a sens, (i cannot do multi node cluster due to a technical
constraint)

I have an application with a purpose to store a dynamic number of colones
on each rows (thing that i cannot do with classical relational database),
and i don't want to use documents based nosql database to avoid using Json
marshal and unmarshal treatments...

Does cassandra with only one node and with a well designer model based on
queries and partition keys can lead to best performance than postgresql ?

Does cassandra have some limitation about the size of data ? about the
number of partition on a node ?

Thanks for any details or help.

--

Best Regards.


Re: Difference between heartbeat and generation on a Gossip packet

2018-07-03 Thread Abdelkrim Fitouri
Hi Joe,

Thanks for the details it is more clear for me now !

Kind regards.
Abdelkarim.

Le jeu. 28 juin 2018 08:29, Joseph Lynch  a écrit :

> Hi Abdelkarim,
>
> Other people on this list are much more knowledgeable than me and can
> correct me if I'm wrong, but my understanding is that the combination of
> generation and version (aka heartbeat) form a logical clock tuple
> consisting of (generation, version) and that combination is the
> HeartBeatState.
>
> The generation is the really important part and roughly corresponds to the
> last start time of that particular Cassandra process in seconds since epoch
> plus any forced increments due to e.g. the gossiper stopping or starting
> (nodetool disable/enable gossip). The generation is further stored on disk
> in the system.local table so that during a crash or restart, even if the
> system's clock moves backwards, the Cassandra node's generation should
> never move backwards. Whenever a node's generation number changes it's
> considered a major gossip state update by other nodes because they have to
> do things like ensure they are speaking the right protocol version, compare
> schema, etc ... in addition to all the versioned state changes seen below.
>
> The version is a counter used to show the passage of time within a
> generation and is used to signal versioned gossip state changes. It starts
> at zero on process start and increases by one roughly every second. There
> are various pieces of metadata like a node's status, schema, rack, dc, host
> id, tokens, etc... which are all versioned using this version counter when
> they change (whatever shows up in nodetool gossipinfo is a good example of
> these states). When the gossiper is enabled, every second, each node
> increments
> their local version by one, picks another peer to gossip with, and sends
> out their map of versioned items to that peer; other nodes know to pick up
> any new data if the version has increased. Since nodes are all gossiping
> with each other, any update to one node's versioned data get's propagated
> out quickly even if that node may not have directly gossiped with everyone.
> Naturally, the version number only increases for a given generation, but if
> the generation changes the version moves backwards (resets to zero).
>
> So yea, think of (generation, version) as forming a logical clock which
> roughly corresponds to (~last process start in seconds since the epoch,
> ~seconds since last process start) for each node. This logical clock is
> used to create ordering in gossip state changes.
>
> Hope that was helpful,
> -Joey Lynch
>
> On Tue, Jun 26, 2018 at 3:09 PM Abdelkrim Fitouri 
> wrote:
>
> > Hello,
> >
> > I  am studying the gossip part on casssandra and wondering about the
> > difference between the heartbeat and generation data exchanged for the
> > autodiscovery.
> >
> > many thanks for any help.
> >
> > --
> >
> > Best Regards.
> >
> > Abdelkarim.
> >
>


Difference between heartbeat and generation on a Gossip packet

2018-06-26 Thread Abdelkrim Fitouri
Hello,

I  am studying the gossip part on casssandra and wondering about the
difference between the heartbeat and generation data exchanged for the
autodiscovery.

many thanks for any help.

-- 

Best Regards.

Abdelkarim.


Re: custom validation before replication

2017-11-16 Thread Abdelkrim Fitouri
ok please find bellow an example:

Lets suppose that i have a cassandra cluster of 4 nodes / one DC /
replication factor = 4, So in this architecture i have on full copy of the
data on each node.

Imagine now that one node have been hacked and in some way with full access
to cqlsh session, if data is changed on that node, data will be changed on
the three other, am i right ?

imagine now that i am able to know (using cryptographic bases) if one
column was modified by my API ( => normal way) or not ( => suspicious way),
and i want to execute this check function just before any replication of a
keyspace to avoid that all the replica will be affected by that and so a
rollback will be not easy and the integrity of all the system will be down,
the check will for example kill the local cassandra service ...

Hope that my question is more clear now.

Many thanks for any help.

2017-11-16 21:59 GMT+01:00 Nate McCall <zznat...@gmail.com>:

> On Fri, Nov 17, 2017 at 9:11 AM, Abdelkrim Fitouri <abdou@gmail.com>
> wrote:
> > Trigger does not resolve my problem because it is not a format validation
> > issue but an integrity constraint ...
> >
> > My purpose is to check data integrity before replication, by returning an
> > error and killing the service, so i am killing the node that is supposed
> to
> > replicate data after a write action ...
>
> I'm a little confused. Can you provide some specific examples of your
> requirements?
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@cassandra.apache.org
> For additional commands, e-mail: dev-h...@cassandra.apache.org
>
>


-- 

Cordialement / Best Regards.

*Abdelkarim FITOURI*

LPIC/CEH/ITIL

System And Security Engineer


RE: custom validation before replication

2017-11-16 Thread Abdelkrim Fitouri
Trigger does not resolve my problem because it is not a format validation
issue but an integrity constraint ...

My purpose is to check data integrity before replication, by returning an
error and killing the service, so i am killing the node that is supposed to
replicate data after a write action ...

Does that seems possible ?

Many thanks.

Le 16 nov. 2017 18:53, "Jacques-Henri Berthemet" <
jacques-henri.berthe...@genesys.com> a écrit :

Hi,

You can't prevent the replication because if you manage to return a failure
the other node will keep trying to send the data. What would be more
relevant is to prevent the modification in the first place. You could try
to implement a custom trigger and load it in Cassandra:
http://cassandra.apache.org/doc/latest/cql/triggers.html
https://github.com/apache/cassandra/tree/cassandra-3.11/examples/triggers

In your trigger implementation, you'll need to validate the data and throw
an exception if it does not meet your security settings. However, I don't
think you'll have access to the current username/role at this level.

It may be simpler for you to work with regular authentication and roles:
http://cassandra.apache.org/doc/latest/cql/security.html

Regards,
--
Jacques-Henri Berthemet

-Original Message-
From: Abdelkrim Fitouri [mailto:abdou@gmail.com]
Sent: jeudi 16 novembre 2017 18:31
To: dev@cassandra.apache.org
Subject: custom validation before replication

Hi,

I have some security constraint on a project, and i need to validate or
unvalidate changes made on a keyspace via cql or via an other ways before
replication.

for example in the case of multinode cluster with replication, if data was
changed locally using cqlsh, data will be replicated (that is normal
working way for cassandra)

is there a possibility to call a custom validation function just before
data replication ?

Many thanks for any help.

--

Best Regards.

-
To unsubscribe, e-mail: dev-unsubscr...@cassandra.apache.org
For additional commands, e-mail: dev-h...@cassandra.apache.org


custom validation before replication

2017-11-16 Thread Abdelkrim Fitouri
Hi,

I have some security constraint on a project, and i need to validate or
unvalidate changes made on a keyspace via cql or via an other ways before
replication.

for example in the case of multinode cluster with replication, if data was
changed locally using cqlsh, data will be replicated (that is normal
working way for cassandra)

is there a possibility to call a custom validation function just before
data replication ?

Many thanks for any help.

-- 

Best Regards.