Re: Transactions for File I/O?

Tech-Archive recommends: Fix windows errors by optimizing your registry



Thanks Jani.




Jani Järvinen [MVP] wrote:
Hello,

Part of the operations I need to do in this transaction include some
writing to the file system (deleting a file / creating a file).
There is no way to rollback changes to the file system correct?

If you need to have transactional support on the file system, then you need
to take a different approach than using DTC. Windows Vista and the future
server operating system version of Vista ("Longhorn") does provide a
technology called Transactional NTFS (TxF), which is using a feature called
The Kernel Transaction Manager (KTM). Currently, there's no managed API
wrapper for these APIs (as far as I know), although you could use P/Invoke
to call these APIs. See here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/KTM/fs/ktm_start_page.asp

My opinion is that if you require real transactions on the file system, then
use KTM on Vista. Of course, that is easily more said than done because you
probably require your application to work on Windows XP, Windows Server
2003, etc. as well. In that case, think about the approach used by many SQL
databases like Microsoft SQL Server, which use an internal log file to
implement transactions even though the operating system doesn't guarantee
that file operations succeed.

Hope this helps.

--
Regards,

Mr. Jani Järvinen
C# MVP
Helsinki, Finland
janij@xxxxxxxxxxxxxxxxxxxxxx
http://www.saunalahti.fi/janij/

.



Relevant Pages

  • Shared Disk/Transactional/Distributed file system (GSoC Proposal)
    ... I want to make an OpenVMS inspired file system. ... Another question is whether to make it a pure record oriented I/O file ... file system would make the distributed lock manager's job much ... manage aborted transactions, or finished transactions etc. ...
    (freebsd-hackers)
  • Re: Supercomputers and Dawn
    ... causing an inconsistent set of blocks to be written. ... When I wrote my file system ... dealing with the odd million million transactions. ...
    (comp.arch)
  • Re: Transactions for File I/O?
    ... writing to the file system. ... wrapper for these APIs, ... My opinion is that if you require real transactions on the file system, ... implement transactions even though the operating system doesn't guarantee ...
    (microsoft.public.dotnet.framework)
  • Prevayler
    ... I have done object serialization to file system ... before and what I've found is that with windows, ... is "cached speed" but with transactions over time (with large prevalent ... (which is the real issue I think with distributed data ...
    (comp.lang.java.programmer)
  • Re: reiser4 plugins
    ... No existing file system guarantees such behavior. ... Because to have such transactions databases pay huge price in both ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)