Silvan
61cab8878e
feat(backend): state persisted objects ( #9870 )
...
This PR initiates the rework of Zitadel's backend to state-persisted
objects. This change is a step towards a more scalable and maintainable
architecture.
## Changes
* **New `/backend/v3` package**: A new package structure has been
introduced to house the reworked backend logic. This includes:
* `domain`: Contains the core business logic, commands, and repository
interfaces.
* `storage`: Implements the repository interfaces for database
interactions with new transactional tables.
* `telemetry`: Provides logging and tracing capabilities.
* **Transactional Tables**: New database tables have been defined for
`instances`, `instance_domains`, `organizations`, and `org_domains`.
* **Projections**: New projections have been created to populate the new
relational tables from the existing event store, ensuring data
consistency during the migration.
* **Repositories**: New repositories provide an abstraction layer for
accessing and manipulating the data in the new tables.
* **Setup**: A new setup step for `TransactionalTables` has been added
to manage the database migrations for the new tables.
This PR lays the foundation for future work to fully transition to
state-persisted objects for these components, which will improve
performance and simplify data access patterns.
This PR initiates the rework of ZITADEL's backend to state-persisted
objects. This is a foundational step towards a new architecture that
will improve performance and maintainability.
The following objects are migrated from event-sourced aggregates to
state-persisted objects:
* Instances
* incl. Domains
* Orgs
* incl. Domains
The structure of the new backend implementation follows the software
architecture defined in this [wiki
page](https://github.com/zitadel/zitadel/wiki/Software-Architecturel ).
This PR includes:
* The initial implementation of the new transactional repositories for
the objects listed above.
* Projections to populate the new relational tables from the existing
event store.
* Adjustments to the build and test process to accommodate the new
backend structure.
This is a work in progress and further changes will be made to complete
the migration.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
Co-authored-by: Iraq Jaber <iraq+github@zitadel.com >
Co-authored-by: Iraq <66622793+kkrime@users.noreply.github.com >
Co-authored-by: Tim Möhlmann <tim+github@zitadel.com >
2025-09-05 09:54:34 +01:00
..
2025-01-29 10:29:00 +00:00
2023-12-08 15:30:55 +01:00
2024-05-04 11:55:57 +02:00
2024-07-31 14:42:12 +02:00
2025-09-01 07:21:10 +02:00
2024-07-31 14:42:12 +02:00
2025-09-01 07:21:10 +02:00
2025-09-01 07:21:10 +02:00
2025-09-01 07:21:10 +02:00
2025-09-01 07:21:10 +02:00
2023-12-08 15:30:55 +01:00
2025-03-26 17:08:13 +00:00
2025-07-15 13:38:00 +02:00
2025-07-15 13:38:00 +02:00
2024-11-04 10:44:51 +00:00
2025-08-19 15:22:34 +02:00
2025-08-26 10:14:41 +00:00
2025-02-26 16:06:50 +00:00
2024-09-26 09:14:33 +02:00
2024-09-26 09:14:33 +02:00
2024-08-28 05:33:20 +00:00
2024-08-28 05:33:20 +00:00
2024-09-11 08:24:00 +00:00
2024-09-11 08:24:00 +00:00
2024-09-11 08:24:00 +00:00
2025-02-25 07:33:13 +01:00
2025-08-19 15:22:34 +02:00
2025-07-15 13:38:00 +02:00
2024-09-11 10:53:55 +00:00
2025-06-18 13:24:39 +02:00
2025-06-18 13:24:39 +02:00
2025-06-18 13:24:39 +02:00
2025-05-02 13:44:24 +02:00
2025-08-27 09:07:13 +00:00
2025-05-02 13:44:24 +02:00
2023-12-08 15:30:55 +01:00
2025-08-27 09:07:13 +00:00
2025-08-27 09:07:13 +00:00
2024-05-13 16:01:50 +02:00
2024-04-03 10:43:43 +00:00
2024-08-28 05:33:20 +00:00
2024-06-17 12:47:38 +00:00
2024-04-03 10:43:43 +00:00
2024-08-12 22:32:01 +02:00
2024-06-17 12:47:38 +00:00
2023-10-19 12:19:10 +02:00
2024-08-12 22:32:01 +02:00
2023-12-08 15:30:55 +01:00
2023-10-19 12:19:10 +02:00
2024-11-22 17:25:28 +01:00
2023-12-08 15:30:55 +01:00
2023-10-19 15:21:31 +00:00
2024-12-19 10:37:46 +01:00
2024-07-31 18:00:38 +03:00
2025-09-02 09:48:46 +00:00
2025-09-02 09:48:46 +00:00
2025-09-02 09:48:46 +00:00
2025-09-02 09:48:46 +00:00
2024-04-03 10:43:43 +00:00
2023-12-08 15:30:55 +01:00
2024-04-09 19:32:00 +00:00
2024-04-03 10:43:43 +00:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2025-08-27 09:07:13 +00:00
2024-04-05 09:35:49 +00:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2025-08-27 09:07:13 +00:00
2025-08-27 09:07:13 +00:00
2025-07-04 18:12:59 +02:00
2025-07-04 18:12:59 +02:00
2025-07-04 18:12:59 +02:00
2024-04-11 09:16:10 +02:00
2024-08-12 22:32:01 +02:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2025-07-29 15:56:21 +02:00
2025-07-29 15:56:21 +02:00
2023-10-26 05:54:09 +00:00
2024-08-12 22:32:01 +02:00
2024-05-23 12:28:46 +02:00
2023-10-19 12:19:10 +02:00
2024-04-03 10:43:43 +00:00
2024-08-12 22:32:01 +02:00
2023-12-19 10:25:50 +00:00
2024-04-03 10:43:43 +00:00
2024-04-03 10:43:43 +00:00
2023-12-08 15:30:55 +01:00
2024-08-12 22:32:01 +02:00
2023-12-08 15:30:55 +01:00
2024-04-03 10:43:43 +00:00
2024-08-12 22:32:01 +02:00
2023-12-08 15:30:55 +01:00
2024-04-03 10:43:43 +00:00
2024-08-12 22:32:01 +02:00
2023-12-08 15:30:55 +01:00
2024-04-10 09:14:55 +00:00
2024-08-12 22:32:01 +02:00
2024-05-30 22:08:48 +00:00
2024-05-13 16:01:50 +02:00
2024-08-12 22:32:01 +02:00
2024-05-13 16:01:50 +02:00
2024-03-20 10:18:46 +00:00
2024-02-28 10:21:11 +00:00
2025-02-26 16:06:50 +00:00
2025-02-26 16:06:50 +00:00
2025-04-02 16:53:06 +02:00
2023-10-19 12:19:10 +02:00
2024-08-12 22:32:01 +02:00
2023-12-08 15:30:55 +01:00
2024-09-13 13:22:25 +00:00
2025-09-02 09:48:46 +00:00
2025-05-21 10:50:44 +02:00
2025-05-21 10:50:44 +02:00
2024-07-31 18:00:38 +03:00
2025-09-02 09:48:46 +00:00
2024-08-14 14:18:14 +00:00
2025-06-26 19:17:45 +03:00
2024-01-17 10:16:48 +00:00
2024-01-17 10:16:48 +00:00
2024-08-12 22:32:01 +02:00
2024-01-17 10:16:48 +00:00
2024-10-31 15:57:17 +01:00
2024-10-31 15:57:17 +01:00
2025-09-01 07:21:10 +02:00
2024-10-28 08:29:34 +00:00
2025-07-15 16:03:47 +00:00
2025-07-15 16:03:47 +00:00
2024-05-16 07:07:56 +02:00
2025-08-19 15:22:34 +02:00
2025-08-19 15:22:34 +02:00
2024-08-12 22:32:01 +02:00
2024-06-19 12:56:33 +02:00
2024-05-13 16:01:50 +02:00
2024-08-28 05:33:20 +00:00
2024-06-19 12:56:33 +02:00
2024-08-12 22:32:01 +02:00
2024-06-19 12:56:33 +02:00
2024-11-28 17:09:00 +00:00
2025-07-29 15:56:21 +02:00
2025-01-16 16:05:55 +01:00
2024-08-12 22:32:01 +02:00
2024-11-14 14:04:39 +00:00
2024-04-03 10:43:43 +00:00
2024-08-12 22:32:01 +02:00
2024-06-19 12:56:33 +02:00
2024-04-03 10:43:43 +00:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2025-08-27 09:07:13 +00:00
2024-04-05 09:35:49 +00:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2025-08-27 09:07:13 +00:00
2025-08-27 09:07:13 +00:00
2025-07-04 18:12:59 +02:00
2025-07-04 18:12:59 +02:00
2024-08-12 22:32:01 +02:00
2023-12-08 15:30:55 +01:00
2025-07-04 18:12:59 +02:00
2023-12-08 15:30:55 +01:00
2025-07-29 15:56:21 +02:00
2025-07-29 15:56:21 +02:00
2024-04-03 10:43:43 +00:00
2024-08-12 22:32:01 +02:00
2024-06-19 12:56:33 +02:00
2024-04-10 09:14:55 +00:00
2024-04-10 09:14:55 +00:00
2024-06-19 12:56:33 +02:00
2024-04-03 10:43:43 +00:00
2024-08-12 22:32:01 +02:00
2024-06-19 12:56:33 +02:00
2024-04-03 10:43:43 +00:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2024-08-12 22:32:01 +02:00
2023-12-08 15:30:55 +01:00
2024-04-03 10:43:43 +00:00
2024-08-12 22:32:01 +02:00
2023-12-08 15:30:55 +01:00
2024-04-03 10:43:43 +00:00
2024-08-12 22:32:01 +02:00
2024-06-19 12:56:33 +02:00
2024-05-13 16:01:50 +02:00
2024-08-12 22:32:01 +02:00
2024-06-19 12:56:33 +02:00
2025-07-29 15:56:21 +02:00
2025-07-29 15:56:21 +02:00
2025-07-29 15:56:21 +02:00
2025-07-29 15:56:21 +02:00
2025-07-29 15:56:21 +02:00
2025-05-07 15:24:24 +02:00
2025-08-15 11:35:43 +02:00
2023-12-08 15:30:55 +01:00
2025-01-27 13:36:07 +01:00
2023-10-26 05:54:09 +00:00
2023-07-20 04:06:16 +00:00
2025-07-29 15:56:21 +02:00
2023-12-08 15:30:55 +01:00
2024-04-10 09:14:55 +00:00
2024-05-13 16:01:50 +02:00
2024-08-12 22:32:01 +02:00
2024-04-05 09:35:49 +00:00
2025-06-27 17:25:44 +02:00
2025-06-27 17:25:44 +02:00
2024-04-03 10:43:43 +00:00
2025-07-02 07:34:19 +00:00
2025-07-02 07:34:19 +00:00
2025-06-27 17:25:44 +02:00
2025-06-27 17:25:44 +02:00
2025-06-27 17:25:44 +02:00
2025-06-27 17:25:44 +02:00
2025-06-27 17:25:44 +02:00
2025-06-27 17:25:44 +02:00
2025-06-27 17:25:44 +02:00
2025-06-27 17:25:44 +02:00
2025-06-27 17:25:44 +02:00
2025-07-04 18:12:59 +02:00
2025-07-04 18:12:59 +02:00
2025-07-04 18:12:59 +02:00
2025-06-04 11:46:10 +00:00
2025-06-04 11:46:10 +00:00
2025-07-04 18:12:59 +02:00
2025-01-17 16:16:26 +01:00
2025-07-04 18:12:59 +02:00
2025-07-04 18:12:59 +02:00
2025-06-27 17:25:44 +02:00
2025-06-04 11:46:10 +00:00
2025-05-21 14:40:47 +02:00
2025-05-21 14:40:47 +02:00
2025-08-22 06:08:53 +00:00
2025-05-21 14:40:47 +02:00
2025-08-15 11:35:43 +02:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2023-10-19 12:19:10 +02:00
2023-09-15 16:58:45 +02:00
2024-08-12 22:32:01 +02:00
2023-12-08 15:30:55 +01:00
2025-06-04 07:17:23 +00:00
2023-12-05 11:12:01 +00:00
2024-08-12 22:32:01 +02:00
2024-04-08 08:15:44 +00:00
2025-03-26 17:08:13 +00:00
2025-07-15 13:38:00 +02:00
2025-07-15 13:38:00 +02:00
2024-12-19 11:11:40 +00:00
2025-07-15 16:03:47 +00:00
2025-07-15 16:03:47 +00:00
2023-08-11 15:36:18 +00:00
2024-09-26 09:14:33 +02:00
2024-10-07 07:12:44 +02:00
2024-10-10 13:53:32 +00:00
2025-07-15 13:38:00 +02:00
2024-05-30 22:08:48 +00:00
2023-12-08 15:30:55 +01:00
2025-08-07 14:58:59 +02:00
2024-09-26 09:14:33 +02:00
2024-09-26 09:14:33 +02:00
2024-09-26 09:14:33 +02:00
2024-09-12 06:27:29 +02:00
2024-09-12 06:27:29 +02:00
2025-03-24 06:03:24 +00:00
2025-09-02 09:48:46 +00:00
2025-09-02 09:48:46 +00:00
2025-09-02 09:48:46 +00:00
2023-10-19 15:21:31 +00:00
2024-01-02 14:26:31 +00:00
2024-05-16 07:07:56 +02:00
2023-12-08 15:30:55 +01:00
2024-06-19 12:56:33 +02:00
2025-08-28 12:09:52 +00:00
2025-09-03 14:39:18 +00:00
2025-09-03 14:39:18 +00:00
2024-04-03 10:43:43 +00:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2024-08-12 22:32:01 +02:00
2023-12-08 15:30:55 +01:00
2024-04-24 17:50:58 +02:00
2024-08-12 22:32:01 +02:00
2024-07-17 06:43:07 +02:00
2024-04-24 17:50:58 +02:00
2024-08-12 22:32:01 +02:00
2024-05-02 11:50:13 +02:00
2023-09-07 14:06:11 +00:00
2024-09-26 09:14:33 +02:00
2024-09-26 09:14:33 +02:00
2025-07-04 18:12:59 +02:00
2024-09-26 09:14:33 +02:00
2024-09-26 09:14:33 +02:00
2025-01-29 10:29:00 +00:00
2024-09-26 09:14:33 +02:00
2024-09-26 09:14:33 +02:00
2024-09-26 09:14:33 +02:00
2024-04-03 10:43:43 +00:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2024-04-03 10:43:43 +00:00
2024-08-12 22:32:01 +02:00
2024-05-16 07:07:56 +02:00
2025-08-26 10:14:41 +00:00
2023-08-11 15:36:18 +00:00
2024-12-03 10:14:04 +00:00
2025-08-26 10:14:41 +00:00
2023-08-04 11:35:36 +02:00
2024-08-14 13:04:26 +00:00
2025-07-04 18:12:59 +02:00
2024-04-03 10:43:43 +00:00
2024-08-12 22:32:01 +02:00
2025-06-04 07:17:23 +00:00
2025-09-05 09:54:34 +01:00
2025-08-19 15:22:34 +02:00
2025-08-19 15:22:34 +02:00
2025-07-29 15:56:21 +02:00
2025-07-29 15:56:21 +02:00
2025-07-04 18:12:59 +02:00
2025-07-04 18:12:59 +02:00
2025-01-14 15:44:41 +01:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2024-04-03 10:43:43 +00:00
2024-08-12 22:32:01 +02:00
2025-06-04 07:17:23 +00:00
2025-03-25 07:01:29 +00:00
2024-08-28 19:46:45 +00:00
2024-09-17 08:27:48 +00:00
2025-07-29 15:56:21 +02:00
2025-08-26 10:14:41 +00:00
2025-08-26 10:14:41 +00:00
2025-08-26 10:14:41 +00:00
2025-08-26 10:14:41 +00:00
2025-07-24 21:09:48 +02:00
2025-07-24 21:09:48 +02:00
2025-07-14 09:19:50 +02:00
2025-07-29 15:56:21 +02:00
2025-06-04 07:17:23 +00:00
2025-07-29 15:56:21 +02:00
2025-06-04 07:17:23 +00:00
2024-12-03 10:14:04 +00:00
2024-12-03 10:14:04 +00:00
2025-08-26 10:14:41 +00:00
2025-08-26 10:14:41 +00:00
2024-09-26 09:14:33 +02:00
2024-12-03 10:14:04 +00:00
2025-07-29 15:56:21 +02:00
2024-05-14 09:20:31 +02:00
2024-05-07 05:38:26 +00:00
2024-07-31 18:00:38 +03:00
2024-05-07 05:38:26 +00:00
2025-07-29 15:56:21 +02:00
2025-07-29 15:56:21 +02:00
2024-09-25 13:31:31 +00:00
2024-09-25 13:31:31 +00:00
2024-09-26 09:14:33 +02:00
2024-09-26 09:14:33 +02:00
2024-09-26 09:14:33 +02:00
2024-09-26 09:14:33 +02:00
2024-09-26 09:14:33 +02:00
2025-07-29 15:56:21 +02:00
2024-08-14 14:18:14 +00:00
2025-04-02 16:53:06 +02:00
2025-04-02 16:53:06 +02:00