Skip to content

Flow docs #1432

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

Merged
merged 13 commits into from
Aug 22, 2019
Merged

Flow docs #1432

merged 13 commits into from
Aug 22, 2019

Conversation

elizarov
Copy link
Contributor

@elizarov elizarov commented Aug 9, 2019

No description provided.

@elizarov elizarov requested a review from qwwdfsad August 9, 2019 15:39
Copy link
Member

@qwwdfsad qwwdfsad left a comment

Choose a reason for hiding this comment

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

Tremendous work!

  1. "Flow context" paragraph should expose the fact, that code withing foo's flow is executed in the context of the caller, not the collect operator.
    Code sample should include foo body with a comment as well.

  2. "Wrong emission withContext" paragraph -- unformatted exception message.

  3. "Exception transparency" paragraph.

The catch intermediate operator, honoring exception transparency, catches only exceptions in its upstream flows.

"in its upstream flows" is not the correct phrasing. For example, "catches exceptions from the upstream aka from all the operators above the catch operator, but not the below" (or using "preceding" and "antecedent" terms).

If the block in collect { ... } downstream of catch throws an exception

This one can probably be rephrased in a more understandable manner as well. "collect downstream of catch" may not fully expose the idea.

  1. In general, "Flows" sounds unnatural, probably it's worth to replace phrases like "flows represent" with "flow represent".

  2. It feels like the guide ends right in the middle of the story. It would be nice to have a paragraph about launchIn (right after the declarative approach with collect()) and more general paragraph emphasizing that flow can be used both in declarative and imperative ways (similarly to loops and sequence operators) and that we do not enforce one way over another.

* Added new example showing how flow body executed in the collector's
  context.
* Better formatting for flowOn operator exceptions.
@elizarov elizarov requested a review from qwwdfsad August 14, 2019 13:03
Copy link
Member

@qwwdfsad qwwdfsad left a comment

Choose a reason for hiding this comment

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

Added a few sections, please take a look. Additionally, asked David to proofread the text.

In general, the structure looks good, though I still have a feeling (not really actionable at this point) that the second half is focused on the API instead of concepts

* Shorter example codes with less lines output.
* Added "Upstream exceptions only" section with additional example.
* "Imperative versus declarative" section moved one level up.
* Consistent empty lines and tense use ("will print" -> "prints", etc).
@elizarov
Copy link
Contributor Author

Reviewed and edited additional section about onCompletion. Added one more example, fixed review notes from @zach-klippenstein

@qwwdfsad qwwdfsad self-requested a review August 22, 2019 12:54
Copy link
Member

@qwwdfsad qwwdfsad left a comment

Choose a reason for hiding this comment

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

Nice!

@qwwdfsad qwwdfsad merged commit 3258e1f into develop Aug 22, 2019
@qwwdfsad qwwdfsad deleted the flow-docs branch August 22, 2019 17:08
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.

3 participants