docs(storage): add open_object_walkthrough.md#5783
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds a comprehensive documentation walkthrough (open_object_walkthrough.md) for the Storage::open_object bidirectional streaming RPC in the google-cloud-storage crate. The document details the architectural mental model, call graphs, linear execution traces, channel multiplexing, and the client-side resilience machinery such as redirects and reconnects. As there are no review comments associated with this pull request, I have no further feedback to provide.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5783 +/- ##
=======================================
Coverage 97.88% 97.88%
=======================================
Files 226 226
Lines 56465 56465
=======================================
Hits 55272 55272
Misses 1193 1193 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
6067bb5 to
2c5ce96
Compare
coryan
left a comment
There was a problem hiding this comment.
I think it would be durable to save the prompts used to produce this, rather than the output. The document may be helpful, but it is more helpful to produce updated versions of the doc.
| never leave the application). The latter two represent the actual **gRPC stream | ||
| halves** sent over the network. |
There was a problem hiding this comment.
gRPC streams halves are not "sent over the network".... If anything, they send and receive messages to and from the network.
| The server is entirely stateless; it retains no per-read progress state across | ||
| streams. The server acts as a dumb, incredibly fast pipe. **The entire | ||
| conversation state lives on the client.** | ||
|
|
||
| Because every dial is completely self-contained, any backend can serve any | ||
| portion of any read at any given time. Backends can vanish without warning, and | ||
| the client gracefully self-heals. | ||
|
|
||
| > **Takeaway:** The server is the dumb-but-fast pipe; the client is the | ||
| > smart-but-stateful brain. The SDK's worker, equipped with its | ||
| > `HashMap<i64, ActiveRead>`, is literally that brain in code form—a live, | ||
| > dynamic model tracking exactly "where we are in every conversation." |
| gracefully shut down (`worker.rs:88–93`). By keeping a clone here, we creatively | ||
| repurpose standard channel liveness semantics into a foolproof reference | ||
| counting mechanism. |
There was a problem hiding this comment.
Personally, I cannot stand the sycophantic verbiage produced by LLMs 🤷 The comment ("... holding a copy prevents ...") gives you all the information you need.
| r.as_proto(id) ──▶ ProtoRange { read_id: 7, ... } | ||
| Server processes read | ||
| ◀── ObjectRangeData { |
There was a problem hiding this comment.
The use of inconsistent arrow types is annoying.
| @@ -0,0 +1,1885 @@ | |||
| # `open_object` — A Walkthrough | |||
|
|
|||
| *Last updated: 2026-05-27* | |||
There was a problem hiding this comment.
Since this is full of line numbers, you may want to capture the exact commit SHA
The fruit of my efforts to understand
open_object. Adding it to the repo as it might be: