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

Explain concept of Fusion and Workers #2349

Closed
magware-dev opened this issue Sep 1, 2020 · 1 comment
Closed

Explain concept of Fusion and Workers #2349

magware-dev opened this issue Sep 1, 2020 · 1 comment
Assignees
Labels
status/declined We feel we shouldn't currently apply this change/suggestion type/documentation A documentation update

Comments

@magware-dev
Copy link

The documentation at https://projectreactor.io/docs/core/release/reference/ is amazing, because it also explains core concepts of reactive programming.

I am currently learning project reactor and want to point out two things that I struggle with and can not find documentation for.

Documentation Issue

Fusable Interface: It shows up when using the .log() operation and also while browsing the core-code, many methods use the reactor.core.Fuseable interface (often in instanceof checks). Apparently a Publisher can be Fusable and I would like to know what that means.

Worker Interface: When looking into the Schedulers there is the reactor.core.scheduler.Scheduler.Worker interface. I found some doc about Schedulers (4.5), but no real mention of the Workers. As far as I understand, all operations request a Worker from a Scheduler to run and it looks like they play a really important role. So my suggestion is to mention them in the 4.5 Schedulers sections.

Improvement Suggestion

Add "Fusable" and "Scheduler.Worker" sections to the doc that explains those concepts.

@reactorbot reactorbot added the ❓need-triage This issue needs triage, hasn't been looked at by a team member yet label Sep 1, 2020
@simonbasle simonbasle added help wanted We need contributions on this type/documentation A documentation update and removed ❓need-triage This issue needs triage, hasn't been looked at by a team member yet labels Nov 2, 2020
@simonbasle simonbasle added this to the 3.4.1 milestone Nov 2, 2020
@simonbasle simonbasle modified the milestones: 3.4.1, 3.4.2 Dec 2, 2020
@OlegDokuka OlegDokuka self-assigned this Dec 16, 2020
@simonbasle simonbasle modified the milestones: 3.4.2, Backlog Jan 8, 2021
@simonbasle simonbasle assigned simonbasle and unassigned OlegDokuka Jan 19, 2021
@chemicL chemicL modified the milestones: 3.4.x Backlog, 3.6.x Backlog Mar 18, 2024
@chemicL
Copy link
Member

chemicL commented Aug 20, 2024

When it comes to Scheduler.Worker, I think the Javadoc is quite sufficient to grasp the idea. E.g.

/**
 * Creates a worker of this Scheduler.
 * <p>
 * Once the Worker is no longer in use, one should call dispose() on it to
 * release any resources the particular Scheduler may have used.
 *
 * It depends on the implementation, but Scheduler Workers should usually run tasks in
 * FIFO order. Some implementations may entirely delegate the scheduling to an
 * underlying structure (like an {@link ExecutorService}).
 *
 * @return the Worker instance.
 */
Worker createWorker();

For operator fusion and the significance of the Fuseable interface:

Leaving the above for future seekers, but with the fact that for almost 4 years nobody picked this up, I don't think we'll find the time to explain these internals more. Perhaps someone decides to do so in the future - we can always welcome a PR :)

@chemicL chemicL closed this as not planned Won't fix, can't repro, duplicate, stale Aug 20, 2024
@chemicL chemicL added status/declined We feel we shouldn't currently apply this change/suggestion and removed help wanted We need contributions on this labels Aug 20, 2024
@chemicL chemicL removed this from the 3.6.x Backlog milestone Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/declined We feel we shouldn't currently apply this change/suggestion type/documentation A documentation update
Projects
None yet
Development

No branches or pull requests

5 participants