arrow icon indicating copy to clipboard operation
arrow copied to clipboard

ARROW-17407: [Doc][FlightRPC] Flight/gRPC best practices

Open rok opened this issue 1 year ago • 2 comments

We want to provide best practices and debugging section in:

cpp flight docs python flight docs java flight docs R flight docs

rok avatar Aug 14 '22 02:08 rok

https://issues.apache.org/jira/browse/ARROW-17407

github-actions[bot] avatar Aug 14 '22 02:08 github-actions[bot]

@rok Can we also add best practices and debugging sections in the Go docs too?

This can be done by either a README.md in the go/arrow/flight directory or by having a "package comment" in the directory (a comment directly above the package flight line in one of the .go files (convention is usually a file named doc.go).

Would you prefer for me to add it to this branch?

zeroshade avatar Aug 14 '22 16:08 zeroshade

@rok Can we also add best practices and debugging sections in the Go docs too?

Thanks for chiming in @zeroshade! I was going to ask you where to put the Go specific content :). I'll add it and ping you back.

rok avatar Aug 15 '22 14:08 rok

@rok Sounds great! Have a look at go/arrow/doc.go or go/parquet/doc.go for some examples.

https://tip.golang.org/doc/comment also gives a good rundown of how the format of the comment gets translated into the formatting of the rendered docs on pkg.go.dev (TL;DR it's similar to just using markdown)

zeroshade avatar Aug 15 '22 16:08 zeroshade

@zeroshade I've added the Go doc. Please check if it makes sense, it's my first time touching Go docs.

rok avatar Aug 15 '22 23:08 rok

@lidavidm I'm now linking to c++ from python/java/R docs which is not ideal, but duplicating text is not either. Any thoughts?

rok avatar Aug 16 '22 00:08 rok

I'm now linking to c++ from python/java/R docs which is not ideal, but duplicating text is not either. Any thoughts?

IMO, I would think there should be a common area for the text since that is common across languages. Then, the c++ docs can include code snippets as appropriate which don't seem too relevant to the other languages.

The "Arrow Flight RPC" section under "Specifications and Protocols" seems like a good place to me, since those descriptions seem to be more related to best practices of using the protocol overall.

drin avatar Aug 16 '22 00:08 drin

The code snippet could potentially be moved to a cookbook type thing too?

drin avatar Aug 16 '22 00:08 drin

What's wrong with linking to the C++ docs?

The format/ page for Flight RPC is meant more for things all implementations agree on, I don't think these tips really go there

lidavidm avatar Aug 16 '22 00:08 lidavidm

Also, linking to the C++ docs isn't applicable in all situations, they don't apply to Java for instance.

lidavidm avatar Aug 16 '22 00:08 lidavidm

The same goes for Go.

If we want to centralize things, we should think about where to do that. And then all the language docs can link there. (I think Sphinx has a 'tabs' extension we could use for the language-specific snippets too.)

lidavidm avatar Aug 16 '22 00:08 lidavidm

What's wrong with linking to the C++ docs?

I don't think there's anything wrong with it. I was just thinking through alternatives since Rok didn't seem to like it.

Also, linking to the C++ docs isn't applicable in all situations, they don't apply to Java for instance.

Maybe I misread that portion of the PR, but I think it references it at the moment? I don't know the details, so not sure if some of the descriptions need disentangling

drin avatar Aug 16 '22 00:08 drin

The Java docs link to the C++ docs - but the C++ docs don't apply to Java. The bit about allocations doesn't apply to Java at all, for instance.

lidavidm avatar Aug 16 '22 00:08 lidavidm

options that make the most sense to me are:

  1. make a new page, perhaps under the "development" section?
  2. leave the structure as is, and let a PR for ARROW-17378 and/or ARROW-6390 re-structure?

drin avatar Aug 16 '22 00:08 drin

Maybe we should consider a separate tutorial section then? Even if they're language-specific? (Well, 'tutorials and guides' or something…) The Flight tutorials could probably be made to work with the same 'tab' structure so they can cover multiple languages at once (though that should be used sparingly)

lidavidm avatar Aug 16 '22 00:08 lidavidm

Assuming this tab structure: I like the idea of a tab structure in cases where code snippets are small (or whatever text will go in the tabs), which seems to apply to what I see in this documentation. I also think that for something like flight, the focus is more on the protocol and communication so it's a case where there is a lot of conceptual overlap so tabs may work well here.

Otherwise, I don't have strong opinions about "best practices" being in, or separate from, a tutorial section.

drin avatar Aug 16 '22 00:08 drin

I didn't get to this today, should hopefully get to look at it this week

lidavidm avatar Aug 16 '22 22:08 lidavidm

@github-actions crossbow submit preview-docs

rok avatar Aug 20 '22 01:08 rok

Revision: 1c4b615d8ef1f99fe3a5d426a0a96d72d6771447

Submitted crossbow builds: ursacomputing/crossbow @ actions-703d0857cf

Task Status
preview-docs Github Actions

github-actions[bot] avatar Aug 20 '22 01:08 github-actions[bot]

https://crossbow.voltrondata.com/pr_docs/13873/cpp/flight.html#best-practices

rok avatar Aug 20 '22 10:08 rok

@github-actions crossbow submit preview-docs

rok avatar Aug 20 '22 11:08 rok

Revision: 81561aca202830f553973e6540a644f104a6cdc5

Submitted crossbow builds: ursacomputing/crossbow @ actions-6869e14038

Task Status
preview-docs Github Actions

github-actions[bot] avatar Aug 20 '22 11:08 github-actions[bot]

@lidavidm @zeroshade I've addressed most of the feedback, you can see the rendered docs here: https://crossbow.voltrondata.com/pr_docs/13873/cpp/flight.html#best-practices

I'll be traveling until next Monday so feel free to either wait or finish this without me.

rok avatar Aug 20 '22 11:08 rok

@github-actions crossbow submit preview-docs

rok avatar Aug 21 '22 02:08 rok

Revision: a6769e7fa5b8c5d11e0a87e172ecbe81fb3ab1ba

Submitted crossbow builds: ursacomputing/crossbow @ actions-15c34ca64d

Task Status
preview-docs Github Actions

github-actions[bot] avatar Aug 21 '22 02:08 github-actions[bot]

@github-actions crossbow submit preview-docs

rok avatar Sep 02 '22 18:09 rok

I've addressed the feedback (hopefully all) and opened a cookbook issue (https://github.com/apache/arrow-cookbook/issues/251). Would appreciate another look! :)

rok avatar Sep 02 '22 18:09 rok

Revision: f7692480997c03276f82a5a468fbc28fa4bf9532

Submitted crossbow builds: ursacomputing/crossbow @ actions-f012880c10

Task Status
preview-docs Github Actions

github-actions[bot] avatar Sep 02 '22 18:09 github-actions[bot]

Thanks for the review @lidavidm ! I think I addressed everything and sorry for not being faster.

rok avatar Sep 09 '22 18:09 rok

@github-actions crossbow submit preview-docs

rok avatar Sep 09 '22 19:09 rok