GitXplorerGitXplorer
r

aio-csp-python

public
2 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
a62d020df7142094db659d295e75351ed7db8766

schedule task on other loop

rrrader committed 9 years ago
Unverified
5b127e10cb46e7eb0e67dde3674223fa67d12a72

References

rrrader committed 9 years ago
Unverified
83668e3833310842955dfaecd9847760a5ef7c9a

empty CSP loop added

rrrader committed 9 years ago
Unverified
6189cdfbb4fc04219075f69e140d042ddc543ad0

readme

rrrader committed 9 years ago
Unverified
061fd3fd2f91fcfa69276ba57560afbc5004c374

Initial commit

rrrader committed 9 years ago

README

The README file for this repository.

Communicating Sequential Processes within Python asyncio env

  1. To implement CSP, coroutines should communicate exclusively via channels (queue).
  2. Queue should support interprocess communication.
  3. Since coroutines do not share memory anymore (except of channels), they can be executed in separate python processes.
  4. It will enable real parallelism since there will be separate GIL in each python process.
  5. Ideally there should be same number of parallel loops running as the number of CPU cores 1.
  6. Distributed scheduler should be implemented to coordinate
  7. The ability to execute clones of a single coroutine should be present (e.g. if the input queue is growing faster then coroutine reads from it).
  8. One loop should be "master-loop" that marks coroutines to be executed on specific loop.
  9. For the sake of simplicity, initially just round-robin schedule policy should be implemented.
  10. Fast IPC for loops synchronization is required.

1 There's possibility to implement multi-node parallelism (as in Erlang)


References

  1. C.A.R. Hoare - Communicating Sequential Processes. Paper.
  2. python-csp: implementation of CSP on threads/processes. Code, presentation.
  3. PyCSP: paper.
  4. aioprocessing - https://github.com/dano/aioprocessing