-
Notifications
You must be signed in to change notification settings - Fork 312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: add ‘BATCH_GET’ rpc request for read optimization #884
Comments
Consider whether there is a more general resolution to support all operations, including get, set, del and so on. One example you can refer to checkAndMutate, which can batch send different Refer to struct batch_request
{
...
1:list<request> batch_list;
...
}
struct request {
1:operation_type operation; // it is very important, you need judge the request type
2: base.blob hash_key // this is diff from checkAndmutate, which don't include it
3:base.blob sort_key;
4:base.blob value;
5:i32 set_expire_ts_seconds;
} On server side, you just need one method to judge This just is one suggestion, I haven't make sure whether it is feasible, However, I think the interface should be as general as possible, rather than one requirement need one interface. |
You may need provide two rdb type for |
Thank you, it is very helpful to me; I will think more roughly and come up with a more considerable solution, when this is done, i'll consult you for later 'niubility' advise |
I feel that adding a batch interface that mixes read, write, and delete operations is not very appropriate, for the following reasons:
|
checkAndMutate is a SET type interface in all cases, it is different from batchGet/Set/Del interfaces.
So I support to distinguish these RPCs, and try to avoid overdesign. |
1
Some explanations added before as follow:
So actually we need define 2
On the contrary, I think that using a unified interface will make code maintenance easier. In addition, we can refer https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_BatchWriteItem.html to consider it again 3
Haha, actually, I hope support I think may need others join to decide it. @neverchanje @hycdong @levy5307 @Smityz @GiantKing |
Doesn't dynamodb's BatchWriteItem API only operate on puts and deletes ? BatchGetItem is for get operations. |
Yeah, so I say that define two type, dynamodb don't have |
read operation only have 'one type' that is 'get'; so if i have not misunderstood your ideas, i can implement the "batch read" rpc interface based on following thrift definitions
it's almostly the same with what i have initally comed up; 'batch set' and ' batch del' rpc interface use common thrift definition and add a 'operation_type' field to the definition to differentiate them ? |
if i misunderstood you ideas, then i want chat with you in weixin; heihei |
Feature Request
Is your feature request related to a problem? Please describe:
We would like to implement a reading optimization interface for the pegasus client
Describe the feature you'd like:
the way we wanna to realize is as follows:
(1) first, on the server side, we add a read interface with the binding task code 'RPC_RRDB_RRDB_BATCH_GET'. This new interface of each server handles the reading of multiple items in the same partition. The items being requested can have different hashkey which is the key difference to the 'RPC_RRDB_RRDB_MULTI_GET' interface
(2) second, we realize a interface in the client side, taking java client as an example, the declaration is as following:
(3)the main design is as follows:
a、RPC_RRDB_RRDB_BATCH_GET request rpc protocol
b、The main process of the client side
Looking forward to your opinions!
Describe alternatives you've considered:
Teachability, Documentation, Adoption, Migration Strategy:
The text was updated successfully, but these errors were encountered: