KEMBAR78
Reactive programming no mundo Java | PDF
Felipe Mamud
@ftmamud
Raphael Almeida
@raphait
Reactive Programming
no mundo () -> “Java”
Agradecimentos
INTERNET USERS
2.4bi
2012
INTERNET USERS
3.01bi
TENS OF SERVERS
Fontes: http://recode.net/2014/05/28/meeker-as-internet-user-growth-slows-the-real-driver-is-mobile-usage/
http://www.slideshare.net/wearesocialsg/digital-social-mobile-in-2015
RESPONSE TIME
SECONDS
CLOUD-BASED CLUSTER
MULTICORE
OFFLINE
MAINTENANCE
REAL TIME
MILLISEC/MICROSEC
100%
UPTIME
FAST DATA
GIBABYTE DATA
BIGDATA
PETABYTES
2015
Como criamos sistemas mais robustos,
mais resilientes, mais flexíveis e
muito mais capazes de responder às
exigências de hoje em dia?
Precisamos de sistemas que irão:
● Reagir a eventos (Event-Driven)
● Reagir a carga (Scalable)
● Reagir a falhas (Resilient)
● Reagir a usuários (Responsive)
Reactive Programming
“Readily responsive to a stimulus”
O que são sistemas Reativos?
Sistemas criados como Reativos são muito mais
flexíveis, desacoplados e escaláveis. Isso os torna
mais fáceis de desenvolver e manter. São mais
tolerantes a falhas e quando elas ocorrem são
tratadas com elegância ao invés de desastre.
Sistemas Reativos são responsivos, dando aos
usuários feedbacks mais interativos.
Fonte: http://www.reactivemanifesto.org/pt-BR
Reactive Manifesto
Message-Driven
“Reactive Systems rely on asynchronous
message-passing”
Share Mutable
State
Immutability
Avoid Block
Asynchronous
Some t ls
● Actors
● Agents
● Future/Dataflow
● Reactive Extensions (Rx)
Elastic
“Capable of being easily expanded or
upgraded on demand”
Distribuited
systems
Availability
Scalability
Asynchronous
“Almost” no limit to scalability.
Shared Nothing
Assynchronous communication
Location Transparency
Loose Coupling
Resilience
“The ability of a substance or object to spring back into shape.”
“The capacity to recover quickly from difficulties.”
Failure recover
Manage failure
locally
Avoid cascading
failures
Isolate the
failure
Responsive
“Quick to respond or react appropriately”
Latency consistent
Batching
Back Pressure
Reactive Request
Java Reactive frameworks
Reactor
ReactiveX
Dúvidas?
THANK YOU!
FRIENDS TECHDAY
COMPARTILHAR, APRENDER E CONTRIBUIR!
Felipe Mamud
@ftmamud
Raphael Almeida
@raphait
We are a reactive family

Reactive programming no mundo Java