Research Article
Towards a Virtual Block Approach to Tame Asynchronous Programming
@INPROCEEDINGS{10.4108/icst.bict.2014.257939, author={Hiroaki Fukuda and Takeshi Azegami and Paul Leger}, title={Towards a Virtual Block Approach to Tame Asynchronous Programming}, proceedings={8th International Conference on Bio-inspired Information and Communications Technologies (formerly BIONETICS)}, publisher={ICST}, proceedings_a={BICT}, year={2015}, month={2}, keywords={asynchronous programming aspect-oriented programming mod- ularity virtual block}, doi={10.4108/icst.bict.2014.257939} }
- Hiroaki Fukuda
Takeshi Azegami
Paul Leger
Year: 2015
Towards a Virtual Block Approach to Tame Asynchronous Programming
BICT
ACM
DOI: 10.4108/icst.bict.2014.257939
Abstract
Asynchronous programming has been widely adopted in domains such as Web development. This programming style usually uses callback methods, a non-blocking operation, allowing high respon- sible user interactions even if the application works without multi- threading. However this style requires to uncouple a module into two sub-modules at least, which are not intuitively connected by a callback method. The separation of the module brings the birth of other problems: callback spaghetti and callback hell. This paper proposes a virtual block approach to address previous problems. This approach enables a programmer to virtually block a program execution and restart it at arbitrary points in the program. As a result, programmers do not need to uncouple a module even if non- blocking operations are adopted; therefore, callback dependences disappear. Using aspect-oriented programming, this approach uses aspects to control the execution of a program in an oblivious man- ner. As a consequence, programmers do not need to care whether pieces of code use blocking or non-blocking operations. We im- plement a proof-of-concept of this approach, named SyncAS, for ActionScript3.