aPyCSP - Asynchronous PyCSP using python coroutines and asyncio
Research output: Chapter in Book/Report/Conference proceeding › Article in proceedings › Research › peer-review
PyCSP provides a CSP (Communicating Sequential Processes) based library for Python, where CSP processes can be executed as threads, operating system processes or greenlets. The main drawback of using threads and processes is that they limit the number of CSP processes that a program can use due to operating system restrictions and memory and synchronisation overheads. This overhead is reduced when using greenlets, but requires the use of an external library. aPyCSP is an experimental implementation of PyCSP that uses recent support for coroutines in Python and the asyncio library. This paper explores two implementation approaches for aPyCSP where the most recent version is shorter, simpler to read and understand and supports more functionality than the original version, including generic channel support and input and output guards. We believe some of the identified implementation techniques can be useful for other CSP libraries. The aPyCSP implementation is also faster and uses less memory per CSP process, allowing us to scale to 15 million processes on a computer with 64 GB memory.
Original language | English |
---|---|
Title of host publication | Communicating Process Architectures 2017 and 2018, WoTUG-39 and WoTUG-40 - Proceedings of CPA 2017 (WoTUG-39) and Proceedings of CPA 2018 (WoTUG-40) |
Editors | Jan Baekgaard Pedersen, Kevin Chalmers, Jan F. Broenink, Brian Vinter, Kevin Vella, Peter H. Welch, Marc L. Smith, Kenneth Skovhede |
Number of pages | 17 |
Publisher | IMIA and IOS Press |
Publication date | 2019 |
Pages | 281-297 |
ISBN (Electronic) | 9781614999485 |
DOIs | |
Publication status | Published - 2019 |
Event | 39th WoTUG Conference on Communicating Process Architectures, CPA 2017 and 40th WoTUG Conference on Communicating Process Architectures, CPA 2018 - Dresden, Germany Duration: 19 Aug 2018 → 22 Aug 2018 |
Conference
Conference | 39th WoTUG Conference on Communicating Process Architectures, CPA 2017 and 40th WoTUG Conference on Communicating Process Architectures, CPA 2018 |
---|---|
Land | Germany |
By | Dresden |
Periode | 19/08/2018 → 22/08/2018 |
Series | Concurrent Systems Engineering Series |
---|---|
Volume | 70 |
ISSN | 1383-7575 |
- APyCSP, Asynchronous, Coroutine, CSP, PyCSP, Python
Research areas
ID: 241090191