Skip to content

Conversation

coot
Copy link
Contributor

@coot coot commented Jun 9, 2020

No description provided.

@coot coot requested a review from karknu June 9, 2020 05:45
Copy link
Contributor

@karknu karknu left a comment

Choose a reason for hiding this comment

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

The functionality doesn't match what we need for a keep-alive miniprotocol.
Without a req-rsp model it is not possible to get the needed RTT measurement and it is not possible for the client to learn that the server is down in a timely manner.

@coot
Copy link
Contributor Author

coot commented Jun 9, 2020

@karknu this is req-resp model. Every KeepAliveInterval the client sends MsgKeepAlive and the server replies with MsgKeepAliveResponse as soon as it receives client message.

coot added 3 commits June 9, 2020 08:41
- byteLimitsKeepAlive: with a test
- timeLimitsKeepAlive:
    10s limit for waiting for server's reply,
    no limit on a client's message.
This might not be needed at all for clients.  To provide it we'd need
a distinction between client and server `OuroborosApplication`.  I think
it's better to do this at a later stage.
subscribe must use `IO`, because of `ncSubscriptionWorker`, but
`versionedProtocols` can be polymorphic in its runtime monad.
@coot coot force-pushed the coot/keep-alive-applications branch from f5f8ec8 to 6e8cce9 Compare June 9, 2020 07:08
@coot coot requested a review from karknu June 9, 2020 07:09
Copy link

@dm1mf dm1mf left a comment

Choose a reason for hiding this comment

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

Looks good to me.

Copy link
Contributor

@MarcFontaine MarcFontaine left a comment

Choose a reason for hiding this comment

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

LGTM,
(I only looked at the changes in Cardano.Client.Subscription)

@karknu
Copy link
Contributor

karknu commented Jun 9, 2020

@karknu this is req-resp model. Every KeepAliveInterval the client sends MsgKeepAlive and the server replies with MsgKeepAliveResponse as soon as it receives client message.

You're right.

Copy link
Contributor

@karknu karknu left a comment

Choose a reason for hiding this comment

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

LGTM.

@coot
Copy link
Contributor Author

coot commented Jun 9, 2020

bors merge

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jun 9, 2020

@iohk-bors iohk-bors bot merged commit fae4877 into master Jun 9, 2020
@iohk-bors iohk-bors bot deleted the coot/keep-alive-applications branch June 9, 2020 14:15
coot added a commit that referenced this pull request May 16, 2022
2230: Keep alive apps and scheduled-stop r=coot a=coot



Co-authored-by: Marcin Szamotulski <profunctor@pm.me>
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