Please use this identifier to cite or link to this item: https://www.um.edu.mt/library/oar/handle/123456789/13881
Title: Communicating sequential processes in distributed JavaScript environments
Authors: Micallef, Kurt
Keywords: JavaScript (Computer program language)
Sequential processing (Computer science)
CSP (Computer program language)
Issue Date: 2016
Abstract: By design, JavaScript is a single-threaded language, as its event-loop processes messages on its runtime queue. Since each queued message is run to completion, the opportunities for concurrency in JavaScript are limited when compared to other general purpose languages. With the inclusion of generators into the language, JavaScript offers the expressiveness to dynamically execute functions. Their design facilitate generators to be used as cooperatively multitasked processes or threads. On top of that, a library is built as part of this project, to express core functionality described by Communicating Sequential Processes. Generators are a fundamental component of this implementation, as they represent the processes, which communicate through channels. Although JavaScript is typically assimilated within browsers, it is present in a myriad of environments ranging from workers to remote servers. Consequently, the implementation is then extended to express concurrency on these environments. By using various external channel implementations, the underlying transport mechanism is abstracted. Seamless extensions of further external channels are facilitated by establishing an external communication protocol. Hence, a safe and intuitive pattern for parallelism is achieved, offering both syntactic and performance benefits. A scalable implementation is achieved albeit having some shortcomings due to the dynamic nature of the language. Moreover, the need for asynchronous callbacks is eliminated by adopting synchronous and sequential code through the presented framework. The concurrency pattern derived from this implementation eliminates the need to tailor code to the respective JavaScript environment. Generators become agnostic of the environment they operate in and the communication mechanisms being used.
Description: B.SC.(HONS)COMP.SCI.
URI: https://www.um.edu.mt/library/oar//handle/123456789/13881
Appears in Collections:Dissertations - FacICT - 2016
Dissertations - FacICTCS - 2016

Files in This Item:
File Description SizeFormat 
16BCS012.pdf
  Restricted Access
1.39 MBAdobe PDFView/Open Request a copy


Items in OAR@UM are protected by copyright, with all rights reserved, unless otherwise indicated.