Reactive programming using rx java & akka actors - pdx-scala - june 2014
Reactive programming no mundo Java
-
Upload
felipe-mamud -
Category
Software
-
view
32 -
download
5
Transcript of Reactive programming no mundo Java
![Page 1: Reactive programming no mundo Java](https://reader033.fdocuments.net/reader033/viewer/2022042717/55cfbc23bb61eb95588b4784/html5/thumbnails/1.jpg)
Felipe Mamud@ftmamud
Raphael Almeida@raphait
Reactive Programming
no mundo () -> “Java”
![Page 3: Reactive programming no mundo Java](https://reader033.fdocuments.net/reader033/viewer/2022042717/55cfbc23bb61eb95588b4784/html5/thumbnails/3.jpg)
![Page 4: Reactive programming no mundo Java](https://reader033.fdocuments.net/reader033/viewer/2022042717/55cfbc23bb61eb95588b4784/html5/thumbnails/4.jpg)
INTERNET USERS2.4bi
2012
INTERNET USERS3.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 TIMESECONDS
CLOUD-BASED CLUSTERMULTICORE
OFFLINE MAINTENANCE
REAL TIMEMILLISEC/MICROSEC
100% UPTIME
FAST DATA
GIBABYTE DATA
BIGDATA
PETABYTES
2015
![Page 5: Reactive programming no mundo Java](https://reader033.fdocuments.net/reader033/viewer/2022042717/55cfbc23bb61eb95588b4784/html5/thumbnails/5.jpg)
Como criamos sistemas mais robustos, mais resilientes, mais flexíveis e muito mais capazes de responder às exigências de hoje em dia?
![Page 6: Reactive programming no mundo Java](https://reader033.fdocuments.net/reader033/viewer/2022042717/55cfbc23bb61eb95588b4784/html5/thumbnails/6.jpg)
Precisamos de sistemas que irão:
● Reagir a eventos (Event-Driven)
● Reagir a carga (Scalable)
● Reagir a falhas (Resilient)
● Reagir a usuários (Responsive)
![Page 7: Reactive programming no mundo Java](https://reader033.fdocuments.net/reader033/viewer/2022042717/55cfbc23bb61eb95588b4784/html5/thumbnails/7.jpg)
Reactive Programming“Readily responsive to a stimulus”
![Page 8: Reactive programming no mundo Java](https://reader033.fdocuments.net/reader033/viewer/2022042717/55cfbc23bb61eb95588b4784/html5/thumbnails/8.jpg)
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
![Page 9: Reactive programming no mundo Java](https://reader033.fdocuments.net/reader033/viewer/2022042717/55cfbc23bb61eb95588b4784/html5/thumbnails/9.jpg)
Reactive Manifesto
![Page 10: Reactive programming no mundo Java](https://reader033.fdocuments.net/reader033/viewer/2022042717/55cfbc23bb61eb95588b4784/html5/thumbnails/10.jpg)
Message-Driven“Reactive Systems rely on asynchronous
message-passing”
Share Mutable State
Immutability
Avoid Block
Asynchronous
![Page 11: Reactive programming no mundo Java](https://reader033.fdocuments.net/reader033/viewer/2022042717/55cfbc23bb61eb95588b4784/html5/thumbnails/11.jpg)
Some t ls
● Actors
● Agents
● Future/Dataflow
● Reactive Extensions (Rx)
![Page 12: Reactive programming no mundo Java](https://reader033.fdocuments.net/reader033/viewer/2022042717/55cfbc23bb61eb95588b4784/html5/thumbnails/12.jpg)
Elastic“Capable of being easily expanded or
upgraded on demand”
Distribuited systems
Availability
Scalability
Asynchronous
![Page 13: Reactive programming no mundo Java](https://reader033.fdocuments.net/reader033/viewer/2022042717/55cfbc23bb61eb95588b4784/html5/thumbnails/13.jpg)
“Almost” no limit to scalability.
Shared Nothing
Assynchronous communication
Location Transparency
Loose Coupling
![Page 14: Reactive programming no mundo Java](https://reader033.fdocuments.net/reader033/viewer/2022042717/55cfbc23bb61eb95588b4784/html5/thumbnails/14.jpg)
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
![Page 15: Reactive programming no mundo Java](https://reader033.fdocuments.net/reader033/viewer/2022042717/55cfbc23bb61eb95588b4784/html5/thumbnails/15.jpg)
Responsive“Quick to respond or react appropriately”
Latency consistent
Batching
Back Pressure
Reactive Request
![Page 16: Reactive programming no mundo Java](https://reader033.fdocuments.net/reader033/viewer/2022042717/55cfbc23bb61eb95588b4784/html5/thumbnails/16.jpg)
Java Reactive frameworksReactor
ReactiveX
![Page 18: Reactive programming no mundo Java](https://reader033.fdocuments.net/reader033/viewer/2022042717/55cfbc23bb61eb95588b4784/html5/thumbnails/18.jpg)
Dúvidas?
![Page 19: Reactive programming no mundo Java](https://reader033.fdocuments.net/reader033/viewer/2022042717/55cfbc23bb61eb95588b4784/html5/thumbnails/19.jpg)
THANK YOU!FRIENDS TECHDAY
COMPARTILHAR, APRENDER E CONTRIBUIR!
Felipe Mamud@ftmamud
Raphael Almeida@raphait
We are a reactive family