Skip to content

add identifier component#771

Merged
DavidBadura merged 5 commits into
4.0.xfrom
identifier
Sep 4, 2025
Merged

add identifier component#771
DavidBadura merged 5 commits into
4.0.xfrom
identifier

Conversation

@DavidBadura

@DavidBadura DavidBadura commented Sep 2, 2025

Copy link
Copy Markdown
Member

We will have different types of identifiers in the future, not just "aggregate root id." Therefore, it makes sense to create a general interface for them.

In addition, the return type of fromString has changed from self to static.

@DavidBadura DavidBadura added this to the 4.0.0 milestone Sep 2, 2025
@DavidBadura DavidBadura added enhancement New feature or request BC-Break labels Sep 2, 2025
@DavidBadura

Copy link
Copy Markdown
Member Author

@DanielBadura Should we keep AggregateRootId and inherit from Identifier?

@github-actions

github-actions Bot commented Sep 2, 2025

Copy link
Copy Markdown

Hello 👋

here is the most recent benchmark result:

SplitStreamBench
================

+-------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
|                         | time (kde mode)                                     | memory                                     |
+-------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| subject                 | Tag: <current>     | Tag: base          | time-diff | Tag: <current>  | Tag: base  | memory-diff |
+-------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| benchLoad10000Events () | 3.935ms (±0.00%)   | 4.207ms (±0.00%)   | -6.46%    | 35.762mb        | 36.363mb   | -1.65%      |
| benchSave10000Events () | 549.644ms (±0.00%) | 548.882ms (±0.00%) | +0.14%    | 35.897mb        | 35.897mb   | -0.00%      |
+-------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+

PersonalDataBench
=================

+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
|                                        | time (kde mode)                                     | memory                                     |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| subject                                | Tag: <current>     | Tag: base          | time-diff | Tag: <current>  | Tag: base  | memory-diff |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| benchLoad1Event ()                     | 1.099ms (±0.00%)   | 1.154ms (±0.00%)   | -4.73%    | 35.799mb        | 35.800mb   | -0.00%      |
| benchLoad10000Events ()                | 105.149ms (±0.00%) | 107.081ms (±0.00%) | -1.80%    | 35.800mb        | 35.800mb   | -0.00%      |
| benchSave1Event ()                     | 1.933ms (±0.00%)   | 1.856ms (±0.00%)   | +4.12%    | 35.799mb        | 35.800mb   | -0.00%      |
| benchSave10000Events ()                | 356.907ms (±0.00%) | 342.179ms (±0.00%) | +4.30%    | 35.801mb        | 35.801mb   | -0.00%      |
| benchSave10000Aggregates ()            | 12.598s (±0.00%)   | 12.709s (±0.00%)   | -0.87%    | 35.800mb        | 35.800mb   | -0.00%      |
| benchSave10000AggregatesTransaction () | 9.444s (±0.00%)    | 9.409s (±0.00%)    | +0.37%    | 36.040mb        | 36.040mb   | -0.00%      |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+

SubscriptionEngineBench
=======================

+---------------------------+-----------------+-----------------+-----------+-----------------+------------+-------------+
|                           | time (kde mode)                               | memory                                     |
+---------------------------+-----------------+-----------------+-----------+-----------------+------------+-------------+
| subject                   | Tag: <current>  | Tag: base       | time-diff | Tag: <current>  | Tag: base  | memory-diff |
+---------------------------+-----------------+-----------------+-----------+-----------------+------------+-------------+
| benchHandle10000Events () | 3.393s (±0.00%) | 3.395s (±0.00%) | -0.07%    | 48.287mb        | 48.287mb   | -0.00%      |
+---------------------------+-----------------+-----------------+-----------+-----------------+------------+-------------+

SimpleSetupStreamStoreBench
===========================

+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
|                                        | time (kde mode)                                     | memory                                     |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| subject                                | Tag: <current>     | Tag: base          | time-diff | Tag: <current>  | Tag: base  | memory-diff |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| benchLoad1Event ()                     | 1.154ms (±0.00%)   | 1.227ms (±0.00%)   | -5.94%    | 35.136mb        | 35.136mb   | -0.00%      |
| benchLoad10000Events ()                | 69.820ms (±0.00%)  | 71.726ms (±0.00%)  | -2.66%    | 35.136mb        | 35.136mb   | -0.00%      |
| benchSave1Event ()                     | 1.486ms (±0.00%)   | 1.358ms (±0.00%)   | +9.47%    | 35.136mb        | 35.136mb   | -0.00%      |
| benchSave10000Events ()                | 333.473ms (±0.00%) | 339.647ms (±0.00%) | -1.82%    | 35.191mb        | 35.136mb   | +0.16%      |
| benchSave10000Aggregates ()            | 8.315s (±0.00%)    | 8.372s (±0.00%)    | -0.69%    | 35.136mb        | 35.136mb   | -0.00%      |
| benchSave10000AggregatesTransaction () | 5.116s (±0.00%)    | 5.138s (±0.00%)    | -0.42%    | 35.136mb        | 35.136mb   | -0.00%      |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+

SnapshotsBench
==============

+----------------------------------------+-------------------+-------------------+-----------+-----------------+------------+-------------+
|                                        | time (kde mode)                                   | memory                                     |
+----------------------------------------+-------------------+-------------------+-----------+-----------------+------------+-------------+
| subject                                | Tag: <current>    | Tag: base         | time-diff | Tag: <current>  | Tag: base  | memory-diff |
+----------------------------------------+-------------------+-------------------+-----------+-----------------+------------+-------------+
| benchLoad10000EventsMissingSnapshot () | 68.562ms (±0.00%) | 71.054ms (±0.00%) | -3.51%    | 35.206mb        | 35.206mb   | -0.00%      |
| benchLoad10000Events ()                | 1.035ms (±0.00%)  | 1.126ms (±0.00%)  | -8.08%    | 35.206mb        | 35.206mb   | -0.00%      |
+----------------------------------------+-------------------+-------------------+-----------+-----------------+------------+-------------+

SubscriptionEngineBatchBench
============================

+---------------------------+-------------------+-------------------+-----------+-----------------+------------+-------------+
|                           | time (kde mode)                                   | memory                                     |
+---------------------------+-------------------+-------------------+-----------+-----------------+------------+-------------+
| subject                   | Tag: <current>    | Tag: base         | time-diff | Tag: <current>  | Tag: base  | memory-diff |
+---------------------------+-------------------+-------------------+-----------+-----------------+------------+-------------+
| benchHandle10000Events () | 91.676ms (±0.00%) | 92.702ms (±0.00%) | -1.11%    | 35.716mb        | 35.716mb   | -0.00%      |
+---------------------------+-------------------+-------------------+-----------+-----------------+------------+-------------+

This comment gets update everytime a new commit comes in!

@DanielBadura

Copy link
Copy Markdown
Member

I'm not sure. This would make the BC-Break minimal for the users, but do we gain something else from it? Right now, we don't have anything where we would want to differntiate between an Identifier or AggregateRootId, do we?

@DavidBadura

Copy link
Copy Markdown
Member Author

Exactly, for BC, and to be more specific, an AggregateRootId is required here. But I do not think that really makes sense.

@DavidBadura
DavidBadura merged commit 2aa2ddc into 4.0.x Sep 4, 2025
39 of 40 checks passed
@DavidBadura
DavidBadura deleted the identifier branch September 4, 2025 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BC-Break enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants