Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blogpost about how to use wireshark with protobuf and grpc dissectors #467

Merged

Conversation

huangqiangxiong
Copy link
Contributor

@huangqiangxiong huangqiangxiong commented Oct 20, 2020

Add this blogpost as recommended on protocolbuffers/protobuf#3303.

There may be some grammatical errors. You are welcome to modify them directly if you like.

Preview: https://deploy-preview-467--grpc-io.netlify.app/blog/how-to-analyze-grpc-with-wireshark/

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Oct 20, 2020

CLA Check
The committers are authorized under a signed CLA.

@huangqiangxiong
Copy link
Contributor Author

@jtattermusch hello, what else do I need to do about this PR? Or need I submit an issue for it?

@chalin
Copy link
Collaborator

chalin commented Oct 23, 2020

Hi @huangqiangxiong - no, nothing more to be done. I've assigned @jtattermusch and @ejona86 as technical reviewers; if you think that someone else from the gRPC team might be a good/more suitable reviewer, let me know. I'll review (from a tech writers p.o.v), most likely early next week. /cc @thisisnotapril

@huangqiangxiong
Copy link
Contributor Author

Hi @huangqiangxiong - no, nothing more to be done. I've assigned @jtattermusch and @ejona86 as technical reviewers; if you think that someone else from the gRPC team might be a good/more suitable reviewer, let me know. I'll review (from a tech writers p.o.v), most likely early next week. /cc @thisisnotapril

OK. Thank you for your efforts.

Copy link
Contributor

@jtattermusch jtattermusch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the blogpost, that's a very useful reading and I like that there's a plenty of examples.

@chalin can you please review from the techwriter perspective?

content/blog/wireshark-protobuf-and-grpc-dissectors.md Outdated Show resolved Hide resolved
@chalin
Copy link
Collaborator

chalin commented Oct 27, 2020

@jtattermusch - thanks for your review! I'll do mine shortly.

@chalin
Copy link
Collaborator

chalin commented Nov 2, 2020

@ejona86 has somment comments about the content, so I'll wait for those before I make my pass.

@chalin
Copy link
Collaborator

chalin commented Nov 8, 2020

@huangqiangxiong - I have some general questions for you about this blog entry:

  • What is your target audience?
  • In two sentences or less, can you summarize the blog entry (so that, in reading your one or two sentences, someone would feel interested in reading the entire post :).
  • After reading this blog entry, what should the reader have learned?
    That is, what are the expected learning outcomes?

