Skip to main content
Select Page
Get a free trial
eXtremeDB/rt logo

Transactional File Mapping: Reliable Storage for Managed Flash Devices

Essential concepts

  • Transactional File Mapping (xFile™) enables ACID-compliant database operations on managed flash memory devices such as eMMC, UFS, and NVMe SSDs.
  • It integrates database transaction processing with the device’s built-in flash translation layers, which handle wear leveling, ECC, bad block management, and address mapping.
  • Delivers reliable, lower-latency transactions without the overhead of complex file systems.
  • Implements a copy-on-write (CoW), page-mapped committ and rollback mechanism to ensure database consistency and reliability.

What is Transactional File Mapping?

Transactional File Mapping is a key component of eXtremeDB/rt that enables transactional database operations on managed flash devices such as eMMC, UFS, or NVMe SSDs. These devices include an internal controller with a Flash Translation Layer (FTL), which takes care of low-level flash management for the host system. This makes development more straightforward but also limits how much developers can directly control performance or real-time behavior.

xFile provides an optimized transactional layer over a block device—ensuring ACID-compliant transactions, lower latency than file system–based approaches, and straightforward development on managed flash. xFile can also work on a file system such as YAFFS, EdgeFS, etc., however, this introduces more overhead, latency and system complexity.

A peek into the implementation

xFile uses a copy-on-write (CoW) approach. When a page—all database entities are built from fixed-size blocks called pages—is modified, the original is preserved and updates are applied to a duplicate. This ensures pages can later be restored without regard to their purpose (indexes, objects, etc.).

xFile divides the database block device (or file) into two page-map segments, and one data segment. The data segment is a pool of fixed-size pages used for both database content and transaction management. The database kernel’s access to data is indirect: page addresses stored on data pages are virtual (a page number plus offset), resolved through the page map. At runtime, two page maps separate the last consistent state from the current uncommitted state. On commit, the current page map is written to media; on rollback, it is restored from the shadow map.

This design ensures transaction safety and database consistency. A comprehensive description of the implementation is available in the official eXtremeDB/rt documentation and supporting technical materials.

Image of the xFile configuration

In context

The xFile module is ideal for applications that need seamless integration with managed flash memory while maintaining transaction safety. It strikes a balance between simplicity and control while still guaranteeing safe, reliable database transactions.

For unmanaged flash memory devices, eXtremeDB/rt provides the Transactional Flash Translation Layer (TFTL™), which enables the database kernel to work directly with raw flash. TFTL is intended for cases where developers require maximum control and hard real-time behavior.

With either xFile or xFlash with TFTL, low-level flash management is handled, removing the burden from host system software.

All eXtremeDB/rt distributions include the Flash Simulator, enabling xFile-based applications to be developed and tested without requiring target storage hardware. The simulator can be used to evaluate storage behavior and validate application logic early in the development cycle, helping reduce integration risk before deployment.