Visualize gRPC and Protocol Buffers
Asked Answered
S

2

26

We are close to 100 .proto files, where every may define around 10 IDL structures (like service or message).

Is there a way to visualize of of them, including references (from one file to other). For example similar to UML class diagram.

Possibly there are configurable visualizer for Java/C++.

Quote from https://developers.google.com/protocol-buffers/docs/overview

Protocol buffers are now Google's lingua franca for data – at time of writing, there are 48,162 different message types defined in the Google code tree across 12,183 .proto files.

I wonder how they handle this.

Surgy answered 17/11, 2016 at 14:46 Comment(1)
Google doesn't have this problem. It's pretty rare in practice to need to visualize protos. Do you have a specific problem you want to solve? How would visualizing help that problem?Beckman
J
25

https://github.com/seamia/protodot

  • Super easy to use and pretty powerful tool
  • Generates .dot (and .svg/.png if graphviz is installed) files from .proto
  • Discovers all the dependencies and doesn't require all of them to be present
  • Filters by specified resources (messages, rpcs, services, enums)
  • Can generate import dependency graph

Jessjessa answered 3/10, 2019 at 6:26 Comment(1)
This should be chosen as the answer! so much better than all the tools listed earlier. Thanks @JessjessaLotty
C
17

I have similar problem: I'm trying to read huge amount of protobufs and understand relation between them. It would be very useful to build a visual representation of them to see what's available and how they're connected to each other.

I've found several projects, maybe they would help someone:

Though, for me they didn't worked well for different reasons, but you can try them.

Caithness answered 1/11, 2017 at 13:38 Comment(3)
This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. You can also add a bounty to draw more attention to this question. - From ReviewLantern
Why do you think it's not answering the question? Topic starter asked for a way to visualize gRPC/Protobufs -- I provided a link of available projects which supposed to do what he asks.Caithness
Perhaps add context around the links so your fellow users will have some idea what it is and why it’s there. Always quote the most relevant part of an important link, in case the target site is unreachable or goes permanently offline.Lantern

© 2022 - 2024 — McMap. All rights reserved.