Featured Post

2005… Looking Back…

Should I say this was quite a eventful year! I don’t know… !! But, A Year Where I’ve met so many new faces across the world, from the sweetest of all to the scariest of all to the charismatic of all… A Year filled with travel, almost every weekend or alternate I was traveling… A...

Read More

Windows Vista: TxF – Transactional NTFS

Posted by Logu Krishnan | Posted in Microsoft | Posted on 23-10-2005

Tags: ,

0

Got the Windows Vista Beta 1 DVD’s Yday, somehow thought I shall not blog about those so-called cosmetic changes which people call as face-lift. I’m least bothered if there is a sidebar, or a glistening sparkling flashing window themes et al…  Instead I would blog on some real niche features of the OS, starting from File System, Kernel, Shells to the New Presentation, Communication Frameworks available.

 

Let us start with the changes in NTFS File System in Vista . Okay, How many times have your system crashed after installation of new software, hardware, updates, service packs, hand-tweaks…? How many times did you ever try to repair them…? How many times you just decided to re-format instead of fixing the problem…? How many times you’ve used those bloating memory hogging software’s that promise clean installations and un-installations…? Or if you write a installer software how do you handle clean installation and uninstallation, custom algorithms? What if u have to write a robot to do automatic renames and what if robot fails that takes your website down for a day? How many times you forgot to use enable system restore point, and have forgotten to set a restore point before a crucial upgrade…?

 

Have you ever thought how can this be solved? One obvious answer given was… live with it…

Have you ever thought how could these problems be solved ? If you are a software developer did you ever questioned why can’t I do something like database transactions in my file system?

And how about ability for programmers to do this programmatically ?

 

You got it, and we have a answer, Now NTFS Supports this quite neat feature called “TxF – Transactional NTFS”, to define this officially from MSDN,

<snip>

            Transactional NTFS (TxF) integrates transactions into the NTFS file system, which makes it easier for application developers and administrators to gracefully handle errors and preserve data integrity. TxF can participate in distributed transactions that the Distributed Transaction Coordinator (DTC) coordinates, which allows you to use TxF for the following:

  • Transactions that span multiple data stores, for example, a single transaction for file and SQL operations
  • Transactions that span multiple computers, for example, a single transaction for file updates on multiple computers

</snip>

 

Okay, but dosen’t this leads to the same old classic problem in databased, “Concurrent Updates” ? The answer is isolation. Also, TxF does Multi-Machine Updates. And has other predictable stuff like locking et al

 

Okay, being a programmer how should I use this ?  for basic, simple transaction management all you have to do is call “CreateTransaction” and “SetCurrentTransaction” Methods of Kernel Transaction Manager [KTM]

 

Windows Vista architecture has 2 Transaction managers

1. LightWeight Transaction Manager

2.Kernel Transaction Manager

 

 

Also, You get a managed namespace, System.Transaction Namespace, which directly supports KTM and TxF, [This is one of the key namespaces for Indigo, as this namespace can help you in transactions like OLE Transactions or WS-AtomicTransaction protocol]

 

I’m still yet to configure my system fully, and install other sdk stuff, so couldn’t write a program… let me post some simple code snippets on TxF soon…