(Once you've answered those questions, you might want to rethink the title.)

At the moment, the blog entry is feeling a little too heavy on the details.

You might consider dropping the following
(@ejona86 feel free to chime in):

  • Details about the JSON-serialized capture. (I think that it is enough to mention support for JSON in the feature list)
  • Details about UDP
  • "Write your own Protobuf UDP or TCP dissectors" how often does a user have to write a custom dissector? If it isn't often, then consider removing the details from the text and simply referring the reader to Wireshark documentation.

I have other comments about the text, but I'll wait for some feedback from @ejona86.

I would like to point out one broad change that I feel will be necessary: "protobuf" isn't an English word and, as far as I know, it isn't an accepted abbreviation for "protocol buffers" or ".proto file". You should use the latter, as appropriate, instead.

@huangqiangxiong
Copy link
Contributor Author

@chalin, thank you for your comments. Please see my reply.

  • What is your target audience?

I think the audience of this blog is mainly the following two kinds of people:

  1. The people who want to debug or analyze their own gRPC or protobuf (Protocol Buffers) based messages transferred over the wire (network) by Wireshark.
  2. The people who want to study the binary wire format of gRPC protocol or protocols based on protobuf. (Just as I wanted when I started learning protobuf and gRPC)

The original motivation of writing this article comes from the people's requirements from following links:
protocolbuffers/protobuf#3303
grpc/grpc#13586

  • In two sentences or less, can you summarize the blog entry (so that, in reading your one or two sentences, someone would feel interested in reading the entire post :).

With Wireshark, people can analyze the messages of gRPC protocol or protocols based on Protocol Buffers (a.k.a protobuf) that transferred over the wire (network), or learning the binary wire format of these protocols.

  • After reading this blog entry, what should the reader have learned?
    That is, what are the expected learning outcomes?

This tutorial will show you how to configure and use Wireshark offical protobuf and gRPC dissectors to analyze grpc and protobuf based protocols with .proto files.

(Once you've answered those questions, you might want to rethink the title.)

How about the title "How to dissect grpc and Protobuf based protocols with Wireshark"?

At the moment, the blog entry is feeling a little too heavy on the details.

You might consider dropping the following
(@ejona86 feel free to chime in):

  • Details about the JSON-serialized capture. (I think that it is enough to mention support for JSON in the feature list)

OK, I will remove it.

  • Details about UDP
  • "Write your own Protobuf UDP or TCP dissectors" how often does a user have to write a custom dissector? If it isn't often, then consider removing the details from the text and simply referring the reader to Wireshark documentation.

Indeed, the two features of UDP and "Write your own Protobuf UDP or TCP dissectors" are only related to protobuf and have nothing to do with grpc. But they are important to Protobuf only users. If you don't think it's appropriate to put this content here, I will just simply leave a link referring to Wireshark documentation.

I have other comments about the text, but I'll wait for some feedback from @ejona86.

I would like to point out one broad change that I feel will be necessary: "protobuf" isn't an English word and, as far as I know, it isn't an accepted abbreviation for "protocol buffers" or ".proto file". You should use the latter, as appropriate, instead.

But it seems that the word "protobuf" is also being used by the protocol buffers official code repository at https://github.com/protocolbuffers/protobuf. Or how about to use "Protocol Buffers" in the title or at the beginning of the article, like this: "Protocol Buffers (a.k.a., Protobuf)", and then still using "Protobuf" later?

@chalin
Copy link
Collaborator

chalin commented Nov 12, 2020

@huangqiangxiong, thanks for your thoughtful reply and, in particular, for the link to the issues that provide the background / motivation for your blog post. I feel that we're making progress in clarifying intent and scope.

How about if we approached this incrementally? Could you make a pass to strip out the large chunks that we seem to be agreeing to remove: JSON-serialized capture, UDP and "Write your own..." (while leaving "a link referring to Wireshark documentation", as you suggested)?

As a first blog post on the use of Wireshark to analyze gRPC traffic I can think of two main alternative scopes:

(1) Only introduce Wireshark and its capabilities, linking to articles elsewhere for practical "How to use Wireshark with gRPC" instructions.

(2) If no such "how to" articles exist elsewhere, then this blog post could be a first one. What I find missing from your current writeup is details for setting up and capturing gRPC network traffic, but I have no idea how easy it would be to cover that concisely -- and maybe that could be the topic of another post.

I'm not saying that you need to change the scope of your blog post (e.g., by adding details about how to capture traffic). But I would like the scope to be clear so that readers know what they're going to learn, and where to go to to learn more.

Copy link
Member

@ejona86 ejona86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Protobuf" is fine to use, as we do use it constantly in speak and writing. It's actually pretty easy to forget that they have a fuller name. But we should probably ease into it and refer to "Protocol Buffers" initially in the title and first sentence.

The content itself looks pretty good, but it seems there will need to be a reasonable amount of editorial changes to improve flow.

content/blog/wireshark-protobuf-and-grpc-dissectors.md Outdated Show resolved Hide resolved
content/blog/wireshark-protobuf-and-grpc-dissectors.md Outdated Show resolved Hide resolved
content/blog/wireshark-protobuf-and-grpc-dissectors.md Outdated Show resolved Hide resolved
content/blog/wireshark-protobuf-and-grpc-dissectors.md Outdated Show resolved Hide resolved
@huangqiangxiong
Copy link
Contributor Author

@chalin @ejona86, I have updated and committed a new version according to your comments. Please help to review, thanks.

@chalin
Copy link
Collaborator

chalin commented Nov 16, 2020

Thanks for the updates! I'll get back to you as soon as I can.

@chalin
Copy link
Collaborator

chalin commented Nov 26, 2020

@huangqiangxiong - could you rebase and (force) push? I'd be ready soon to make a pass over this PR.

@chalin
Copy link
Collaborator

chalin commented Nov 27, 2020

Thanks for the updates.

@huangqiangxiong - could you rebase and (force) push? I'd be ready soon to make a pass over this PR.

Have you been able to rebase and push?

chalin added a commit that referenced this pull request Nov 27, 2020
chalin added a commit to huangqiangxiong/grpc.io that referenced this pull request Nov 27, 2020
@chalin
Copy link
Collaborator

chalin commented Nov 27, 2020

Oups, I committed some copyedits directly to this PR via 9a456a8 (see above). That wasn't my intention; what I wanted to do was submit a PR over your PR so that you could then review, approve and then merge my changes back into this PR. This was meant to be a practice run. I'll try to do differently next time.

I'm mentioning all of this just because you'll need to pull my changes in before you rebase.

@huangqiangxiong huangqiangxiong force-pushed the wireshark-protobuf-and-grpc-dissectors branch from 9a456a8 to 0f1e5a2 Compare November 28, 2020 08:10
huangqiangxiong pushed a commit to huangqiangxiong/grpc.io that referenced this pull request Nov 28, 2020
@huangqiangxiong
Copy link
Contributor Author

Oups, I committed some copyedits directly to this PR via 9a456a8 (see above). That wasn't my intention; what I wanted to do was submit a PR over your PR so that you could then review, approve and then merge my changes back into this PR. This was meant to be a practice run. I'll try to do differently next time.

I'm mentioning all of this just because you'll need to pull my changes in before you rebase.

@chalin I tried to find the 'rebase' button on the web UI, but I couldn't find it. Instead, I have run the following commands (as I usually do on gitlab):

Is this the correct way to rebase and force push? But it shows some checks were not successful now.

huangqiangxiong added a commit to huangqiangxiong/grpc.io that referenced this pull request Nov 28, 2020
huangqiangxiong added a commit to huangqiangxiong/grpc.io that referenced this pull request Nov 28, 2020
also change spelling position and date
@huangqiangxiong huangqiangxiong force-pushed the wireshark-protobuf-and-grpc-dissectors branch from a8b1b08 to 971833f Compare November 28, 2020 09:39
huangqiangxiong added a commit to huangqiangxiong/grpc.io that referenced this pull request Nov 28, 2020
@huangqiangxiong huangqiangxiong force-pushed the wireshark-protobuf-and-grpc-dissectors branch from 971833f to 460809d Compare November 28, 2020 11:58
@chalin
Copy link
Collaborator

chalin commented Nov 28, 2020

@huangqiangxiong - your force push seems to have worked, thanks! I cleared the preview-server caches, and now the previews are being successfully built. I'll continue my review and submit some edits as soon as I can.

chalin added a commit to huangqiangxiong/grpc.io that referenced this pull request Dec 4, 2020
chalin pushed a commit to huangqiangxiong/grpc.io that referenced this pull request Dec 4, 2020
@chalin chalin force-pushed the wireshark-protobuf-and-grpc-dissectors branch from 460809d to e26a31e Compare December 4, 2020 16:23
chalin added a commit to huangqiangxiong/grpc.io that referenced this pull request Dec 4, 2020
chalin pushed a commit to huangqiangxiong/grpc.io that referenced this pull request Dec 4, 2020
@chalin chalin force-pushed the wireshark-protobuf-and-grpc-dissectors branch from e26a31e to 81098a1 Compare December 4, 2020 16:24
huangqiangxiong and others added 5 commits December 4, 2020 19:39
1. change title to "How to analyze gRPC with Wireshark"
2. add link to github id (after the name attribute).
3. add "Protocol Buffers" for "Protobuf" in first sentence.
4. add summary info about the intent and scope of this blog.
5. move the history to a nearly end section.
6. add a short section about how to capture gRPC traffic.
7. change "official *.proto library of Protobuf" to "Protocol Buffers Well-Known Types"
8. remove the section about JSON-serialized capture.
9. remove the sections about build-in UDP and custom dissectors, instead leaving a link to wireshark protobuf wiki page.
10. remove sample link of Protobuf only capture from referrence section.
Updated according to comments.
1. Update date.
2. Fixed some link errors.
@chalin chalin force-pushed the wireshark-protobuf-and-grpc-dissectors branch from 81098a1 to 38294ea Compare December 5, 2020 00:39
@chalin
Copy link
Collaborator

chalin commented Dec 5, 2020

I wanted to do was submit a PR over your PR

@huangqiangxiong - I haven't been able to find a way to do this for your PR (although I've seen it work before), so this is what I've done/decided to do:

  • I've marked the post as a draft, that way it won't show up on the production (or even the preview) server yet.
  • I'll accept and merge this PR.
  • Finally, I'll submit changes to your blog post as separate PR(s) for your approval.

Once we're both satisfied with the post, we can drop the draft status and it will appear on the production server.

I'm hoping that everyone is ok with all this!

@chalin chalin merged commit 40a2de5 into grpc:main Dec 5, 2020
@chalin
Copy link
Collaborator

chalin commented Dec 5, 2020

Thanks for you patience @huangqiangxiong. In the end we'll have a nicely polished blog post!

@huangqiangxiong
Copy link
Contributor Author

I wanted to do was submit a PR over your PR

@huangqiangxiong - I haven't been able to find a way to do this for your PR (although I've seen it work before), so this is what I've done/decided to do:

  • I've marked the post as a draft, that way it won't show up on the production (or even the preview) server yet.
  • I'll accept and merge this PR.
  • Finally, I'll submit changes to your blog post as separate PR(s) for your approval.

Once we're both satisfied with the post, we can drop the draft status and it will appear on the production server.

I'm hoping that everyone is ok with all this!

OK. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants