reactive programming with akka and scala

21
Reactive programming Akka + Scala [email protected]

Upload: vladimir-malyk

Post on 22-Jan-2018

227 views

Category:

Software


3 download

TRANSCRIPT

Page 1: Reactive programming with Akka and Scala

Reactive programming

Akka + Scala

[email protected]

Page 2: Reactive programming with Akka and Scala

Backend

Cooperative access:

- data

- computing power

Page 3: Reactive programming with Akka and Scala

Welcome to 1970sComputing power

and the first hipsters

Teletype Model 33 Terminal

DEC PDP-11

Page 4: Reactive programming with Akka and Scala

1980s – Mainframe eraComputing power shareCooperative data access

Page 5: Reactive programming with Akka and Scala

1980s – Mainframe eraComputing power shareCooperative data access

Page 6: Reactive programming with Akka and Scala

Mainframe crisis

Computing power share is no longer needed

Page 7: Reactive programming with Akka and Scala

Backend eraCooperative data access

Page 8: Reactive programming with Akka and Scala

Cooperative data accessweb-sites, social networks, online games

Page 9: Reactive programming with Akka and Scala

Cooperative data access

from 6 to 1366 millions228 times growth by 10 years

Page 10: Reactive programming with Akka and Scala

Cooperative data access

Page 11: Reactive programming with Akka and Scala

Cooperative data access

Reactive programming.

Programming paradigmoriented around data flows

and the propagation of change.

Execution modelwill automatically propagate changes

through the data flow.

Page 12: Reactive programming with Akka and Scala
Page 13: Reactive programming with Akka and Scala

Message Driven

Reactive:

– data is represented by a message flow

– autonomous message handlers

– async non-blocking message handling

Traditionally:

– data is a mutable shared-state

– locks

– synchronization

Page 14: Reactive programming with Akka and Scala

Responsive

Reactive:

– non-blocking async results delivery

Traditionally:

– blocking synchronous results delivery

Page 15: Reactive programming with Akka and Scala

Resilient

Reactive:

– system is highly available even if some handlers has

crashed

– handlers (new or recovered) and dataflows could be

added without downtime

Traditionally:

– application falls entirely

– maintenance downtime

Page 16: Reactive programming with Akka and Scala

Elastic

Reactive:

– event handlers are distributed over multiple

threads/processes/hosts

– message flow between threads/hosts

– scale out by nature

Traditionally:

– heavy-logic threads

– scale up shared-data

Page 17: Reactive programming with Akka and Scala

Reactive tools

Page 18: Reactive programming with Akka and Scala

Actors

Page 19: Reactive programming with Akka and Scala

Cluster

Netty, GoogleProtobuf,

At-Least-One-Delivery, Vector Clock,

CQRS + Event-Sourcing

Page 20: Reactive programming with Akka and Scala

Back to the past with reactive thrustWelcome to 1980s telnet

https://github.com/vladimir-malyk/akka-command-line-chat

Page 21: Reactive programming with Akka and Scala

Ask your questions!

https://github.com/vladimir-malyk/akka-command-line-chat