Today there are more monthly, active users of Facebook (>2B) than there were active users of the internet in 2000. Humans create 2.5 quintillion bytes of data every day.
Massively scalable systems and massive amounts of data are now part of every developer’s life-even if you don’t work at a Silicon Valley unicorn. Reactive approaches are critical pieces in scaling modern systems--especially microservices architectures.
This talk addresses why these approaches are critical pieces in scaling microservices architectures; especially greenfield microservices applications.
This talk dives into Reactive Programming with ReactiveX and building reactive systems with Eclipse Vert.x, Akka and Spring Reactor.
14. microservicesjourney.com14
things fail
The system must be responsive in the face
of failure
• must be designed for not added in
• self-healing, full recovery
• replication
• isolation and containment
• delegation
Resilient
15. A System must stay responsive under various workloads
• scales up and down
• no contention points or bottlenecks
• replicable/shardable components
• provide relevant live performance measures
15
Elastic
everything changes
18. 18
the basics
“The microservice architectural style is an approach to developing a single
application as a suite of small services, each running in its own process and
communicating with lightweight mechanisms, often an HTTP resource API. These
services are built around business capabilities and independently deployable by
fully automated deployment machinery. There is a bare minimum of centralized
management of these services, which may be written in different programming
languages and use different data storage technologies. “
— Martin Fowler
http://martinfowler.com/articles/microservices.html
Why?
22. INSERT DESIGNATOR, IF NEEDED (EDIT ON MASTER SLIDE)22
An API for asynchronous programming with observable streams
ReactiveX
23. INSERT DESIGNATOR, IF NEEDED (EDIT ON MASTER SLIDE)23
as opposed to traditional programming
Traditional
• Call a method
• Store the return value in a variable
• Do something useful with the variable
RxJava
RxJava
• Create a method that does something useful
with the return values of an asynchronous call
• Define the asynchronous call (Observable)
• Attach an observer to the Observable by
subscribing
• Do other stuff until the call returns and the
Observable begins to operate on the results
32. INSERT DESIGNATOR, IF NEEDED (EDIT ON MASTER SLIDE)32
a standard for asynchronous stream processing that isn’t for end users
• Standard
• Interoperability layer
• no operators
• java.util.concurrent.Flow
• Github
• JavaScript
• Lightbend, Netflix, Pivotal, Red Hat
Reactive Streams
33. INSERT DESIGNATOR, IF NEEDED (EDIT ON MASTER SLIDE)33
Actor
Mailbox
Actor
MailboxActor
Mailbox
Actor
Mailbox
Actor
Mailbox
34. INSERT DESIGNATOR, IF NEEDED (EDIT ON MASTER SLIDE)34
Actor
Mailbox
Actor
Mailbox
akka://default/user/$a#114635109
akka://default/user/$a#114635173
36. 36
its all about the actor model
• Actor Model
• Messaging
• Addressing
• Steams, Web, others
• Reactive end to end
Summary: akka
37. INSERT DESIGNATOR, IF NEEDED (EDIT ON MASTER SLIDE)37
a toolkit for building reactive applications on the JVM
Event Loop
COLUMN HEADING
ALL CAPS
Vertices Event Bus