Skip to content

Spring transaction support #29

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

Open
maxsap opened this issue Mar 30, 2016 · 6 comments
Open

Spring transaction support #29

maxsap opened this issue Mar 30, 2016 · 6 comments

Comments

@maxsap
Copy link

maxsap commented Mar 30, 2016

It would be most helpful to be able to wrap or even bind a dynamodb with a normal Spring @transactional method.

@derjust
Copy link
Owner

derjust commented Jul 25, 2016

@derjust
Copy link
Owner

derjust commented Dec 1, 2018

Finally some native support: https://aws.amazon.com/blogs/aws/new-amazon-dynamodb-transactions/

@boostchicken
Copy link

@derjust It's interesting, it allows you to tranact saves of multiple objects in a single dynamo call, which kind of flys in the face of how spring data does things. We are probably going to have a make a new type of repo that is "crud" for this since it could take pretty much any object.

Either that or use the Transactional annotations and do some translation on the backend to wrap all the calls together some how. Any thoughts?

@boostchicken
Copy link

To expand on that the existing Spring interfaces won't really work for this. There is no persistent connection to the database, beyond that there is no rollback, Amazons API just throws an exception if something is using that item in a transaction at the moment.

We are going to have to come up with a new pattern.........

@boostchicken
Copy link

boostchicken commented Dec 2, 2018

Also it's only supported in the DynamoDB Async client, (makes sense) and does not have support for the mapper, so if we want to do this we will really have to hit the drawing board

From the docs:
Transactional operations are not supported by DynamoDB Accelerator (DAX), DynamoDB local, or DynamoDB Mapper at this time.

@291277058
Copy link

291277058 commented Aug 7, 2020

To expand on that the existing Spring interfaces won't really work for this. There is no persistent connection to the database, beyond that there is no rollback, Amazons API just throws an exception if something is using that item in a transaction at the moment.

We are going to have to come up with a new pattern.........

I am thinking about this.I perferm use a threadlocal cache to cache the entity,and the id should generate at local server like snowflowId.My question is how to hit the cache when the query is complicated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants