Lazarus

Programming => Networking and Web Programming => Topic started by: tudi_x on February 19, 2021, 05:08:31 pm

Title: gRPC native implementation
Post by: tudi_x on February 19, 2021, 05:08:31 pm
hi All,
any chance of having a gRPC native implementation (grpc.io) with Free Pascal?
Title: Re: gRPC native implementation
Post by: PierceNg on February 20, 2021, 04:49:54 pm
The key pieces of gRPC seem to be Protocol Buffers and HTTP/2.

For the former, there is https://github.com/lalexs75/protobuf-fpc (https://github.com/lalexs75/protobuf-fpc) but it doesn't fully support proto3 which is the recommended protobuf version for gRPC.

For the latter, I don't know of one implemented in Pascal (or Delphi). Maybe the best bet is to wrap http://nghttp2.org/ (http://nghttp2.org/), a C library. There is a Delphi wrapper, completeness unknown: https://github.com/grijjy/DelphiScalableClientSockets/blob/master/Nghttp2.pas (https://github.com/grijjy/DelphiScalableClientSockets/blob/master/Nghttp2.pas).
Title: Re: gRPC native implementation
Post by: PierceNg on February 24, 2021, 10:26:13 am
So there is a HTTP/2 server in Pascal: https://github.com/iLya2IK/wchttpserver (https://github.com/iLya2IK/wchttpserver)!
Title: Re: gRPC native implementation
Post by: Leledumbo on February 27, 2021, 01:24:12 am
So there is a HTTP/2 server in Pascal: https://github.com/iLya2IK/wchttpserver (https://github.com/iLya2IK/wchttpserver)!
Rather fresh, let's see if Michael can incorporate it to fphttpserver transparently, or at least toggleable by a property.
TinyPortal © 2005-2018