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

Transport Return Route #116

Closed
wants to merge 4 commits into from

Conversation

TelegramSam
Copy link
Contributor

describes how a message over a transport would signal that the connection serves as an acceptable return route. This helps client only agents, including mobile apps.

Signed-off-by: Sam Curren <telegramsam@gmail.com>
Signed-off-by: Sam Curren <telegramsam@gmail.com>
```json
{
"~transport": {
"return_route": "all"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does "all" mean, and what are the other possible values of "return_route"?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Presumably, this means that the agent receiving the decorated message should attempt to send responses back over the same channel?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added pointer to the reference section.

}
```

Outbound messages can return the `~transport` decorator as well, with a `queued-message-count` attribute. This is useful for HTTP transports which can only receive one return message at a time.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need a lot more detail here. If such a decorator is seen, how does the queued-message-count get used? Does the client call in with , and get a response that bundles the whole queue or some subset thereof?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added additional commentary.

}
```

Outbound messages can return the `~transport` decorator as well, with a `queued-message-count` attribute. This is useful for HTTP transports which can only receive one return message at a time.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"queued-message-count" should be snake_case

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed. (this was not consistent with the rest of the doc)

"@type": "?/1.0/noop",
"~transport": {
"return_route": "thread",
"return_route_thread": "1234567899876543"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't get what "return_route_thread" means, or why it would be different from a normal @id that establishes a thread. Is this allowing us to change the return route for a thread that already exists?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means that only messages with a matching thread ID would be returned. This allows the agent to only receive response messages to something they sent, and not messages of a type they might be unprepared to process at that moment.


- `none`: Default. No messages should be returned over this connection.
- `all`: Send all messages for this key over the connection.
- `thread`: Send all messages matching the key and thread specified in the `return_route_thread` attribute.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What "key" is specified in the "return_route_thread" attribute? I only see a thread id.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant cryptographic. added.

@dhh1128
Copy link
Member

dhh1128 commented Apr 12, 2019

Sam, this doc feels like a very promising one to me, and I'm glad it's in process. I think it should replace the ~please_duplex HIPE that I wrote several months ago (https://github.com/hyperledger/indy-hipe/blob/08927ab49754698de671862a2742ff486d8b2d06/text/please-duplex/README.md), because this is far simpler. However, there are several concepts from that HIPE draft that need to be discussed here. For example, what happens if someone doesn't want to honor the request for a return route? Is it illegal to use a different channel? Should an error or a warning be returned, and should it flow back on the channel over which the decorator arrived? What happens if the route is complex (flows through mediators and relays; maybe uses more than one transport) rather than simple--can we decorate forward messages with the decorator to ask intermediaries to support the routing, or is that out of scope? How can the sender of this decorator express the relative importance of the request, from their perspective?

@TelegramSam
Copy link
Contributor Author

What happens if the route is complex (flows through mediators and relays; maybe uses more than one transport) rather than simple--can we decorate forward messages with the decorator to ask intermediaries to support the routing, or is that out of scope?

This question is interesting. As the ~transport decorator is the first decorator not related to the specific message, this is new territory. As the transport between a mediator and the next hop is unknown to the original sender, I think this decorator should only be used on the outermost message, as that is the only transport that the original sender is aware of.

Signed-off-by: Sam Curren <telegramsam@gmail.com>
@tplooker
Copy link

@TelegramSam @dhh1128 I like this HIPE however it has some implications around how agents will handle and manage messages. The implication this HIPE has is that all agents, if they have a message to send another agent and fail to find an endpoint in which to dispatch the message (or the message fails to transmit with the provided endpoint), it then must put in a que for that agent? If that is the case I think we need to have a broader discussion about this behavior before this progresses?

@swcurran
Copy link
Member

@TelegramSam - I think this needs more about the use case. I think I get it, but it's really fuzzy. A detailed example of how it would be used for a mobile and cloud agent to message back and forth would be a big help.

@TelegramSam
Copy link
Contributor Author

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

Successfully merging this pull request may close these issues.

4 participants