liu.seSearch for publications in DiVA
Change search
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • harvard1
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • oxford
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf
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
Identifiers
URN: urn:nbn:se:liu:diva-96660ISRN: LIU-IDA/LITH-EX-A--13/038--SEOAI: oai:DiVA.org:liu-96660DiVA: diva2:642459
External cooperation
Xdin AB
Subject / course
Computer Programming
Supervisors
Examiners
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)543 downloads
File information
File name FULLTEXT01.pdfFile size 1135 kBChecksum SHA-512
080ce035e22410d22f832f6c2b28edd0afc3d65a9b2d1aa74c91aa2a8c9797e42ed6bd8fe47f47f5f833e2db3ce73cac165dc7ad0855a2971d4d5ca0152da2d7
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: 543 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

urn-nbn

Altmetric score

urn-nbn
Total: 312 hits
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • harvard1
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • oxford
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf