BedrockFramework icon indicating copy to clipboard operation
BedrockFramework copied to clipboard

Where would reconnect logic reside?

Open jacobslusser opened this issue 3 years ago • 1 comments

@davidfowl, suppose I was working on a Redis client and wanted to implement automatic reconnect if the TCP connection is lost. This would be seamless to the client caller.

Would you have a recommendation of where that reconnect logic would go in the Bedrock stack? Transport? Middleware? Protocol? or way up in the Client library? Ideally as little teardown and build up as possible would be the desire so my thinking is to put it as far down as possible. If you agree, just wondering how you might see the ConnectionContext and IConnectionFactory interacting in such a case.

Thanks for the work on this project and your many other contributions.

jacobslusser avatar Jan 10 '21 21:01 jacobslusser

You can consider making a wrapping ConnectionContext that reconnects or you can do it on top with your own client API like SignalR.

davidfowl avatar Jan 13 '21 23:01 davidfowl