Setting Up a gRPC Protobuf Server With Tonic

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • rust-analyzer

    Discontinued A Rust compiler front-end for IDEs [Moved to: https://github.com/rust-lang/rust-analyzer] (by rust-analyzer)

    The original message from rust-analyzer was confusing to me because I remembered turning it on, but I couldn't find it anymore. Rust-analyzer is always changing quickly, so my first instinct was that maybe they had changed the configuration recently. Looking at the issues for rust-analyzer, I found one that said the setting had been renamed to runBuildScripts. This one happened to be on in my configuration, so I decided it might be better to look into the other error message.

  • tonic

    A native gRPC client & server implementation with async/await support.

    This post documents my experience setting up an example project with rust and tonic, which is maintained by one of my coworkers, Lucio. I will set up a simple server, add some other APIs and set up a second server to do health checks.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

  • cargo-edit

    A utility for managing cargo dependencies from the command line.

    If you're used to rust, this shouldn't be difficult to follow. It's the general way that one starts a project in the rust world. You may need to install cargo-edit in order to have cargo add, but it's well worth it for managing dependencies in your cargo project.

  • evans

    Evans: more expressive universal gRPC client

    After running the server with cargo run, I needed a way to test that the server works. I had heard of an interesting tool called evans, so I decided to use this. It took me a while to figure out the right parameters to query the server, especially because tonic doesn't seem to support gRPC reflection right now, and there are few examples out there.

  • gRPC

    The C based gRPC (C++, Python, Ruby, Objective-C, PHP, C#)

    gRPC is a system developed by Google for fast RPC-style communication between miroservices. It uses HTTP/2 as its transport protocol, and by default, it uses protobuf (analogous to JSON) as its serialization format.

  • Protobuf

    Protocol Buffers - Google's data interchange format

    gRPC is a system developed by Google for fast RPC-style communication between miroservices. It uses HTTP/2 as its transport protocol, and by default, it uses protobuf (analogous to JSON) as its serialization format.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts