微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

MediatRPC

大家好,我是失业在家,正在找工作的博主Jerry。今天发布MediatRPC的开源地址:github.com

文档增加MediatRPC的架构图和架构说明(英文):

On the client side, it establishes a QUIC connection with the server side. The MediatR's standard methods like ''send/publish/createstream'' are implemented to open outbound bidirectional stream used to send and receive MediatR contract messages.
On the server side, it sets up a QuicListener to listen for client connections and accept the inbound stream when the client make the call after connected. It reads the request message from the stream and passes it to the MediatR handlers for processing, Then it writes the response message to the stream after processed.

通过MediatR的CreateSteam方法,我给MediatRPC增加了类似于GRPC的Server Stream功能,完整功能演示如下:

由于MediatR的CreateSteam方法支持 IAsyncEnumerable<TResponse>,不支持IAsyncEnumerable<TRequest>,也就是说只能实现Server Stream,无法实现Clinet Stream 和 Bidirectional Stream。所以我给MediaR作者提了个Issue, Add support for IAsyncEnumerable<TRequest> · Issue #804 · jbogard/MediatR (github.com)

 

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