Comments (8)
The tricky thing about this is that there is some DynamoDB-specific logic that needs to be dealt with - and leaving this up to the user unnecessarily burdens them IMO.
Some examples of the sorts of things that other client libraries deal with:
https://github.com/amazonwebservices/aws-sdk-for-php/blob/master/sdk.class.php#L936-977
https://github.com/boto/boto/blob/develop/boto/dynamodb/layer1.py#L150-179
https://github.com/teleportd/node-dynamodb/blob/master/lib/ddb.js#L918-950
So it might be OK to exclude this from the lib - but I think it would be really nice to include an example of the things you need to keep in mind when retrying, or even better, a util to do the retrying so that users can opt in.
from dynamo.
good points, @mhart, and thanks for the other references. it seems there's enough consensus here.
how about this: we handle all retry logic according to best practices (backoff, etc) for the next
function, but allow the user to decide whether to call it or not. thoughts?
from dynamo.
I guess I haven't used it enough in production yet to know what the most likely use case would be.
My main question is: when would you not want to retry? Are there any examples you know of using the other APIs where the retry has somehow bitten people? (... checks Google ... can't find anything - the only cases I could imagine it would be a problem would be the non-idempotent ones, incrementing counters, non-conditional updates, etc)
from dynamo.
it's not that you wouldn't want to retry so much as you may want to retry on your own terms. but the more i think about it, the less i'm inclined to expose it. perhaps setting maxRetries
for a client is enough?
from dynamo.
Yeah - I think that'd be perfect - then if someone doesn't want to (which I'm pretty sure would not be the norm), then they can specify 0 maxRetries
or whatever.
from dynamo.
Perhaps down the track you could allow tuning of the backoff, allow a retry function to be passed in, something like that.
from dynamo.
by the way, this has been added to jed/dynamo-client@efd8e0d.
from dynamo.
Schweeet
from dynamo.
Related Issues (20)
- createClient() with optional sessionToken HOT 3
- writing multibyte characters creates invalidserviceexceptions HOT 4
- Feature request: Deleting items HOT 3
- require table schema HOT 3
- keep track of capacity units
- support BatchWriteItems in the high-level API HOT 1
- add support for other zones HOT 2
- Predicates + Update.when() HOT 3
- please tag versions on github HOT 3
- Update with an attribute set to zero does not work HOT 2
- item.save(callback) not implemented HOT 1
- How can I use pagination?
- High level Api no longer usable? HOT 5
- item.destroy doesn't actually do anything HOT 2
- AWS SDK - Doesn't seem as good as your library HOT 1
- error while retrieving and adding data HOT 2
- error getting started
- publish latest to npm HOT 2
- schema specification shouldn't rely on object key order HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dynamo.