Hazelcast and CAP Theory

1,531 views
Skip to first unread message

Guizmo

unread,
Sep 11, 2011, 12:54:26 PM9/11/11
to Hazelcast
Hello,

I looked at Hzaelcast FAQ here http://code.google.com/p/hazelcast/wiki/FAQ
and from the answer to the question "Where you stand given CAP
Theorem?" i understand, maybe completly wrong, that Hazecast is the
first one i know having a CA approach towards CAP theorem.

I won't tell what i think on this but what the others think, for
example the article "NoSQL Databases: What, Why, and When" =>
http://nosql.mypopescu.com/post/6412803549/nosql-databases-what-why-and-when.
The slides of the presentation reveals that, from their point of view
and experience, we can't sacrifice partition tolerance, so we have to
deal with either CP or AP which is the opposite of what we find in
your FAQ.

My question are then simple :
- How do you understand their "partitions can't be ignored ?"
- How do you deal with it ? ie what is your answer in practise ?

Regards

Fuad Malikov

unread,
Sep 12, 2011, 9:21:02 AM9/12/11
to haze...@googlegroups.com
Hazelcast is AP actually. When P occurs it gives up C. But until then it preserves C. However there are some NoSQL solutuins that gives up consistency from the beginning. A system that have asynchronous backup and can read from backup gives up consistency from the beginning and defines itself as AP too.
That's why we say that Hazelcast gives up C only if A occurs.

I recommend to read the article by Henry Robinson from Cloudera
http://www.cloudera.com/blog/2010/04/cap-confusion-problems-with-partition-tolerance/


Fuad
http://twitter.com/fuadm





--
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To post to this group, send email to haze...@googlegroups.com.
To unsubscribe from this group, send email to hazelcast+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/hazelcast?hl=en.


Guizmo

unread,
Sep 15, 2011, 1:01:16 PM9/15/11
to Hazelcast
Thanks Fuad

On 12 sep, 15:21, Fuad Malikov <f...@hazelcast.com> wrote:
> Hazelcast is AP actually. When P occurs it gives up C. But until then it
> preserves C. However there are some NoSQL solutuins that gives up
> consistency from the beginning. A system that have asynchronous backup and
> can read from backup gives up consistency from the beginning and defines
> itself as AP too.
> That's why we say that Hazelcast gives up C only if A occurs.
>
> I recommend to read the article by Henry Robinson from Clouderahttp://www.cloudera.com/blog/2010/04/cap-confusion-problems-with-part...
>
> Fuadhttp://twitter.com/fuadm
>
>
>
> On Sun, Sep 11, 2011 at 7:54 PM, Guizmo <cloudbe...@gmail.com> wrote:
> > Hello,
>
> > I looked at Hzaelcast FAQ herehttp://code.google.com/p/hazelcast/wiki/FAQ
> > and from the answer to the question "Where you stand given CAP
> > Theorem?" i understand, maybe completly wrong, that Hazecast is the
> > first one i know having a CA approach towards CAP theorem.
>
> > I won't tell what i think on this but what the others think, for
> > example the article "NoSQL Databases: What, Why, and When" =>
>
> >http://nosql.mypopescu.com/post/6412803549/nosql-databases-what-why-a...
> > .
> > The slides of the presentation reveals that, from their point of view
> > and experience, we can't sacrifice partition tolerance, so we have to
> > deal with either CP or AP which is the opposite of what we find in
> > your FAQ.
>
> > My question are then simple :
> > - How do you understand their "partitions can't be ignored ?"
> > - How do you deal with it ? ie what is your answer in practise ?
>
> > Regards
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Hazelcast" group.
> > To post to this group, send email to haze...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > hazelcast+...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/hazelcast?hl=en.- Masquer le texte des messages précédents -
>
> - Afficher le texte des messages précédents -

Nils Kilden-Pedersen

unread,
Nov 17, 2011, 4:24:17 PM11/17/11
to haze...@googlegroups.com
Hazelcast is AP actually. When P occurs it gives up C

Can you describe what effect that will have on clients of AtomicNumber?

Thanks,
Nils

Talip Ozturk

unread,
Nov 23, 2011, 5:17:12 AM11/23/11
to haze...@googlegroups.com
When P occurs, you will have separate clusters, each with its own
separate AtomicNumber instance. Your named AtomicNumber is no longer
really unique and atomic.

http://twitter.com/oztalip

> --
> You received this message because you are subscribed to the Google Groups
> "Hazelcast" group.

> To view this discussion on the web visit
> https://groups.google.com/d/msg/hazelcast/-/youcuLlfxccJ.

Nils Kilden-Pedersen

unread,
Nov 23, 2011, 9:23:04 AM11/23/11
to haze...@googlegroups.com
On Wed, Nov 23, 2011 at 4:17 AM, Talip Ozturk <ta...@hazelcast.com> wrote:
When P occurs, you will have separate clusters, each with its own
separate AtomicNumber instance. Your named AtomicNumber is no longer
really unique and atomic.

Ok, that's what I was afraid of. Is there any way to change that situation, e.g. failing A by detecting failure of C? What I mean is, in such a situation, I would rather have complete failure than duplicate atomic numbers.

Talip Ozturk

unread,
Nov 23, 2011, 9:36:06 AM11/23/11
to haze...@googlegroups.com
I don't know any 'really clean way' of detecting such failure but you
can probably listen for membership changes and if X number of nodes
leaves the cluster in Y seconds then you shutdown all nodes. No... I
don't like my suggestion.

http://twitter.com/oztalip

> --
> You received this message because you are subscribed to the Google Groups
> "Hazelcast" group.

Nils Kilden-Pedersen

unread,
Nov 23, 2011, 10:02:29 AM11/23/11
to haze...@googlegroups.com
I can see how that's an impossible situation to fix in a P2P protocol.

But it should probably be documented in the docs. To me, it makes AtomicNumber practically useless, because it becomes the equivalent of i++.

Thanks.

Zack Radick

unread,
Nov 28, 2011, 2:24:41 PM11/28/11
to haze...@googlegroups.com
It would be great in my opinion if Hazelcast had a way to configure a "hazelcast.cluster.majority.size" similar to the "hazelcast.initial.min.cluster.size" that would cause an instance to go dormant when the cluster size dropped below the configured threshold (generally n/2+1).  I wrote something into my software that does this to prevent unfortunate side-effects of partitioning with the way I am using HC but would much rather it was part of the core.  Personally I would be perfectly happy if all operations blocked when the configured number of nodes were no longer reachable.
Cheers,
--Zack

Talip Ozturk

unread,
Nov 28, 2011, 5:00:28 PM11/28/11
to haze...@googlegroups.com
Sounds good. Please create an issue for this at
http://code.google.com/p/hazelcast/issues/ so that we can keep track.

http://twitter.com/oztalip

Zack Radick

unread,
Nov 28, 2011, 5:45:09 PM11/28/11
to haze...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages