Adopt in two steps
Adoption has two steps. First, add GritDB next to your operational database as an analytics system. Then move workloads that meet the conditions to GritDB as one database.
Add as an analytics system
Step 1 · Recommended for 1.1
Your operational database and business applications stay as they are, and reports run on GritDB. Because changes from the operational database flow into GritDB as they are, you can check GritDB with your real data and write volume before step 2.
Use as one database
Step 2 · For workloads that meet the conditions
Business applications write to GritDB directly, and reports run on the same database. Your operational database and analytics system become one GritDB.
When to use GritDB 1.1 as one database
For testing and evaluation, use it right away. Installing with the QuickStart gives you this setup. For production workloads, use it only when both conditions below are met.
- Writes are light
- In 1.1, each write to a registered table waits for the analytics engine to confirm receipt. So we do not recommend it for write-heavy operational workloads.
- One server is enough
- GritDB 1.1 has no redundancy or automatic failover of its own. Backups are taken with GritDB stopped, and you can restore only to the last backup.
Keep operational databases that do not meet both conditions on step 1, with GritDB added as an analytics system. From the next version, we will expand the range of operations and analytics that a single GritDB can handle together.
Notes on analytics sessions
In analytics sessions, the analytics engine runs queries that read only registered tables. These queries read changes after they are batched into columnar files, so a change you just committed is not visible right away. In our tests, it usually became visible after 12 seconds, and 99 times out of 100 within 22 seconds. If you added GritDB as an analytics system, replication time from the operational database adds to this. Run queries that must have the latest values in a regular session, or on the operational database if you added GritDB as an analytics system.
Create columns that must be exact, such as amounts, as numeric(p, s) with a declared precision, and keep p at 38 or less. The analytics engine computes numeric columns without a declared precision as approximate values.
The two engines, the ways to adopt GritDB and the query paths are on the Architecture page. Things to know about 1.1, such as high availability, row-level security (RLS) and supported column types, are collected in Notes for 1.1 on the Architecture page.