Eventual consistency

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Eventual consistency

Marc Worrell
Hi,

Is there a way that an application can know that a read document has reached consistency?  

I assume that a value has reached consistency when the following are true:
1. All nodes are available.
2. All reached nodes agree on the version of the document.
3. There is no new document in a queue on a node that still needs to be submitted and is not consulted during reads.

The I see is that (3) can only be known by either consulting all nodes, or receiving a signal when the new document is being copied to another node.

Knowing about consistency allows to add caching on the client.  This greatly boosts performance for many types of applications and especially web sites.

Kind Regards,

Marc Worrell


_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Reply | Threaded
Open this post in threaded view
|

Re: Eventual consistency

Alexander Sicular
Set your R value equal to your N value when you read from Riak. Or if  
you want to know while you are writing, consult the W/DW values. -
Alexander


@siculars on twitter
http://siculars.posterous.com

Sent from my iPhone

On Apr 13, 2010, at 3:14, Marc Worrell <[hidden email]> wrote:

> Hi,
>
> Is there a way that an application can know that a read document has  
> reached consistency?
>
> I assume that a value has reached consistency when the following are  
> true:
> 1. All nodes are available.
> 2. All reached nodes agree on the version of the document.
> 3. There is no new document in a queue on a node that still needs to  
> be submitted and is not consulted during reads.
>
> The I see is that (3) can only be known by either consulting all  
> nodes, or receiving a signal when the new document is being copied  
> to another node.
>
> Knowing about consistency allows to add caching on the client.  This  
> greatly boosts performance for many types of applications and  
> especially web sites.
>
> Kind Regards,
>
> Marc Worrell
>
>
> _______________________________________________
> riak-users mailing list
> [hidden email]
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com