Re: [play-framework] [java-2.2.x] One transaction - multiple requests

25 views
Skip to first unread message
Message has been deleted

Will Sargent

unread,
Sep 28, 2016, 2:29:57 PM9/28/16
to play-fr...@googlegroups.com
Hi Diego,

There are a couple of ways to do it -- generally, if you store all the events coming in --"create" / "update" etc -- until completion and do something called "event sourcing" then you will have the greatest number of options for how to terminate that long running process.  

On the front end, you can represent the task as a REST resource and inquire about its current state every so often using XHR.  There's a couple of different options there as well.





--
Will Sargent
Engineer, Lightbend, Inc.


On Wed, Sep 28, 2016 at 11:10 AM, Diego Espósito <diego92....@gmail.com> wrote:
Hello, I have the need to find a way to make a transaction live in multples http requests. I have a process which is triggered by a user on the front end, which involves a lot of creations and updates, my idea is to split them into multiple requests for the purpose of having a progress bar and inform the user who is performing this process. At the same time, I would like to make a big transaction for all these request  so if anything fault, make a roll back.

A first approach i came up with is to persist the transaction in RAM, the problem with this is that the server works in a high availability schema with multiple nodes and they don't share memory. Another idea is not create a large transaction and if something goes wrong make a roll back manually.  

I understand that the transaction lives in the database, so if there was a way to fetch the transaction initialized in another request, the problem would be solved.

Another thing I wonder is if this idea I have is good or if it is a bad practice.

Any ideas ?

Thank you

--
You received this message because you are subscribed to the Google Groups "Play Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framework+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/4d21e7a0-9e26-4afe-b521-fe809c279bcb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
Message has been deleted
0 new messages