SaturnFramework / Saturn

Opinionated, web development framework for F# which implements the server-side, functional MVC pattern
https://saturnframework.org
MIT License
708 stars 108 forks source link

Add gRPC extension #192

Closed Krzysztof-Cieslak closed 5 years ago

Krzysztof-Cieslak commented 5 years ago

This adds Saturn gRPC extension using @mgravell's https://github.com/protobuf-net/protobuf-net.Grpc.

Check sample/gRpcSample/gRpcSample.fs for sample server definition (same ICalculator sample from original F# implementation). And... it's working ;-)

image

CC: @isaacabraham

mgravell commented 5 years ago

Just for context: the work I've done here builds heavily on grpc-dotnet, the main difference being that grpc-dotnet uses Google's contract-first approach - and an inherent "feature" of the Google tooling is that it only currently supports C#, so can't be used with native F#. The point of protobuf-net.Grpc is that it adds code-first processing to both grpc-dotnet and the native P/Invoke-based grpc implementations, and once we're talking "code-first": it works with any suitable .NET language, including C#, F#, VB, etc.

isaacabraham commented 5 years ago

Looks great :-) Now that I've actually realised that you've created an extensions package as well - perfect.