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

Clarify semantics of negotiationId in ContractRequestMessage #3

Open
jimmarino opened this issue Nov 18, 2022 · 0 comments
Open

Clarify semantics of negotiationId in ContractRequestMessage #3

jimmarino opened this issue Nov 18, 2022 · 0 comments

Comments

@jimmarino
Copy link
Contributor

A ContractRequestMessage can initiate a negotiation or send a consumer counteroffer to the provider. Since these messages must be idempotent to support reliability, we need a way for the provider to perform unambiguous deduplication:

  1. The consumer sends a ContractRequestMessage to the provider, which receives it
  2. The provider creates a state machine, transitions it to CONSUMER_REQUESTED, and sends an ACK to the consumer
  3. The consumer crashes before it can commit the ACK
  4. The consumer recovers and sends the same ContractRequestMessage

At this point, the provider needs to determine that the message is a duplicate and not an attempt by the provider to send a counteroffer, which would result in an illegal state transition. The converse of this is when a provider must determine that a message is a counteroffer, not an initial request.

The proposed solution is the presence of the negotiationId message. If the property is present in the message, the provider should process it as a counteroffer; otherwise, it should process the message as an initial request.

sebbader-sap added a commit to sebbader-sap/edc-protocols that referenced this issue Apr 3, 2023
* feat: add message schemes for contract negotiation

* feat: add message schemes for cataloging

* feat: add message schemes for transfer process

* refactor: replace JSON schema keyword "pattern" with better fitting "const"

* fix: revert not discussed changes

* fix: resolve broken links and typos

* refactor: clean up file structure

* fix: broken link to the negotiation error diagram

---------

Co-authored-by: Julia Pampus <72392527+juliapampus@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant