HeadspaceMeditation / beyonce

Type-safe DynamoDB query builder for TypeScript. Designed with single-table architecture in mind.
Apache License 2.0
6 stars 5 forks source link

feat: Automatically split large batchGet calls into concurrent requests #59

Closed jcarver989 closed 3 years ago

jcarver989 commented 3 years ago

What's in this PR? This PR makes a change to batchGet to automatically split DynamoDB calls into N concurrent requests, if the caller asks for more than 100 keys at once.

Dynamo supports retrieving a max of 100 keys at a time. So, this should make things easier on consumers. Now they can ask for more than 100 items without having to do the request splitting themselves.

Some future work here would be to allow partial success of batchGets. Right now we'll throw an error if any one of the concurrent requests fails.

jcarver989 commented 3 years ago

but just wanted to say "thanks" since this will make it easier on clients.

@gbryan -- I'm not as altruistic on this one as you may think. We're the client in this case! :)

gbryan commented 3 years ago

We're the client in this case! :)

:) Yeah, I just mean "code outside of Vault that is calling Vault."