Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Each event must list all command ids it results from #306

Open
enikao opened this issue Aug 9, 2024 · 1 comment
Open

Each event must list all command ids it results from #306

enikao opened this issue Aug 9, 2024 · 1 comment
Labels

Comments

@enikao
Copy link
Contributor

enikao commented Aug 9, 2024

The event uses the tuple (clientId; commandId) to refer to an event.

Q: Does this expose too much about the origin? Maybe other clients should not know that change came from that client? (might be related to #276)

Can a command id be mentioned in more than one event?

Pro:

  • The effect of a command may be distributed to several events

Con:

  • How does the client know there won't be more events with the same command id?

Working assumption: All events relating to the same command MUST be grouped in one "transaction" (#281)

@enikao enikao added the delta label Aug 9, 2024
@enikao
Copy link
Contributor Author

enikao commented Aug 15, 2024

I think we can avoid the origin exposure by this scheme:

eventId = base64urlEncode(sha256(concat(clientId, commandId)))

Both the repo and the originating client know the originating client's clientId. So they both can perform this operation -- the repo for creating the eventId, the originating client for checking the eventId against previously sent commandIds. No other client can reproduce it, but we're still certain every eventId is unique.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant