coobas / wowp

WOWP (A WOrkfloW Framework in Python) is a modern, light-weight framework for integrated simulations in science.
http://pythonic.eu/wowp/
MIT License
2 stars 1 forks source link

Broken linearity of ThreadedScheduler #2

Open coobas opened 9 years ago

coobas commented 9 years ago

Originally reported by: Jan Pipek (Bitbucket: janpipek, GitHub: janpipek)


It breaks (and similarly the randomizing one) one of the key concepts of FBP. What enters, should leave in the same order (unless the component itself explicitly re-arranges the inputs).

The actors should not be re-entrant (at least not by default) and their queues should be managed by the scheduler properly.

See test in janpipek/wowp repo.


coobas commented 9 years ago

Original comment by Jakub Urban (Bitbucket: urbanj, GitHub: urbanj):


This is serious. Bloody parallelism ...

Are these rules enough?

  1. Each actor (instance) cannot run multiple times concurrently (i.e. is not re-entrant).
  2. Schedulers must keep the order of outputs in the same order as inputs.

Perhaps 1. is not necessary if the actor implementation can handle reentrancy (and is thread safe). It's probably too risky anyway.