Transactional File System

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Transactional File System

samyem
I was trying to look around to see if it may be possible to span my transaction scope to include file system operations. I have experimented around using the apache commons transaction and its FileResourceManager and saw how it can be turned into an XA resource with http://matthewneale.net/2008/11/27/an-xa-filesystem/ .

I have yet to try this with BTM but I was wondering if anyone else may have prior experience with this and offer any tips on binding together database, JMS and Filesystem together in the same transaction.

Thanks,
Samyem Tuladhar
Reply | Threaded
Open this post in threaded view
|

Re: Transactional File System

Ludovic Orban
Administrator
For now making the filesystem participate in XA transactions in a legend. As far as I know nothing I've seen, heard of or analyzed is even close from usable.

You're not the first one to look for a transactional filesystem, I've already looked into Commons Transactions and my conclusion back in time was that it's not a good basis to start from. Things may have changed but in all cases integrating it with BTM won't be a small task for at least one reason: BTM can not work with XA resources if it cannot guarantee the transactional outcome: recovery and all must work, a special layer must be written for that.

Even if the integration code not too much work (ehcache XA support has been implemented rather painlessly) testing all the important cases and finding a proper enlistment policy will take some real serious effort.

A bit of warning too: it may seem easier with other transaction managers as none of them are as strict as BTM with regards to the potentially incomplete or incorrect XA support provided by the resource. In plain English: a partial and broken implementation may seem to work with other transaction managers while in fact no transactional guarantee can be asserted.

Terracotta invested a lot to make ehcache properly support XA, don't expect to get anything viable on the cheap for a transactional filesystem.

If you have more questions / remarks / complains, feel free to reply. I'm fully open to discuss it and you may enlighten me on something I'm not aware of.

Ludovic
Reply | Threaded
Open this post in threaded view
|

Re: Transactional File System

samyem
Thanks a lot for the interesting response. I think in my case, it's better to have at least some basic notion of transaction than have nothing in place. So even if commons-transactions may not be as robust, it may be better than manually implementing something like that. Will post back if I have any new discovery on this topic.

Ludovic Orban wrote
For now making the filesystem participate in XA transactions in a legend. As far as I know nothing I've seen, heard of or analyzed is even close from usable.

You're not the first one to look for a transactional filesystem, I've already looked into Commons Transactions and my conclusion back in time was that it's not a good basis to start from. Things may have changed but in all cases integrating it with BTM won't be a small task for at least one reason: BTM can not work with XA resources if it cannot guarantee the transactional outcome: recovery and all must work, a special layer must be written for that.

Even if the integration code not too much work (ehcache XA support has been implemented rather painlessly) testing all the important cases and finding a proper enlistment policy will take some real serious effort.

A bit of warning too: it may seem easier with other transaction managers as none of them are as strict as BTM with regards to the potentially incomplete or incorrect XA support provided by the resource. In plain English: a partial and broken implementation may seem to work with other transaction managers while in fact no transactional guarantee can be asserted.

Terracotta invested a lot to make ehcache properly support XA, don't expect to get anything viable on the cheap for a transactional filesystem.

If you have more questions / remarks / complains, feel free to reply. I'm fully open to discuss it and you may enlighten me on something I'm not aware of.

Ludovic