Skip to content

TigerBeetle

TigerBeetle is a fast and reliable database for financial accounting. It provides a data model and design for working with financial data that is based on double-entry bookkeeping. Gandom uses a similar design for its core accounting data models, and can integrate with TigerBeetle for reliable recording of transactions and fast reporting. However because of some limitations in TigerBeetle, we only recommend enabling this integration for very high volume use cases. Gandom also supports sufficiently fast recording and reporting using the default PostgreSQL database using its TigerBeetle-like ledger implementation named pgBeetle.

Note: TigerBeetle database only provides core accounting features, and does not replace a general purpose database. So Gandom always use PostgreSQL as it's main database, and when TigerBeetle is enabled, it complements the main database to provide faster reporting and more fault tolerant bookkeeping. See TigerBeetle's system architecture docs for details.

Enabling TigerBeetle Integration

To enable syncing financial transaction to TigerBeetle, simply set TIGERBEETLE_ENABLED = True in settings.py. You can disable TigerBeetle afterwards if needed, but enabling or reenabling TigerBeetle integration is not supported if any financial transfer is recorded in the main database. When TigerBeetle is enabled, you should be aware of the limitations it enforces on your workflow, as described below.

TigerBeetle Limitations for Accounting Softwares

TigerBeetle focuses on recording business transactions in real-time. It also enforces immutable operations for better data integrity and legal compliance. This model works well for an accounting system that is fully automated, but when manual operations and editing is common, this model limits the actions that user's can perform on their data. The recommended solution is to use reverse transactions for editing, but has these challenges:

  • Managing total turnover: Creating reverse transactions increase the total posted debit/credit value of accounts, which is a significant accounting value. So creating reversals while reporting the correct total turnover amount requires extra logic in main database and code.
  • Determining the real posting time: In many accounting systems alterations to transaction, even final and posted ones, may be required due to various operational reasons. The real finalizing time is when the final reports are submitted to legal entities, which is usually at the end of the accounting period. As a result, all reporting before that real finalizing time should not be posted to TigerBeetle or should be posted as pending, both of which impose implementation difficulties and may prevent taking advantage of TigerBeetle speed and durability.

There may be solutions to efficiently implement a syncing logic that handle those challenges, and Gandom tries to provide most of features expected in an accounting system while using TigerBeetle. But in the current state of implementation, if TigerBeetle is enabled, the following constraint are enforced in usage.

Features not available when using TigerBeetle

  • Any entry marked as final cannot be made non-final.
  • Non-final entries are not included in reports. (Will be fixed soon)