Node.js basics: `Reader` interface or `Readable` interface
- Dominant language
- HTML
- Stars
- 479
- Forks
- 545
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 5
Description
While going through the docs for [Node.js basics tutorial](https://grpc.io/docs/languages/node/basics/), I found a slight inconsistency.
Under the subsection "Implementing RouteGuide", it says the following under the `listFeatures(call)` function definition code:
> As you can see, instead of getting the call object and callback in our method parameters, this time we get a call object that implements the `Writable` interface. In the method, we create as many Feature objects as we need to return, writing them to the call using its write() method. Finally, we call call.end() to indicate that we have sent all messages.
>
> If you look at the client-side streaming method RecordRoute you’ll see it’s quite similar to the unary call, except this time the call parameter implements the `Reader` interface. The call’s 'data' event fires every time there is new data, and the 'end' event fires when all data has been read. Like the unary case, we respond by calling the callback...
>
In the first paragraph, the name of the interface is `Writable`, while in the second paragraph it is the `Reader` interface. For clarification, I looked at the [example code referenced in this article](https://github.com/grpc/grpc/blob/acb4686d928aa6de75ea53f12cdefff2773f8bff/examples/node/dynamic_codegen/route_guide/route_guide_server.js#L143), where the word `Readable` has been used.
Is `Reader` something separate, or is it just a minor inconsistency? If it's the latter, I would be happy to fix it (that is, if `Readable` was the intended name.)
Contributor guide
Research direction
Open the Node.js basics tutorial and review the “Implementing RouteGuide” section, then compare its interface names with examples/node/dynamic_codegen/route_guide/route_guide_server.js around the referenced implementation. Confirm the intended terminology and update the inconsistent documentation wording if appropriate.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100