-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
785 lines (690 loc) · 31.2 KB
/
index.html
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
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
<!doctype html>
<html lang="es">
<head>
<meta charset="utf-8">
<title>Reactive Systems - Overview</title>
<meta name="description" content="Reactive Systems - Overview">
<meta name="author" content="Guillermo Polito">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="css/reveal.min.css">
<link rel="stylesheet" href="css/theme/moon.css" id="theme">
<!-- For syntax highlighting -->
<link rel="stylesheet" href="lib/css/zenburn.css">
<link rel="stylesheet" href="css/custom.css">
<!-- If the query includes 'print-pdf', include the PDF print sheet -->
<script>
if( window.location.search.match( /print-pdf/gi ) ) {
var link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = 'css/print/pdf.css';
document.getElementsByTagName( 'head' )[0].appendChild( link );
}
</script>
<!--[if lt IE 9]>
<script src="lib/js/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<aside style="display: block; position: fixed; bottom: 20px; left: 20px; z-index: 30;">
<a href="http://www.pyxis.com.uy"><img src="assets/pyxis_color_96x35.png"></a>
</aside>
<aside style="display: block; position: fixed; bottom: 20px; left: 125px; z-index: 30;">
<a href="http://www.aquait.com.uy/"><img width="73px" style="margin-bottom: 6px;" src="assets/nuevo-logo-aquait-medium.png"></a>
</aside>
<div class="reveal">
<div class="slides">
<section>
<h1>Reactive <br>Systems</h1>
<h2 style="color: orange;">Overview</h2>
<br/>
<h4>Guillermo Polito</h4>
<p><small><a href="http://twitter.com/gpolito">@gpolito</a> / <a href="http://github.com/gpolito/Reactive-Programming">slides at github</a></small>
</p>
</section>
<section>
<h2>Why Reactive?</h2>
<a href="http://internetlivestats.com/">internetlivestats.com</a>
</section>
<section>
<h2>Why Reactive?</h2>
<h3 style="color: orange;">Quick summary. In 10 years:</h3>
<table>
<thead>
<tr>
<th></th>
<th><strong>2005</strong></th>
<th><strong>2015</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>Internet users</strong></td>
<td><span style="color: pink;">1000 millions</span></td>
<td>3000 millions</td>
</tr>
<tr>
<td><strong>YouTube</strong></td>
<td>was born on February, 2005</td>
<td><span style="color: pink;">more than 1000 million users</span></td>
</tr>
<tr>
<td><strong>Facebook</strong></td>
<td>5.5 million active users</td>
<td><span style="color: pink;">1.380 million active users</span></td>
</tr>
<tr>
<td><strong>Twitter</strong></td>
<td>wasn't born yet</td>
<td>288 million active users</td>
</tr>
</tbody>
</table>
<aside class="notes">
- primer columna primero, luego la segunda
</aside>
</section>
<section>
<h2>Why Reactive?</h2>
<h3 style="color: orange;"> Some things have changed during this years...</h3>
<table>
<thead>
<tr>
<th></th>
<th><span style="color: #009B77">Almost yesterday</span></th>
<th><span style="color: #009B77">Today</span></th>
</tr>
</thead>
<tbody>
<div>
<tr>
<td>Server nodes</td>
<td>10's</td>
<td>1000's</td>
</tr>
<tr >
<td>RAM</td>
<td>expensive</td>
<td>cheap</td>
</tr>
<tr>
<td>Network</td>
<td>slow</td>
<td>fast</td>
</tr>
</div>
<div>
<tr>
<td>Data volume</td>
<td>GBs</td>
<td>TBs -> PBs</td>
</tr>
<tr>
<td>Response times</td>
<td>seconds</td>
<td>milliseconds</td>
</tr>
<tr>
<td>Maintenance downtimes</td>
<td>hours</td>
<td>none</td>
</tr>
</div>
</tbody>
</table>
<aside class="notes">
- hardware
- user requirements
</aside>
</section>
<section>
<h2>Why Reactive?</h2>
<h2 style="color: orange">Today's demands are simply not met by yesterday’s software architectures</h2>
<h2 class="fragment" style="color: orange">A new coherent approach to Systems Architecture is needed...</h2>
<aside class="notes">
lo q vimos hasta ahora fue un pantallazo de los numeros de la web hoy en dia, en donde el tráfico es impresionante. Vimos q el hardware ha mejorado y abaratado. Los requerimientos de los usuarios son muy exigentes.
Con las arquitecuras q conocemos hoy, sobre todo las MVC q utilizan un modelo de concurrencia basado en threads con mem compartida, se nos es muy complicado o casi imposible poder hacer frente a estos requerimientos.
Por lo general se utilizan mecanismos muy complicados para poder emparchar esta situación.
</aside>
</section>
<section data-background="#59CDEA">
<h2 style="color: white;">Reactive Systems</h2>
<h3 style="color: white;">Traits</h3>
<img style="border: none; box-shadow: none;" src="assets/reactive-traits.png" />
<strong><a style="color: white;" href="http://reactivemanifesto.org/">reactivemanifesto.org</a></strong>
<aside class="notes">
Organisations working in disparate domains are independently discovering patterns for building software that look the same. These systems are more robust, more resilient, more flexible and better positioned to meet modern demands.
These changes are happening because application requirements have changed dramatically in recent years.
It is time to apply these design principles consciously from the start instead of rediscovering them each time.
</aside>
</section>
<!-- Responsive -->
<section data-background="#C55300" data-background-transition="zoom">
<h2>Responsive</h2>
<blockquote style="color: white;">
“A responsive system is quick to react to all users — under blue skies and grey skies — in order to ensure a consistently positive user experience.”
</blockquote>
</section>
<section>
<h2>Responsive Systems</h2>
<div class="fragment">
<h3 style="color: orange">offer:</h3>
<ul>
<li >rapid and consistent response times</li>
<li>reliable upper bounds to deliver a consistent QoS</li>
</ul>
<br><br>
</div>
<div class="fragment">
<h3 style="color: orange">should:</h3>
<ul>
<li class="fragment">detect problems quickly and dealt with them effectively</li>
</ul>
</div>
<aside class="notes">
</aside>
</section>
<!-- Resilience -->
<section data-background="#59CDEA">
<h2 style="color: white;">Reactive Systems</h2>
<h3 style="color: white;">Traits</h3>
<img style="border: none; box-shadow: none;" src="assets/reactive-traits.png" />
<strong><a style="color: white;" href="http://reactivemanifesto.org/">reactivemanifesto.org</a></strong>
</section>
<section data-background="#C55300" data-background-transition="zoom">
<h2>Resilient</h2>
<blockquote style="color: white;">
“The ability of a sustance or object to spring back into shape.”<br/>
“The capacity to recover quickly from difficulties.”
</blockquote>
<p style="color: white;">Merriam Webster</p>
<aside class="notes">Merriam–Webster Inc. de Springfield, Massachusetts, es una editorial estadounidense que publica libros de referencia, sobre todo diccionarios, que tienen su origen en el diccionario An American Dictionary of the English Language, de Noah Webster, publicado a su vez en 1828.</aside>
</section>
<section>
<h2>Resilient</h2>
<h3 style="color: orange;">The system should be responsive <br>in the face of failure.</h3>
<h2 class="fragment" style="color: brown;">Failure != Error</h2>
<h3 class="fragment"><br>Examples of failures:</h3>
<ul>
<li class="fragment">program defects causing corrupted internal state</li>
<li class="fragment">hardware malfunction</li>
<li class="fragment">network failures</li>
<li class="fragment">troubles with external services</li>
</ul>
<aside class="notes">
A failure is an unexpected event within a service that prevents it from continuing to function normally. A failure will generally prevent responses to the current, and possibly all following, client requests. This is in contrast with an error, which is an expected and coded-for condition—for example an error discovered during input validation, that will be communicated to the client as part of the normal processing of the message.
</aside>
</section>
<section data-background="#FFFFFF">
<h2 style="color: #002B36">Resilient - how? </h2>
<h2 style="color: orange;">Failure Recovery in OOP</h2>
<img class="fragment" style="border: none; box-shadow: none; width: 60%" src="assets/oo-graph.png" />
</section>
<section>
<h2>Resilient - how? </h2>
<h2 style="color: orange;">Failure Recovery in OOP </h2>
<ul>
<li>single thread of control</li>
<li>if the thread blows up => you are screwed</li>
<li>no global organization of error handling </li>
<li>defensive programming tangled with business logic, <br> scattered around the code</li>
</ul>
</section>
<section>
<h1 style="color: orange;">Resilience is by design</h1>
<h1 class="fragment">ok... but how?</h1>
</section>
<section>
<h2 style="color: orange;">Resilience is by design - How?</h2>
<ol style="font-size: 130%"><br>
<li>containment</li> <br>
<li>delegation</li><br>
<li>isolation</li><br>
</ol>
<br/>
<br/>
<p class="fragment"><em>let's review this concepts...</em></p>
<aside class="notes">
Cómo vamos a alcanzar la resiliencia? Contando con compartimientos que contengan a las fallas, y q aislen a los componentes entre si, permitiendo que partes del sistema puedan caerse y recuperarse sin comprometer al sistema entero.
La recuperación de cada componente es delegado a otro componente externo. El cliente no es responsable de manejar las fallas.
La alta disponibilidad es asegurada replicando componentes donde sea necesario.
</aside>
</section>
<section>
<h2>Resilience is by design - How?</h2>
<ol style="font-size: 130%">
<br>
<li style="color: orange;"><strong>containment:</strong><br><br>
<span><em style="color: pink;">=> bulkheads</em></span><br>
<span><em style="color: pink;">=> circuit breaker</em></span>
</li>
<br>
<li style="color: orange;"><strong>delegation</strong><br><br>
<span><em style="color: pink;">=> supervision</em></span>
</li>
</ol>
</section>
<section>
<h2>Resilience is by design - How?</h2>
<ol start="3">
<li style="color: orange;"> <strong>isolation (decoupling, both in time and space)</strong>
<br><br>
<span style="color: white;">
<span style="color: skyblue">- in time:</span>
<br>sender and receiver don't need to be present at the same time for communicate
</span>
<br>
<span>
<em style="color: pink;">=> message-driven arquitecture</em>
</span> <br><br>
<span style="color: white;">
<span style="color: skyblue">- in space (defined as <em>Location Transparency</em>):</span>
<br>the sender and receiver don't have to run in the same process, and this might change during application's lifetime
</span> <br>
<span>
<em style="color: pink;">=> message-driven arquitecture</em>
</span>
</li>
</ol>
</section>
<section data-background="assets/ship.png" data-background-repeat="repeat" data-background-size="1200px">
<h1 style="color : black;">Bulkheads</h1>
<h1 style="color : black;">+</h1>
<h1 style="color : black;">Supervison</h1>
<aside class="notes">una vez q sabemos las propiedades q tenemos q tener en el diseño para lograr la resiliencia, vamos a revisar cada una de éstas.</aside>
</section>
<section>
<h2>Bulkheads help us to:</h2>
<ol>
<li class="fragment"><em>isolate the failure</em></li>
<li class="fragment"><em>compartmentalize</em></li>
<li class="fragment"><em>manage failure locally</em></li>
<li class="fragment"><em>avoid cascading failures</em></li>
</ol>
<br>
<br>
<p class="fragment">this concept should be used together with <span style="color: orange;">supervison!</span></p>
</section>
<section data-background="assets/burns.jpg">
<h1 style="color: white;">Supervison</h1>
</section>
<section data-background="#FFFFFF">
<h2 style="color: #002B36">Supervison</h2>
<h3 class="fragment" style="color: orange;">Core Concept</h3>
<img class="fragment" style="border: none; box-shadow: none;" src="assets/supervisor-1.png">
<aside class="notes">
Supervision means that normal requests and responses (including negative ones such as validation errors) flow separately from failures: while the former are exchanged between the user and the service, the latter travel from the service to its supervisor.
</aside>
</section>
<section>
<h2>Supervisor hierarchies with Actors</h2>
<img style="border: none; box-shadow: none;" src="assets/supervisor-h-1.png">
</section>
<section>
<h2>Supervisor hierarchies with Actors</h2>
<img style="border: none; box-shadow: none;" src="assets/supervisor-h-2.png">
</section>
<section>
<h2>Supervisor hierarchies with Actors</h2>
<h3 style="color: orange;">Configuration in Akka</h3>
<pre><code class="scala" contenteditable>
import akka.actor.OneForOneStrategy
import akka.actor.SupervisorStrategy._
import scala.concurrent.duration._
override val supervisorStrategy =
OneForOneStrategy(maxNrOfRetries = 10, withinTimeRange = 1 minute) {
case _: ArithmeticException => Resume
case _: NullPointerException => Restart
case _: IllegalArgumentException => Stop
case _: Exception => Escalate
}
</code></pre>
</section>
<section data-background="assets/electricity.jpg">
<h1 style="color: black;">Circuit Breaker</h1>
</section>
<section>
<h2>Circuit Breaker</h2>
<h3 style="color: orange;">PROBLEM - Example Situation</h3>
<ul>
<li class="fragment">web app interacting with a remote WS</li>
<li class="fragment">remote WS is overloaded, and its DB takes a long time to respond with a fail</li>
<li class="fragment">=> WS calls fail after a long period of time</li>
<li class="fragment">=> web users noticed that form submissions takes time to complete</li>
<li class="fragment">=> web users start to click the refresh button adding more requests!</li>
<li class="fragment">=> web app fails due to resource exhaustion, affecting all users across the site</li>
</ul>
<p class="fragment" style="color: orange;"><em>failures in external dependencies shouldn' t bring down an entire app</em></p>
</section>
<section>
<h2>Circuit Breaker</h2>
<h3 style="color: orange;">Solution Proposal</h3>
<ol>
<li class="fragment">monitor response times</li>
<li class="fragment">if time consistently rises above a threshold, either:</li>
<ol type="a">
<li class="fragment"><em>fail fast</em> approach, or...</li>
<li class="fragment">route following requests to an alternative service</li>
</ol>
<li class="fragment">monitor the original service</li>
<li class="fragment"><em>if the service is back in shape</em>, restore to the original state</li>
<li class="fragment"><em>if not</em>, continue with the same approach</li>
</ol>
</section>
<section data-background="#FFFFFF">
<h2 style="color: #002B36">Circuit Breaker</h2>
<h3 style="color: orange;">Akka Implementation</h3>
<ul>
<li class="fragment">implements <em>fail fast</em> approach</li>
<li class="fragment">provide stability</li>
<li class="fragment">prevent cascading failures in distributed systems</li>
</ul>
<img class="fragment" style="border: none; box-shadow: none;" src="assets/circuit-breaker-states.png">
</section>
<section data-background="#FFFFFF">
<h2 style="color: #002B36">Circuit Breaker</h2>
<h3 style="color: orange;">Akka Implementation</h3>
<h3 style="color: #009B77">configuration</h3>
<ul>
<li class="fragment"><em>max. number of failures</em></li>
<li class="fragment"><em>call timeout</em>: response time threshold</li>
<li class="fragment"><em>reset timeout</em>: we'll see this later</li>
</ul>
</section>
<section data-background="#FFFFFF">
<h2 style="color: #002B36">Circuit Breaker</h2>
<h3 style="color: orange;">Akka Implementation</h3>
<h3 style="color: #009B77">Closed state (normal operation)</h3>
<img class="fragment" style="border: none; box-shadow: none;" src="assets/circuit-breaker-states.png">
<ul>
<li class="fragment">Exceptions or calls exceeding the configured <em>callTimeout</em> increment a failure counter</li>
<li class="fragment">Successes reset the failure count to 0 (zero)</li>
<li class="fragment">When the failure counter reaches a <em>maxFailures</em> count, the breaker is tripped into <em>Open State</em></li>
</ul>
</section>
<section data-background="#FFFFFF">
<h2 style="color: #002B36">Circuit Breaker</h2>
<h3 style="color: orange;">Akka Implementation</h3>
<h3 style="color: #009B77">Open State</h3>
<img class="fragment" style="border: none; box-shadow: none;" src="assets/circuit-breaker-states.png">
<ul>
<li class="fragment">All calls fail-fast with a <em>CircuitBreakerOpenException</em></li>
<li class="fragment">After the configured <em>resetTimeout</em>, the circuit breaker enters a <em>Half-Open State</em></li>
</ul>
</section>
<section data-background="#FFFFFF">
<h2 style="color: #002B36">Circuit Breaker</h2>
<h3 style="color: orange;">Akka Implementation</h3>
<h3 style="color: #009B77">Half-Open State</h3>
<img class="fragment" style="border: none; box-shadow: none;" src="assets/circuit-breaker-states.png">
<ul>
<li class="fragment">The first call attempted is allowed through without failing fast</li>
<li class="fragment">All other calls fail-fast with an exception just as in <em>Open state</em></li>
<li class="fragment">If the first call succeeds, the breaker is reset back to <em>Closed state</em></li>
<li class="fragment">If the first call fails, the breaker is tripped again into the <em>Open state</em> for another full <em>resetTimeout</em></li>
</ul>
</section>
<section>
<h2>Circuit Breaker</h2>
<h3 style="color: orange;">Akka Implementation</h3>
<pre><code class="scala" contenteditable>
import akka.pattern.CircuitBreaker
def dangerousCall: String = "This really isn't that dangerous"
val breaker =
CircuitBreaker(system.scheduler,
maxFailures = 5,
callTimeout = 10.seconds,
resetTimeout = 1.minute)
def dangerous: Future[String] =
breaker.withCircuitBreaker(Future(dangerousCall))
</code></pre>
</section>
<section data-background="assets/water_pumping.jpg">
<h1 style="color: black;">Back Pressure</h1>
</section>
<section data-background="#FFFFFF">
<h2 style="color: orange;">Problem Description</h2>
<p class="fragment" style="color: #009B77"><strong>speed(publisher) > speed(suscriber)</strong></p>
<img class="fragment" style="border: none; box-shadow: none;" src="assets/back-pressure-0.png" >
<aside class="notes">
when a component is under stress it might fail catastrophically or drop messages in an uncontrolled fashion. To be more resilient, the system as a whole needs to react to avoid this kind of situations
</aside>
<p class="fragment" style="color: #009B77">bounded buffer => drop messages + require re-sending</strong></p>
<p class="fragment" style="color: #009B77">unbounded buffer => buffer overflow </strong></p>
</section>
<section data-background="#FFFFFF">
<h2 style="color: orange;">Back Pressure - Solution</h2>
<p><strong>speed(publisher) < speed(suscriber)</strong></p>
<img style="border: none; box-shadow: none;" src="assets/back-pressure.png">
<aside class="notes">Back pressure: the component should communicate that is under stress to upstream components, so they can start reducing the load
</aside>
</section>
<section data-background="#FFFFFF">
<h2 style="color: orange;">Back Pressure</h2>
<p style="color: #009B77">this mechanism is included into the <strong>Reactive Stream</strong> specification</p>
<p></p>
<img width="50%" style="border: none; box-shadow: none;" src="assets/reactive-streams-page.png">
<p><a style="color: #009B77" href="http://reactive-streams.org/">http://reactive-streams.org/</a></p>
</section>
<section>
<h2>Reactive Streams</h2>
<p class="fragment" style="color: orange">Stream processing on the JVM:</p>
<ul>
<li class="fragment">Asynchronous</li>
<li class="fragment">Back-pressured</li>
<li class="fragment">Standarized</li>
</ul>
<br><br>
<p class="fragment" style="color: orange">Available implementations:</p>
<ul>
<li class="fragment">Akka Streams</li>
<li class="fragment">Reactor Composable (DSL for groovy, clojure)</li>
<li class="fragment">RxJava</li>
<li class="fragment">Ratpack</li>
</ul>
</section>
<section>
<h2>Reactive Streams</h2>
<h2 style="color: orange">Akka Streams Example</h2>
<pre><code class="scala" contenteditable>
implicit val system = ActorSystem("Sys")
val mat = FLowMaterializer(...)
Flow(text.split("" "").toVector).
map(word => word.toUpperCase).
foreach(transformed => println(transformed)).
onComplete(mat) {
case Success(_) => ...; system.shutdown();
case Failure(e) => ...; system.shutdown();
}
</code></pre>
</section>
<!-- Elastic -->
<section data-background="#59CDEA">
<h2 style="color: white;">Reactive Systems</h2>
<h3 style="color: white;">Traits</h3>
<img style="border: none; box-shadow: none;" src="assets/reactive-traits.png" />
<strong><a style="color: white;" href="http://reactivemanifesto.org/">reactivemanifesto.org</a></strong>
</section>
<section data-background="#C55300" data-background-transition="zoom">
<h2 style="color: black">Elasticity</h2>
<div class="fragment">
<h1>Scalability</h1>
<h1>+</h1>
<h1>automatic resource management</h1>
</div>
</section>
<section data-background="#FFFFFF" data-background-transition="zoom">
<p style="font-size: 150%; color: black; text-transform: none;">slidesLanguageService.<br><span style="color: brown">setLang</span>(<span style="color: cornflowerblue">Lang.SPANGLISH</span>)</p>
</section>
<section>
<h2>Scalability - Qué significa? - (1)</h3>
<div class="fragment" style= "color: orange; font-size: 200%">
<p>la performance del sistema</p>
<p>es proporcional</p>
<p>a los recursos reservados</p>
</div>
</section>
<section>
<h2>Scalability - Qué significa? - (2)</h3>
<div class="fragment" style= "color: orange">
<h1 style= "color: orange">Scale OUT & IN <span style="color: grey; font-size: 70%">(horizontal)</span></h1>
<h2 style= "color: orange"> + </h2>
<h1 style= "color: orange">Scale UP & DOWN <span style="color: grey; font-size: 70%">(vertical)</span></h1>
</div>
</section>
<section>
<h2>Scalability</h2>
<h3 style= "color: orange;">Por qué es necesario?</h3>
<ul>
<li class="fragment">por ejemplo: en el dominio eCommerce:</li>
<p class="fragment">- los picos de tráfico mas altos se dan cuando cuando estás vendiendo bien</p>
<p class="fragment">- durante un pico de tráfico la gente basicamente <em>quiere darte su dinero</em> :) </p>
</ul>
</section>
<section>
<h1 style="color: orange">Cómo lo logramos?</h1>
<ul style="font-size: 120%">
<li>Never Block -> Go Async</li><br>
<li>Share Nothing -> Use Immutable Data</li><br>
<li>Location Transparency</li><br>
</ul>
</section>
<section data-background="white">
<h2 style="color: orange">Never Block -> Go Async</h2>
<img style="border: none; box-shadow: none;" src="assets/contention.png">
</section>
<section data-background="white">
<h2 style="color: orange">Share Nothing -> Use Immutable Data</h2>
<img style="border: none; box-shadow: none; width: 74%" src="assets/amdahl.png">
</section>
<section>
<h2>Location Transparency</h2>
<h1 style= "color: orange">Scale OUT = Scale UP</h1>
<aside class="notes">
- la transparencia de localización permite el desacoplamiento a nivel del espacio
- dos componentes se pueden comunicar si conocer donde estan ubicados.
- permite adaptar la topologia del sistema dependiendo del uso
- es un concepto clave para poder escalar bajo demanda
- como estamos haciendo computación distribuida, no hay diferencia conceptual entre comunicarse con un componente en el mismo nodo o en otro nodo del cluster
</aside>
</section>
<section>
<h1>la <span style="color: orange">Elasticidad</span></h1>
<h1>requiere de una </h1>
<h1 style="color: orange">Message-driven Arquitecture</h1>
</section>
<!-- Message Driven -->
<section data-background="#59CDEA">
<h2 style="color: white;">Reactive Systems</h2>
<h3 style="color: white;">Traits</h3>
<img style="border: none; box-shadow: none;" src="assets/reactive-traits.png" />
<strong><a style="color: white;" href="http://reactivemanifesto.org/">reactivemanifesto.org</a></strong>
</section>
<section data-background="#C55300" data-background-transition="zoom">
<h1>Message Driven Arquitecture</h1>
</section>
<section>
<h2>Message Driven</h2>
<h3 style="color: orange;">Por qué es importante?</h3>
<p class="fragment">la comunicación asincrónica basada en pasaje de mensajes otorga/permite:</p>
<ul>
<li class="fragment"><strong style="color: pink;">bajo acoplamiento</strong></li>
<li class="fragment"><strong style="color: pink;">aislamiento</strong></li>
<li class="fragment"><strong style="color: pink;">location transparency</strong></li>
<li class="fragment"><strong style="color: pink;">mantenibilidad y flexibilidad para evolucionar</strong> - interfaces enfocadas en el contenido de la comunicación</li>
<li class="fragment"><strong style="color: pink;">lower latency & higher throughput</strong></li>
<li class="fragment"><strong style="color: pink;">scale up & out</strong></li>
<li class="fragment"><strong style="color: pink;">load management and flow control</strong> - a través del monitoreo de colas de mensaje y aplicando back-pressure</li>
</ul>
<aside class="notes"></aside>
</section>
<!-- End -->
<section data-background="#59CDEA">
<h2 style="color: white;">Reactive Systems</h2>
<h3 style="color: white;">Traits</h3>
<img style="border: none; box-shadow: none;" src="assets/reactive-traits.png" />
<strong><a style="color: white;" href="http://reactivemanifesto.org/">reactivemanifesto.org</a></strong>
</section>
<section>
<h2>Qué posibles tecnologías cumplen con todos estos requerimientos?</h2>
<table class="fragment">
<thead>
<tr>
<th><span style="color: orange;">Feature</span></th>
<th><span style="color: orange;">Akka</span></th>
</tr>
</thead>
<tbody>
<tr>
<td>containment (bulkheads)</td>
<td>yes (actors)</td>
</tr>
<tr>
<td>asynchronous & non blocking message-passing</td>
<td>yes</td>
</tr>
<tr>
<td>fault tolerance</td>
<td>yes (supervision)</td>
</tr>
<tr>
<td>back-pressure</td>
<td>yes (by using Akka Streams)</td>
</tr>
<tr>
<td>circuit breaker</td>
<td>yes</td>
</tr>
<tr>
<td>location transparency</td>
<td>yes (ActorRef concept)</td>
</tr>
</tbody>
</table>
</section>
<section>
<h1>Referencias</h1>
<p><a href="http://reactivemanifesto.org/">reactivemanifesto.org</a></p>
<p><a href="http://www.manning.com/kuhn/">Reactive Design Patterns - Roland Kuhn and Jamie Allen</a></p>
<p><a href="https://medium.com/reactive-programming/what-is-reactive-programming-bc9fa7f4a7fc">Kevin Webber - What is Reactive Programming?</a></p>
<p><a href="http://www.slideshare.net/jboner/going-reactive-eventdriven-scalable-resilient-systems">Jonas Boner - Go Reactive: Event-Driven, Scalable, Resilient & Responsive Systems</a></p>
<p><a href="http://internetlivestats.com/">internetlivestats.com</a></p>
<p><a href="http://www.slideshare.net/ktoso/reactive-stream-processing-with-akka-streams">Reactive Stream Processing with Akka Streams</a></p>
<p><a href="http://reactivestreams.org/">reactivestreams.org</a></p>
</section>
<section data-background="#000000">
<img style="border: none; box-shadow: none; width: 100%" src="assets/thats-all.gif">
</section>
</div>
</div>
<script src="lib/js/head.min.js"></script>
<script src="js/reveal.min.js"></script>
<script>
// Full list of configuration options available here:
// https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: true,
progress: true,
history: true,
center: true,
mouseWheel: true,
theme: Reveal.getQueryHash().theme, // available themes are in /css/theme
transition: Reveal.getQueryHash().transition || 'default', // default/cube/page/concave/zoom/linear/fade/none
// Parallax scrolling
// parallaxBackgroundImage: 'https://s3.amazonaws.com/hakim-static/reveal-js/reveal-parallax-1.jpg',
// parallaxBackgroundSize: '2100px 900px',
// Optional libraries used to extend on reveal.js
dependencies: [
{ src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } },
{ src: 'plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: 'plugin/zoom-js/zoom.js', async: true, condition: function() { return !!document.body.classList; } },
{ src: 'plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } }
]
});
</script>
</body>
</html>