Open Universiteit

Please use this identifier to cite or link to this item: http://hdl.handle.net/1820/7509
Full metadata record
DC FieldValueLanguage
dc.contributor.authorKrauweel, Marco-
dc.date.accessioned2017-03-09T10:39:42Z-
dc.date.available2017-03-09T10:39:42Z-
dc.date.issued2017-02-21-
dc.identifier.urihttp://hdl.handle.net/1820/7509-
dc.description.abstractWeb Workers and other asynchronous JavaScript APIs (like XHR/AJAX and GeoLocation) provide us a facility to process (large) tasks in the background to ensure that a JavaScript application stays responsive and does not freeze up. The way these asynchronous APIs are exposed to the application logic is usually via events or callbacks. Unfortunately, events and callbacks induce a non-linear control ow and (as a result) JavaScript programs may become difficult to understand, maintain and test. Web Workers, for instance, utilize asynchronous message passing to communicate with the main thread. Designing and implementing these message-passing contracts and writing event listeners (to act upon those messages) is time-consuming and error-prone. One approach to improve the problems related to asynchronous/concurrent JavaScript programming is to separate programming of computation code (processes) from program- ming of synchronization/communication code (protocols). For the former, programmers can perfectly use JavaScript, but for the latter (which is hard to do in JavaScript), pro- grammers can use a special domain-specific language (DSL), specifically designed to make programming of protocols simpler. Reo is such a DSL. In this thesis we use Reo as a 'glue language' for modelling the synchronization/communication logic between asynchronous JavaScript APIs (like Web Workers, XHR/AJAX and GeoLocation) and the main thread. The visual representation of Reo gives better insight in the data ow of an asynchronous/concurrent JavaScript application. Isolating synchronization/communication logic leads to reusable, pure coordination code (protocols), while programmers can focus on writing computation code (processes) [1]. We demonstrate that it is actually possible to write concurrent/asynchronous JavaScript programs using Reo by implementing two reference applications: One application that communicates with Web Workers and another application orchestrating multiple asynchronous JavaScript APIs. We also demonstrate that a Reo application can run both client-side (in a web browser) and server-side (in Node.js [19]). We conclude that Reo gives some nice advantages related to separation of responsibilities (between processes and protocols), re-usage of processes/protocols and understanding the control-ow of a JavaScript application. A disadvantage is that Reo comes with a learning curve. Alternatives discussed in related work are sometimes easier to apply for a specific problem. Our suggestions for further research include researching if Reo can improve the testability of JavaScript applications by model checking. Additionally, we should improve the Reo designer to improve usability and decrease Reo's learning curve for JavaScript developers.en_US
dc.language.isoenen_US
dc.publisherOpen Universiteit Nederlanden_US
dc.subjectJavaScript programmingen_US
dc.subjectReoen_US
dc.titleConcurrent and asynchronous JavaScript programming using Reoen_US
dc.typeMaster thesisen_US
Appears in Collections:MSc Software Engineering

Files in This Item:
File Description SizeFormat 
INF_20170221_Krauweel.pdf2.03 MBAdobe PDFView/Open


Items in DSpace are protected by copyright, with all rights reserved, unless otherwise indicated.