grpc-dotnet-namedpipes
grpc-dotnet-namedpipes copied to clipboard
Code-first support
Hello, I want to congratulate with the author for this ingenious project. I compared with the official version which uses UnixSocket and this one is much faster. I couldn't understand why this has not been merged into the official!
I am trying to implement your lib in MagicOnion, but I can't find a BinderService. I like the fact that it supports MessagePack and code-first support, but it still rely on Http/2 and is slower. Another one is protobuf-net.Grpc. Is there a way to make it work with these two frameworks?
Thanks for the kind words!
Looks like the client side is simple for both (just use NamedPipeChannel in place of GrpcChannel.Create in their samples). I had a look at protobuf-net.Grpc on the server side and it would need:
- Implement the protobuf-net ServerBinder as NamedPipeServerBinder that wraps NamedPipeServer.ServiceBinder
- Create a
.Bind<IService>()extension method on NamedPipeServer that callsnew NamedPipeServerBinder().Bind<IService>(namedPipeServer)
As far as MagicOnion, I haven't dived into it, but there should be something roughly equivalent. Conceptually the idea is that you need to create a NamedPipeServer and then use its ServiceBinder to map service method descriptions to implementations. I'm also open to PRs that tweak the API if that makes it easier.
Sorry for my delay, but I have been very busy. It's good to know that should be possible although actually I am more focused in another project which to me seemed the best of all the ones I found. It's called SciTechRpc. They also developed a tool that automatically generate assemblies eliminating in this way the slow start up caused from dynamic generation. You may want to take a look at it, you could find interesting things. If you like it you may establish some sort of cooperation. He is open mind and a very nice person. I saw lot of projects of this kind here in github and I am sure this one is the best and I will stuck with it. Thanks