Journaled File LIBrary (libjf) tutorial

"from the ground up"

Christian Ferrari

          
        

Copyright 2005 Christian Ferrari.

Trademarks are owned by their owners.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in Appendix A.


Table of Contents
About This Book
1. Acknowledgments
2. Revision History
3. Source and pre-formatted versions available
4. Typographical Conventions
5. English language and other ads
1. Introduction
1.1. Trademarks
1.2. What's libjf?
1.3. What's a "transaction"?
1.4. What's file "journaling"?
1.4.1. Data integrity issue examples
1.4.2. Data integrity issue with only one file
1.5. Who should use libjf?
1.6. What libjf is not?
1.7. Collaboration
2. Getting started
2.1. "Supported" architectures
2.2. Retrieving and installing
2.2.1. Package name
2.2.2. Un-installing
2.3. Hello world program
2.3.1. Hello world compilation
2.3.2. Hello world execution
2.4. Hello world II
2.5. Hello world III
2.5.1. Hello world III compile & run
2.6. Hello world saga conclusions
3. libjf basics
3.1. Many journaled files, one journal
3.1.1. two_files.c compile and run
3.1.2. two_files.c interesting aspects
3.2. Two journaled files and an application crash
3.3. Two journaled files and a partial transaction
3.4. The recovery pending status
3.4.1. Automatic recovery
3.5. Text files
3.5.1. Conclusions
3.5.2. Future developments
3.6. Restartable reads
3.6.1. Compilation and execution
3.6.2. Restartable reads and rollback
3.6.3. Conclusions
3.7. Other "open mode" options
4. Diving into libjf
4.1. Synchronization type
4.1.1. libjf fast synchronization
4.1.2. libjf safe synchronization
4.1.3. How can an application choose the type of synchronization?
4.1.4. Playing with synchronization type
4.1.5. How is synchronization tested?
4.2. Journaling and caching
4.2.1. Compilation and execution
4.2.2. How cache size limit can be tuned
4.3. libjf object options
5. Utility programs
5.1. jf_create: journal creation
5.2. jf_join: join a journal
5.3. jf_rename: rename a journaled file
5.4. jf_leave: leave a journal
5.5. jf_report: inspecting a journal
5.6. jf_recover: recover a journal
5.7. jf_bench: performance measurement
6. Debugging applications
6.1. printf approach
6.1.1. Error codes' rule of thumb
6.2. The trace approach
6.2.1. How can I guess if libjf was compiled with debug feature?
6.3. The debugger approach
A. GNU Free Documentation License
A.1. PREAMBLE
A.2. APPLICABILITY AND DEFINITIONS
A.3. VERBATIM COPYING
A.4. COPYING IN QUANTITY
A.5. MODIFICATIONS
A.6. COMBINING DOCUMENTS
A.7. COLLECTIONS OF DOCUMENTS
A.8. AGGREGATION WITH INDEPENDENT WORKS
A.9. TRANSLATION
A.10. TERMINATION
A.11. FUTURE REVISIONS OF THIS LICENSE
A.12. ADDENDUM: How to use this License for your documents
List of Tables
4-1. Create/open methods struct summary
List of Examples
2-1. hello_world.c
2-2. hello_world2.c
2-3. hello_world2.c
3-1. two_files.c
3-2. two_files_crash.c
3-3. two_files_crash2.c
3-4. dos_text.c
3-5. restartable_reads.c
3-6. restartable_reads_rollback.c
4-1. many_hello_world.c
4-2. cache_size.c
6-1. jf_strerror.c
from the ground up