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

propose RFC: report problems #35

Merged
merged 2 commits into from
May 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions concepts/0003-protocols/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,23 +73,23 @@ decisions and and react to them.

The most common protocol style in DID Communication is __request-response__.
This style involve two *parties*, with the `requester` making the first move,
and the `responder` completing the interaction. The [Protocol Discovery Protocol](
https://github.com/hyperledger/indy-hipe/pull/73) uses this style.
and the `responder` completing the interaction. The [Discover Feature Protocol](
../../features/) uses this style.

![request-response](request-response.png)

A second common pattern that's also important is __notification__. This style also
involves two parties, but it is one-way: the `notifier` emits a message,
and the protocol ends when the `notified` receives it. The [ACK Protocol](
https://github.com/hyperledger/indy-hipe/pull/77) and the [Problem Report
Protocol](https://github.com/hyperledger/indy-hipe/pull/65) use this style.
../../features/0015-acks/README.md) and the [Report Problem
Protocol](../../features/0035-report-problem/README.md) use this style.

![notification](notification.png)

However, more complex protocols exist. The [Introductions Protocol](
https://github.com/hyperledger/indy-hipe/pull/110) involves three parties,
not two. When the [Connection Management Protocol](
https://github.com/hyperledger/indy-hipe/pull/104) includes organizations, it
However, more complex protocols exist. The [Introduce Protocol](
../../features/0028-introduce/README.md) involves three parties,
not two. When the [Connect Protocol](
../../features/0023-connect/README.md) includes organizations, it
may involve dozens of *participants*, and it has cycles and other complex
state evolution.

Expand Down Expand Up @@ -127,29 +127,29 @@ a superprotocol from another (as when protocols are nested at least 3 deep).
![super- and subprotocols](super-sub.png)

Commonly, protocols wait for subprotocols to complete, and then they continue.
A good example of this is [ACKs](https://github.com/hyperledger/indy-hipe/blob/518b5a9a/text/acks/README.md),
A good example of this is [ACKs](../../features/0015-acks/README.md),
which are often used as a discrete step in a larger flow.

In other cases, a subprotocol is not "contained" inside its superprotocol.
Rather, the superprotocol triggers the subprotocol, then continues in parallel,
without waiting for the subprotocol to complete. In the [introduction protocol](
https://github.com/hyperledger/indy-hipe/blob/790987b9/text/introductions/README.md),
without waiting for the subprotocol to complete. In the [introduce protocol](
../../features/0028-introduce/README.md),
the final step is to begin a connection protocol between the two introducees--
but [the introduction superprotocol completes when the connection subprotocol
but [the introduction superprotocol completes when the connect subprotocol
*starts*, not when it *completes*](
https://github.com/hyperledger/indy-hipe/blob/790987b9/text/introductions/README.md#goal).
../../features/0028-introduce/README.md#goal).

![super- and async subprotocols](super-sub-async.png)

#### Message Families

A message family is a collection of messages that share a common theme, goal, or
usage pattern. The messages used by a protocol may be a subset of a particular
message family; for example, the [connection establishment protocol](
https://github.com/hyperledger/indy-hipe/blob/master/text/0031-connection-protocol/README.md)
message family; for example, the [connect protocol](
../../features/0023-connect/README.md)
uses one subset of the messages in the
`connections` message family, and the [connection management protocol](
https://github.com/hyperledger/indy-hipe/blob/baa1ead5/text/conn-mgmt-protocols/README.md)
`connections` message family, and the [sync connection protocol](
../../features/0030-sync-connection/README.md)
uses a different subset.

Collectively, the message types of a protocol serve as its _interface_. Each protocol
Expand Down
5 changes: 5 additions & 0 deletions concepts/0003-protocols/state-details.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ By convention, our community describes state and sequence rules using the
concept of state machines, and we encourage developers who implement
protocols to build them that way.

Among other benefits, this helps with error handling: when one agent
sends a [`problem-report`](../../features/0035-report-problem/README.md)
message to another, the message can make it crystal clear which state it
has fallen back to as a result of the error.

Many developers will have encountered a formal definition of this concept as
they wrote parsers or worked on other highly demanding tasks, and may worry
that state machines are heavy and intimidating. But as they are used in
Expand Down
Loading