Chapter 7. The journal based persistence approach


If you are using JBoss Messaging 2.0 on a Linux system, you can take full advantage of this feature. All you have to do is to make sure libaio is installed and you are using an ext3 or ext2 file system, and kernel version 2.6 or later.

To install libaio, run the command sudo yum install libaio1 on Fedora or Red Hat or sudo apt-get install libaio1 on Ubuntu or Debian. For other OS's refer to the OS manual.

Using ther JBoss Messaging journal we provide unrivalled persistence performance. Instead of issuing a sync on every commit required by the journal, we submit writes directly to the kernel and we get callbacks when the information is stored on the hard drive. With that we maximize performance by isolating the persistence of one transaction from another and also by using Direct Memory Access between the Journal and the Kernel. With AIO you can have high rate transactions even when you commit several small transactions, and that's done without any loss of the reliability guarantee - your data is 100% guaranteed persisted to disk. We are planning migrating this native library to other platforms besides Linux, as other OS's will have different options for Asynchronous IO.

7.2. NIO

If AIO is not available JBM will automatically fall back to using NIO. Both NIO and AIO journals share a lot of its implementation at an abstract level, and the NIO journal also gives excellent performance.

7.3. JDBC

JDBC mapping is not supported for the Alpha release of JBoss Messaging 2.

It is planned for the Beta release for users that require a database for management purposes. JDBC access will be optimized but it is not expected to reach the same level of performance for persistent messages than the ASYNCIO and NIO implementations.