I have some game assignments that perform lengthy actions (say 10 seconds).
Some of what they need needs a db transaction, and some don't.
Since the whole job is a single transaction, I will have a long open db transaction, which is not good practice.
What is the best way to split work into multiple transactions? Should I use JPAPlugin closeTx and then startTx?
I do not think that a long-running db request is so bad. However, it is bad that the HTTP thread will block other threads during this time.
, suspend, HTTP , , , http .
, Play 1.2 ( -), FutureTasks .
, Job, HTTP-.
, , ( ), ( Job Future) . , .
, , . - , , , . , , .
(, ), :)