Functional Reactive Programming (FRP) offers a declarative way to express reactive systems such as animations, user interfaces and games. Various topics related to FRP like optimization, generalization and debugging were studied. However, the use of FRP in distributed systems has not been investigated extensively.
Focused on the use of the Dunai FRP library implemented in the Haskell programming language, the aim of this thesis is to develop and evaluate a way to apply FRP to distributed systems. A library is implemented to extend Dunai with means to create distributed systems. There is support for the Client/Server network architectural model and algorithms to synchronize applications across a network. As the synchronization of distributed systems has been a topic of research
for decades, this thesis explores whether developed ideas, such as Time Warp (Jefferson, 1985), can be expressed in FRP. Additionally, Client Side Prediction (Bernier, 2001) and Dead Reckoning (DIS Steering Committee, 1994) are used to predict server reactions on client-side.
An exemplary application demonstrates the implementation. The application is then evaluated in a performance test and a user test.
TimeWarp synchronization has a significant impact on performance. Despite this, the application is playable up to a latency of 100 ms. The result of Dead Reckoning is acceptable, whereas Client Side Prediction is not usable.
The thesis shows that the developed way can be used to run FRP on distributed systems. Further work should focus the performance to enable more complex applications. Moreover, Dead Reckoning can be improved to a smoother result. Non-trivial changes are necessary to make Client Side Prediction usable.:1 Introduction ... 1
2 Functional Reactive Programming ... 4
2.1 The Arrow Type Class ... 5
2.2 The Dunai FRP Library ... 7
2.2.1 Monadic Stream Functions ... 7
2.2.2 Combining Monads ... 8
2.2.3 Monads in Monadic Stream Functions ... 9
2.3 The BearRiver FRP Library ... 10
2.4 Executing FRP ... 11
3 Synchronization of Distributed Systems ... 13
3.1 Distributed Systems ... 13
3.2 Consistency of Distributed Systems ... 14
3.3 Client/Server Architecture ... 15
3.4 Time Warp Synchronization ... 16
3.5 Dead Reckoning ... 17
3.6 Client Side Prediction ... 19
4 Cloud Haskell ... 21
4.1 Exchanging Messages ... 22
4.2 Fault Tolerance ... 23
4.3 The Cloud Haskell Platform ... 23
5 Concept ... 25
5.1 Concept of the Implemented Library ... 25
5.2 Concept of the Sample Application ... 27
5.3 Functional Requirements ... 28
5.4 Non-Functional Requirements ... 30
6 Implementation ... 32
6.1 Client/Server Architecture ... 33
6.1.1 Establishing Connections between Clients and Servers ... 33
6.1.2 Distributed Execution of FRP ... 35
6.1.3 Implementation of Servers ... 36
6.1.4 Implementation of Clients ... 38
6.2 Time Warp Synchronization ... 39
6.2.1 Rollbacks of Monadic Stream Functions ... 39
6.2.2 Executing FRP using Time Warp Synchronization ... 41
6.3 Dead Reckoning ... 45
6.4 Client Side Prediction ... 46
7 Evaluation ... 48
7.1 Evaluation of Functional Requirements ... 48
7.2 Concept of the Performance Test ... 52
7.3 Concept of the User Test ... 53
7.4 Results of the Performance Test ... 54
7.5 Results of the User Test ... 56
8 Summary ... 60
Bibliography ... A
Listings ... M
List of Figures ... O
List of Tables ... P
Glossary .. Q
Abbreviations ... U
Identifer | oai:union.ndltd.org:DRESDEN/oai:qucosa:de:qucosa:72146 |
Date | 14 September 2020 |
Creators | Götz, Julian |
Contributors | Hochschule für Technik, Wirtschaft und Kultur |
Source Sets | Hochschulschriftenserver (HSSS) der SLUB Dresden |
Language | German |
Detected Language | English |
Type | info:eu-repo/semantics/acceptedVersion, doc-type:masterThesis, info:eu-repo/semantics/masterThesis, doc-type:Text |
Rights | info:eu-repo/semantics/openAccess |
Page generated in 0.0104 seconds