-
Notifications
You must be signed in to change notification settings - Fork 2
/
slides-exam.tex
368 lines (267 loc) · 11 KB
/
slides-exam.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
%\documentclass[handout]{beamer} % use this to disable \pause commands
\documentclass{beamer}
%
% Choose how your presentation looks.
%
% For more themes, color themes and font themes, see:
% http://deic.uab.es/~iblanes/beamer_gallery/index_by_theme.html
%
\mode<presentation>
{
\usetheme{default} % or try Darmstadt, Madrid, Warsaw, ...
\usecolortheme{default} % or try albatross, beaver, crane, ...
\usefonttheme{default} % or try serif, structurebold, ...
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{caption}[numbered]
\setbeamertemplate{footline}{%
\hfill%
\usebeamercolor[fg]{page number in head/foot}%
\usebeamerfont{page number in head/foot}%
\insertframenumber%
%\,/\,\inserttotalframenumber
\kern1em\vskip2pt%
}
}
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{pdfcomment}
\usepackage{fancyvrb}
\usepackage{tabularx}
\newcommand{\pdfnote}[1]{\marginnote{\pdfcomment[icon=note]{#1}}}
\newcommand\mydots{\hbox to 1em{.\hss.\hss.}}
\title[Your Short Title]{Concurrent Programming with\\Actors and Microservices}
\author{Maximilian Irro}
\date{Diplomprüfung\\12.11.2018}
\begin{document}
\begin{frame}
\titlepage
\end{frame}
% Uncomment these lines for an automatically generated outline.
\begin{frame}{Outline}
\tableofcontents
\end{frame}
% ###################################################################
\section{Overview: Concurrency, Actors, Microservices}
% ###################################################################
\begin{frame}{Forms of Concurrent Execution}
\begin{itemize}
\item \textbf{Pseudo-Simultaneous}: in alternation on a single CPU
\item \textbf{Parallel}: truely simultaneous on several CPU cores
\item \textbf{Distributed}: several host machines
\end{itemize}
\end{frame}
% ###################################################################
\begin{frame}{Actor Model}
\begin{itemize}
\item Theoretically well-known constructs
\item Receive and process messages (asynchronous, passiv)
\item One message at a time
\item Encapsulate state exclusively
\item Concurrent execution through runtime
\item Single-threaded semantics
\end{itemize}
\end{frame}
% ###################################################################
\begin{frame}{Microservices Paradigm}
\begin{itemize}
\item Complex functionality: composition of several \textit{services}
\item Microservice: small, independent executable
\item \glqq Small\grqq{} size $\rightarrow$ in it's \textit{scope of responsibility}
\item Dedicated operating system processes
\item Communicate via message passing channels
% \item Network-based communication $\rightarrow$ distribution
\end{itemize}
\end{frame}
% ###################################################################
\section{Research Questions, Scope \& Contributions}
% ###################################################################
\begin{frame}{Research Questions}
\begin{table}
\begin{tabularx}{\textwidth}{lX} \\[10pt]%
\textbf{RQ1} & Why do actors and microservices qualify for programming concurrency? \\[10pt]%
\textbf{RQ2} & How do the actor and the microservice model facilitate concurrent execution? \\[10pt]%
\textbf{RQ3} & What are the expressive capabilities of actors and microservices regarding concurrent programming concerns? \\[10pt]%
\textbf{RQ4} & How does the performance of actors and microservices compare in a multi-core environment relative to a concurrent system scenario?
\end{tabularx}
\end{table}
\end{frame}
% ###################################################################
\begin{frame}{Scope of Research Area}
\pause
\begin{center}
\begin{figure}
\includegraphics[width=\textwidth]{graphics/topics-venn.pdf}
\end{figure}
\end{center}
\end{frame}
% ###################################################################
\begin{frame}{Selected Capabilities}
\begin{itemize}
\item \textbf{Encapsulation} \\%
Isolation (Shared/ Mutable State), Persistence/IO, Cohesion, Coupling, Independence
\item \textbf{Communication} \\%
Communication Styles, Message Routing
\item \textbf{Concurrent Execution} \\%
Conception of Conc. Exec., Distribution, Location Transparency, Fairness, Resource Consumption, Notion of Time
\item \textbf{Scalability and Modularity} \\%
Forms (Vertical, Horizontal, Load), Dynamic Reconfiguration, Extensibility, Technology Diversity
\item \textbf{Integration of Actors and Microservices}
\end{itemize}
\end{frame}
% ###################################################################
\begin{frame}{Contributions}
\begin{itemize}
\item Designed a non-trivial concurrent system scenario \\%
$\rightarrow$ Actor and microservice implementation
\item Compared programming of concurrency
\item Capability evaluation $+$ efficiency benchmark
\item Describe interrelations $\rightarrow$ filled a gap in the literature
\end{itemize}
\end{frame}
% ###################################################################
\section{Implementation}
% ###################################################################
\begin{frame}{Implementation: Domain-specific Search Engine}
\pause
\begin{columns}
\begin{column}{0.47\textwidth}
\begin{itemize}
\item Gateway (G)
\item CatalogStore (C)
\item Updater (U)
\item Web Crawler (W)
\item Parser (P)
\item IndexStore (I)
\item Searcher (S)
\end{itemize}
\end{column}
\begin{column}{0.5\textwidth}
\begin{figure}
\includegraphics[width=0.7\textwidth]{graphics/interaction-model.png}
\caption{Interaction Model}
\end{figure}
\end{column}
\end{columns}
\end{frame}
% ###################################################################
\begin{frame}{Implementation: Subsystems \& Processing Pipelines}
\begin{figure}
\includegraphics[width=0.77\textwidth]{graphics/pipeline-indexing.png}
\caption{Indexing Pipeline}
\end{figure}
\begin{figure}
\includegraphics[width=0.65\textwidth]{graphics/pipeline-retrieval.png}
\caption{Retrieval Pipeline}
\end{figure}
\end{frame}
% ###################################################################
\begin{frame}{Implementation: Technology Stacks}
\begin{itemize}
\item JVM based
\item Actor variant: Akka
\item Microservice: Spring Boot $+$ Spring Cloud
\end{itemize}
\end{frame}
% ###################################################################
\section{Benchmark Results}
% ###################################################################
\begin{frame}{Software Artifact Analysis}
\begin{table}
\begin{tabular}{l|r|r|r|r}
\textbf{Artifact} & \textbf{LoC} & \textbf{sJAR (KB)} & \textbf{fJAR (KB)} & \textbf{Up (s)} \\ \hline
Akka monolith & 4487 & 1004.3 & 76 775.1 & 5.5 \\ \hline
CatalogStore (MS) & 1838 & 56.1 & 89 225.8 & 14.6 \\ \hline
IndexStore (MS) & 724 & 23.8 & 83 518.2 & 8.8 \\ \hline
Searcher (MS) & 656 & 22.2 & 81 754.4 & 8.1 \\ \hline
Web Crawler (MS) & 716 & 23.5 & 83 517.9 & 9.2 \\ \hline
Parser (MS) & 703 & 24.2 & 83 519.1 & 8.6 \\ \hline
Registry (MS) & 334 & 9.9 & 90 699.7 & 9.4 \\ \hline
Gateway (MS) & 889 & 30.5 & 83 655.1 & 9.7 \\ \hline
Updater (MS) & 693 & 23.9 & 83 518.3 & 8.7 \\ \hline
\end{tabular}
\end{table}
\begin{itemize}
\item $\sum\mbox{LoC}(\mbox{MS}) = 6553$, about 46 \% larger
\end{itemize}
\end{frame}
% ###################################################################
\begin{frame}{Artifact Memory Consumption}
Memory consumption of the executable artifact VMs in the indexing phase:
\begin{center}
\begin{figure}
\includegraphics[width=0.5\textwidth]{graphics/eval-index-mem.pdf}
\end{figure}
\end{center}
\begin{columns}
\begin{column}{0.5\textwidth}
\begin{itemize}
\item $\mbox{mem}(\mbox{Akka}) = 154 \mbox{mb}$
\end{itemize}
\end{column}
\begin{column}{0.5\textwidth}
\begin{itemize}
\item $\sum\mbox{mem}(\mbox{MS}) = 915 \mbox{mb}$
\end{itemize}
\end{column}
\end{columns}
\end{frame}
% ###################################################################
\begin{frame}{Overall Processing Time: Indexing Subsystem}
Benchmark results for the overall processing time of the indexing subsystem:
\begin{center}
\begin{figure}
\includegraphics[width=0.5\textwidth]{graphics/eval-index-overall.pdf}
\end{figure}
\end{center}
\end{frame}
% ###################################################################
\begin{frame}{Overall Processing Time: Retrieval Subsystem}
Benchmark results of the overall processing time for the retrieval subsystem:
\begin{center}
\begin{figure}
\includegraphics[width=0.5\textwidth]{graphics/eval-search-rtt-overall.pdf}
\end{figure}
\end{center}
\end{frame}
% ###################################################################
\section{Conclusion \& Implications}
% ###################################################################
\begin{frame}{Conclusion \& Implications}
\begin{itemize}
\item \textbf{Same} capabilities regarding concurrent programming concerns
\item \textbf{Different} strategies $+$ trade-offs
\item Actors: more efficient, less resource consumption
\item Microservices: more independent, more interaction freedom \\%
$\rightarrow$ benefit from actor principles
\end{itemize}
\end{frame}
% ###################################################################
\begin{frame}{}
\vspace{1cm}
\begin{center}
\texttt{</presentation>}
\end{center}
\end{frame}
% ###################################################################
\begin{frame}{Supplemental: Semi-Synchronous Communication in Akka}
Comparison of the benchmark results for the retrieval subsystem using either delegation or futures for request/response communication in the Akka:
\begin{center}
\begin{figure}
\includegraphics[width=0.5\textwidth]{graphics/eval-search-comparison-akka-delegation-future.pdf}
\end{figure}
\end{center}
\end{frame}
% ###################################################################
\begin{frame}{Supplemental: State Encapsulation vs. Isolation}
\begin{itemize}
\item Microservice: process memory boundaries
\item Actors (on the JVM):
\begin{itemize}
\item Visibility $+$ Accessibility $\rightarrow$ information hiding
\item Reference types $+$ pass-by-value $\rightarrow$ immutability
\item Coding conventions required
\end{itemize}
\end{itemize}
\end{frame}
% ###################################################################
\end{document}