stepancheg / grpc-rust

Rust implementation of gRPC
MIT License
1.37k stars 124 forks source link

Project status #97

Open Iulian7 opened 6 years ago

Iulian7 commented 6 years ago

What is the current status of this project? Is it still maintained? Are there plans to keep working on it? This seems to be the most complete (and for the most part the only gRPC crate for rust).

stepancheg commented 6 years ago

It is maintained to some degree. This is my personal project. I've recently changed job, so I had little time to work on it, but planning to work on it more.

If you have some issues, or some reproducible problems, I'll try to fix them. And patches are of course appreciated.

90% of grpc implementation is implementation of HTTP/2 (crate httpbis), grpc is a thin wrapper over HTTP/2. Hopefully h2 crate will be stable soon, so grpc could be changed to use that crate.

There's another grpc implementation in rust, which is a binding to C implementation.

thedodd commented 6 years ago

This is definitely the best rust implementation out there that I am aware of. I've been using it with great success, but there is still progress to be made :).

parasyte commented 6 years ago

@stepancheg As of a few days ago, hyper is now using h2 for a bare-bones HTTP/2 implementation. See: https://github.com/hyperium/hyper/pull/1432 You might want to consider using hyper over h2 directly, since hyper will provide features (like TLS and connection pooling) that are outside of the scope of h2.

I recently had a chance to try hyper with HTTP/2 support in a toy server, and it is looking pretty solid, even in these early days.

stepancheg commented 6 years ago

@parasyte last time I checked h2 didn't support ALPN which is required for HTTP/2 (because of limitations of rust-native-tls).

Another issue is with trailers, I'm not sure hyper/h2 supports them.

If these issues are fixed now, grpc may switch to h2.

But if not, I'd like to at least replace parts of rust-http2 implementation with h2.

mehcode commented 5 years ago

@stepancheg h2 seems to support both ALPN and trailers as of today from me taking a quick peek at it

stepancheg commented 5 years ago

@mehcode I recently tried to do a performance comparison between h2 and httpbis and very quickly found how to make h2 hang literally by copying h2 examples: https://github.com/carllerche/h2/issues/326 (Maybe it hanged by design, in that case, it is wrong design).

So I don't believe h2 library is better in quality than httpbis, so I prefer staying with httpbis for now.

mehcode commented 5 years ago

Fair enough. Hopefully that can be resolved in h2.

xpe commented 5 years ago

@stepancheg I confirmed the h2 hang using both your example code and the h2 examples directly. I hope this moves things along a little bit: https://github.com/carllerche/h2/issues/326#issuecomment-441820232

tmccombs commented 5 years ago

It looks like as of 0.1.15 that bug has been fixed.

xpe commented 5 years ago

Yes, h2 version 0.1.15 fixed the underlying race condition bug. Perhaps this will have a bearing on what stepancheg wrote above: "90% of grpc implementation is implementation of HTTP/2 (crate httpbis), grpc is a thin wrapper over HTTP/2. Hopefully h2 crate will be stable soon, so grpc could be changed to use that crate."