[ 
https://issues.apache.org/jira/browse/CASSANDRA-197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12713091#action_12713091
 ] 

Jun Rao commented on CASSANDRA-197:
-----------------------------------

I feel like that we are mixing the discussion of things at different levels. As 
a result, it is hard to see where the disagreement is. So, Let me step back and 
put an outline for further discussion.

1. Should we expose any locality to the client?

2. If we agree that some sort of locality is needed, what is the right api 
(independent of the implementation) to support such locality? I see two options 
here: expose per key locality or expose the whole ring map.

3. Finally what is the right way to implement locality? One option is to use 
thrift. With this option, the client has to pull periodically to refresh 
locality information. Another option is to extend MessageService. With this 
option, the server can potentially push new locality information to the client 
(when changes occur).

Let's discuss each of these a bit further and see if we can reach an agreement.

Here is my opinion on those.
For 1, I strongly support exposing locality to clients for better performance. 
Some of my preliminary tests showed up to 50% improvement for simple get_column 
calls when locality is enabled.

For 2, I favor exposing the whole ring map. The main reason is that this makes 
invalidating locations cached at the client easier and potentially cheaper.

For 3, I can see the benefit of using extended MessageService. I am not exactly 
sure what it takes to implement such an extension though.



> Expose ring map to client for more direct access
> ------------------------------------------------
>
>                 Key: CASSANDRA-197
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-197
>             Project: Cassandra
>          Issue Type: New Feature
>            Reporter: Jun Rao
>            Assignee: Jun Rao
>         Attachments: issue197.patchv1
>
>
> For certain applications, it would be nice if a read is sent to a node that 
> owns the data locally. This saves an extra network hop. To do that, a client 
> will need to cache the ring map and use it to figure out the nodes owning a 
> row.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to