Coder Social home page Coder Social logo

Comments (2)

drahnr avatar drahnr commented on July 26, 2024

What speaks against pushing the message off to a worker pool or FuturesUnordered if they tend to block? There is no requirement of having a loop over recv() and execute all futures that are consequential from that serially in the loop body. Note that this also allows a bounded implementation, not polling the messages stream until a task is received.
Or do you require the tasks to be cancellable on a view update?

Or are you talking about the overload condition where there is an excessive amount of messages?

There is quite a bit of constraints context missing - even after reading the linked discussion - to be for or against the extension.

from orchestra.

s0me0ne-unkn0wn avatar s0me0ne-unkn0wn commented on July 26, 2024

What speaks against pushing the message off to a worker pool or FuturesUnordered if they tend to block?

That is exactly what we are doing right now, and that causes backpressure issues. Spawning a new task on every message effectively renders the message channel unbounded, as the number of spawned tasks is unbounded. If we try to limit the number of tasks spawned (awaiting for a free slot in some second-level task pool with a limited number of concurrent tasks to create a backpressure on the message channel), it also blocks signal processing.

The behavior we want is like that: Subsys1 sends messages to Subsys2. The latter spawns tasks, limiting the number of concurrent tasks somehow. If Subsys1 starts spamming Subsys2 with a large number of messages, each spawning a task from the Subsys2 side, at some point, the task pool gets full, and Subsys2 awaits for a free slot, thus stopping recving new messages. Subsys1 has to await on send. Thus, backpressure is channeled from Subsys2 to Subsys1.

In principle, it works even now but blocks signal processing completely. If tasks from the Subsys2 side are heavy, potentially executing up to 60 sec, it's no good we're skipping leaf activations and even Conclude.

That is where the idea to separate signal and message channels comes from. Hope that helps.

from orchestra.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.