On Fri, Jun 6, 2008 at 2:05 PM, Johan Svensson <[EMAIL PROTECTED]> wrote: > > Also in the next few days we will merge in the "transaction fix" > branch that ties locking to transactions instead of threads. This > means you can run two transactions in the same thread using JTA > suspend/resume.
Could the JTA suspend/resume functionality be used to better support long running transactions? Or will long running transactions still be inefficient? The case I want to support is: 1. Load up a transaction, maybe create a few nodes. 2. Suspend the transaction for an undefined amount of time. 3. [0 or more times] resume the transaction and do some minor actions, create a few nodes and relationships. Then suspend the transaction again. 4. Resume the transaction and perform a larger set of actions (at least as big as an action in step 3, but most likely a lot more), create nodes/relationships, remove nodes/relationships, update properties. 5. Commit the transaction. (No suspending between step 4 and 5). Probably half of the work or more will be performed in step 4-5. For really small transactions step 1 might be as big as step 4, but the larger the transaction, the more of it will be done in steps 3-5. The problem is of course that the time from step 1 to step 4 is unknown. It would be great if we could use the suspend/resume functionality to make this use case more efficient. Perhaps (if memory usage is the problem with our support for long running transactions) push some of the changes in the suspended transactions to some intermediate, temporary, state on disk. Am I hoping for too much here or could this be supported? Because it could make the Qi4j-plug-in a lot better. I wrote the code for it in a dream this night, and it's great. It will definitely work, simplifying a lot of things on the Qi4j-user side of things, while still supporting small updates to huge datasets, which is an area where the current plug-in excels, but at the cost of some inconvenience for the user. -- Tobias Ivarsson <[EMAIL PROTECTED]> Hacker, Neo Technology www.neotechnology.com Cellphone: +46 706 534857 _______________________________________________ Neo mailing list [email protected] https://lists.neo4j.org/mailman/listinfo/user

