Towards a Virtual Block Approach to Tame Asynchronous Programming

Regular price $0.00 Sale

8th International Conference on Bio-inspired Information and Communications Technologies (formerly BIONETICS)
Hiroaki Fukuda1, Takeshi Azegami1, Paul Leger2
1: Shibaura Institute of Technology
2: Universidad Católica del Norte Chile

    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.