Change search
ReferencesLink to record
Permanent link

Direct link
Representation of asynchronous communication protocols in Scala and Akka
Linköping University, Department of Computer and Information Science, Software and Systems. Linköping University, The Institute of Technology.
2013 (English)Independent thesis Advanced level (degree of Master (Two Years)), 20 credits / 30 HE creditsStudent thesis
Abstract [en]

This thesis work investigates how to represent protocols for asynchronous communication in the Scala programming language and the Akka actor framework, to be run on Java Virtual Machine (JVM). Further restrictions from the problem domain - the coexistence of multiple protocol instances sharing the same Java thread - imply that neither an asynchronous call waiting for response nor anything else can block the underlying Java threads.

A common way to represent asynchronous communication protocols is to use state machines. This thesis seeks a way to shrink the size of and to reduce the complexity of the protocol implementations by representing sequences of asynchronous communication calls (i.e. sequences of sent and received messages) as a type of procedure. The idea is find a way to make the procedures that contain asynchronous calls look like synchronous communication procedures by hiding the asynchronous details. In other words, the resulting procedure code should show what to do and not so much focus on how to overcome the impediment of the asynchronous calls.

With the help of an asynchronous communication protocol toy example, this report shows how such an protocol can be implemented with a combination of a state machine and a procedure representation in Scala and Akka. The procedure representation hides away the asynchronous details by using the Scala capability to use CPS-transformed delimited continuations. As a sub-problem, this thesis also shows how to safely schedule asynchronous communication timeouts with help of Scala and Akka within the restrictions of the thesis problem domain.

Place, publisher, year, edition, pages
2013. , 148 p.
Keyword [en]
Scala, Akka, State Machine, FSM, Asynchronous, Communication, Protocol, Delimited Continuations, CPS
National Category
Software Engineering
URN: urn:nbn:se:liu:diva-96660ISRN: LIU-IDA/LITH-EX-A--13/038--SEOAI: diva2:642459
External cooperation
Xdin AB
Subject / course
Computer Programming
Available from: 2013-08-23 Created: 2013-08-21 Last updated: 2013-08-23Bibliographically approved

Open Access in DiVA

Report - Repr of async com prot in Scala and Akka(1135 kB)449 downloads
File information
File name FULLTEXT01.pdfFile size 1135 kBChecksum SHA-512
Type fulltextMimetype application/pdf

Search in DiVA

By author/editor
Eriksson, Joakim
By organisation
Software and SystemsThe Institute of Technology
Software Engineering

Search outside of DiVA

GoogleGoogle Scholar
Total: 449 downloads
The number of downloads is the sum of all downloads of full texts. It may include eg previous versions that are now no longer available

Total: 232 hits
ReferencesLink to record
Permanent link

Direct link