Bindings, Platforms, and Innovation
This presentation focuses on the Internet and separating myth from fact, history from the future, and the mundane from the imaginative. Bob Frankston presents a vision of what could and should be.
Tracking change and innovation in the enterprise software development community
Posted by Alexander Olaru on Jan 10, 2008 01:00 PM
Historically transaction-processing systems have relied primarily, if not solely, on databases to handle the ACID aspects of any IO activities that required to be transactional. The support for transactions for file system operations has been weak at either the libraries/frameworks, languages or file system levels. Lately, this situation is starting to show signs of improvement.Certain file systems operations (file rename, deletion, etc.) are atomic when considered individually but, to date, few solutions have emerged as alternatives for providing a comprehensive set of APIs to support the full range of file IO operations in a transaction based context. Applications that perform file operations (e.g. creating, modifying, renaming, deleting files) which needed to be executed sequentially as part of a transaction had to often rely on custom build solutions to reduce the likelihood of an inconsistent state in the event of system/application crashes or concurrent access.
A range of applications could benefit from more robust, full-featured transaction support for file-systems:
Some of the most notable efforts towards progress in this area represented by:
In an MSDN Magazine article, Jason Olson, Technical Evangelist at Microsoft, explains the main features of TxF which is a new feature that introduces the concept of transacting file operations into Windows Vista and the next version of Windows Server (‘Longhorn’). According to Jason, the main goals are:
Improved application stability:
Transactional NTFS enables better application stability by reducing or eliminating the amount of error-handling code that needs to be written and maintained for a given application. This ultimately reduces application complexity and makes the application easier to test … Without transactional file operations, it would be nearly impossible to account for every possible failure scenario, up to and including the operating system crashing at any imaginable point during the process.
Improved platform stability:
...this is achieved by some of the ways that Microsoft is using TxF in its own technologies. There are three core features in Windows Vista and Windows Server "Longhorn" that now make use of Transactional NTFS: Windows Update, System Restore, and Task Scheduler. All of these use TxF to write files to the file system within the scope of a transaction in order to handle rollback/commit in case of any exceptions, such as a system reboot due to a loss of power.
Increased innovation:
TxF drives innovation by providing a framework for using transactions outside of SQL calls. Ultimately, Transactional NTFS can fundamentally change the way developers write applications, allowing them to build more robust code. By incorporating transactions into your design, you can write code without having to account for every single possible failure that can occur.
As TxF is build on top of the Kernel Transaction Manager (KTM) and the KTM can work directly with the Microsoft Distributed Transaction Coordinator. Jason describes that the developer can enlist transacted file operations with other technologies that are using XA-Transactions: SQL operations, Web Service calls via WS-Atomic Transaction or MSMQ operations - thus allowing the file system to participate in XA Transactions.
Concepts similiar to TxF have also been implemented in Vista's and Longhorn's Transactional Registry. References to potential pereformance impacts are also mentioned in the article: "TxF has a strictly pay-to-play model. If you aren’t using transacted file operations, there is no overhead." He adds that TxF is optimized for commit.
An Apache project, the Commons Transaction aims, among other things, at providing a transactional access to file systems in a manner that is agnostic of the file system provider/implementation. This is achieved through a Java library whose API features ACID transactions on the file system using a pessimistic locking schema. A blog on myjavatricks.com presents a few of the Commons Transaction concepts and examples of performing basic file operations in a transactional manner in Java.
A central component of the Commons Transaction context is the FileResourceManager which starts transactions, coordinates the file operations - copy, create, delete, move, write - on the resources/files it manages, prepares and commits the transactions. At initialization time the FileResourceManager is supplied the:
Upon startup the FileResourceManager will attempt to rollback any incomplete transactions unless the transaction was already in the process of committing when the system crashed or when it encountered an unrecoverable problem, in which case it will try to roll-forward the transaction. In case a transaction cannot be recovered - i.e. can not be either rolled-back or rolled-forward - the whole working directory is marked by the FileResourceManger as "dirty" and no more changes are allowed to it until the issue is resolved. The logger provided when the FileResourceManager is instantiated will typically supply the information that allows a manual recovery from a "dirty" state.
Even if the Commons Transaction will not turn a file system into an XA compliant resource, if file system transactions are needed in your applications, in the opinion of the blog author the library "...is probably better then any custom mechanism you can come up with."
Although there still is a long way to go until transactions within file systems can be supported similarly to database environments, at least some implementations have started to emerge and they are poised to provide more viable solutions to this still problematic area for the developers.
Performance Management and Diagnostics in Distributed Java and .NET Applications
Comprehensive Threat Protection for REST, SOA, and Web 2.0 Applications
The Agile Business Analyst: Skills and Techniques needed for Agile
This presentation focuses on the Internet and separating myth from fact, history from the future, and the mundane from the imaginative. Bob Frankston presents a vision of what could and should be.
This article explores the use of JBoss and jBPM to implement design solutions that effectively address the issue of orchestrating long running activities.
This presentation covers the use of graph databases as an optimal solution for data that is difficult to fit in static tables, rapidly evolving data or data that has a lot of optional attributes.
This session introduces Real Options and shows how it can help in running your project. Real Options is a decision-making process that can be used to manage risk.
This article discusses the use of bindings on services and references (including the instance of non-configured bindings) as the means to implement SCA communications in a Web and SOA environment.
After a short introduction to DSLs, Scott Davis plays with the keyboard showing how to approach the creation of a DSL by typing working snippets of Groovy code that get executed.
IBM Rational and InfoQ present, Scaling Agile with C/ALM, an eBook showing organizations how to become “finely tuned software delivery machines” by enabling team integration and scaling.
Amanda Laucher presents a real life enterprise application written in F#. She shows actual code snippets, explaining design decisions and suggesting how to use some of the F# constructs.
1 comment
Watch Thread Reply