Challenge 4 Question

Is it possible to solve it without inter node communication?

Trying not to give away too much, but my solution uses the sequentially consistent kv store and also sends some data between nodes.

Is it possible to come up with a solution that only uses the sequentially consistent kv store as means of communication?

Yes, there is a way to solve the Grow-Only Counter challenge without nodes talking to each other. Inter-node communication is one option though. I’m happy to offer a hint as well but I don’t want to spoil the fun either. :slight_smile:

@benbjohnson piggybacking again. may I ask for the hint to solution w/o inter-node communication please? :smiley: i think it’s late enough to feel bad about spoilers :sweat_smile:

also, is the compare in key-value CAS operation comparing against a linearizable-consistent value or one that is only sequentially-consistent as well? this seems irrelevant and overkill if it was so.

@arhyth actually, in the problem you are asked to use SeqCon KV storage which is implemented on top of your cluster. Thus, actually, you will be communicating with the other nodes even if you are not doing it explicitly.

The keywords of the ideas that will help you to come up with the solution you are looking for are:

- state-based conflict-free replicated data type (CvRDT)

Don’t google for it if you don’t want the answer straight away. Rather think of how and what you can store in the KV storage such that it’s not conflicting per node but then when you want to get your value (read) you can somehow merge what you have in your KV into something consistent.

2 Likes

@johnkoepi thanks so much for the not-so-giveaway and still very helpful response :pray: you are right. i was having trouble because i was “communicating” bare values