SlideShare a Scribd company logo
Reactive Programming: Brincando
com eficiência, composição e
assincronia.
Felipe Mamud
@ftmamud
Raphael Almeida
@raphait
HPC
Agradecimentos
HPC
Será que nossos sistemas já
estão no limite?
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
As exigências e as expectativas
para aplicações mudaram
drasticamente nos últimos anos.
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”
Reactive Manifesto
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 frameworks
Reactor
ReactiveX
Message-Driven
“Reactive Systems rely on asynchronous
message-passing”
Share Mutable State
● with threads:
○ code that is totally non-deterministic;
○ the root of all evil;
● Avoid it at all cost;
● Use immutability;
Never/Avoid Block
● Unless you really have to;
● Blocking kills scalability (+ performance);
● Use non-blocking IO;
● Use lock-free concurrency;
Async
● Use asynchronous event/message passing;
● Lower latency (vs sales);
● Better throughput;
● A more loosely coupled architecture, easier
to extend, evolve and maintain.
Some t ls
● Actors
● Agents
● Future/Dataflow
● Reactive Extensions (Rx)
Actors
● Isolated lightweight event-based processes;
● Each actor has a mailbox (message queue);
● Communicates through asynchronous and
non-blocking message passing;
● Location transparent (distributable);
● Supervision-based failure management;
Agents
● Reactive memory cells;
● Send a update function to the Agent;
● Reads are “free”, just dereferences
the Ref;
● Composes nicely;
Futures/Dataflow
● Allows you to spawn concurrent
computations and work with the not yet
computed results;
● Freely sharable;
● Allows non-blocking composition;
● Build in model for managing failure;
Reactive Extensions (Rx)
● Extend Futures with the concept of a
Stream;
● Composable in a type-safe way;
● Event-based & asynchronous;
● Observable ⇛ Push Collections;
Elastic
“Capable of being easily expanded or
upgraded on demand”
● Mobile
● SQL Replication
● NoSQL DB
● Cloud Services
Distributed systems
What is the essence of
distributed computing?
What is the essence of distributed
computing?
1. Information travels at the speed of light;
2. Independent things fail independently.
Why necessary?
● Scalability;
● Availability;
● The network is unreliable;
● Location Transparency;
“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.”
● Exception in thread;
● Errors do not propagate between threads;
● Error handling tangled with business logic;
Failure recover
Right Way
● Isolate the failure;
● Compartmentalize;
● Manage failure locally;
● Avoid cascading failures;
● Supervision;
Responsive
“Quick to respond or react appropriately”
● Latency consistent;
● Use Back Pressure;
● Smart Batching;
● Reative Request
(Async & Non-blocking Request & Response)
Responsive
Dúvidas?
THANK YOU!
FRIENDS TECHDAY
COMPARTILHAR, APRENDER E CONTRIBUIR!
Felipe Mamud
@ftmamud
Raphael Almeida
@raphait
We are a reactive family

More Related Content

What's hot

Day in the life event-driven workshop
Day in the life  event-driven workshopDay in the life  event-driven workshop
Day in the life event-driven workshop
Christina Lin
 
Three Pillars, Zero Answers: Rethinking Observability
Three Pillars, Zero Answers: Rethinking ObservabilityThree Pillars, Zero Answers: Rethinking Observability
Three Pillars, Zero Answers: Rethinking Observability
DevOps.com
 
Introduction to Rundeck
Introduction to Rundeck Introduction to Rundeck
Introduction to Rundeck
Rundeck
 
Agile integration cloud native developement
Agile integration   cloud native developementAgile integration   cloud native developement
Agile integration cloud native developement
Christina Lin
 
How to Overcome Data Challenges When Refactoring Monoliths to Microservices
How to Overcome Data Challenges When Refactoring Monoliths to MicroservicesHow to Overcome Data Challenges When Refactoring Monoliths to Microservices
How to Overcome Data Challenges When Refactoring Monoliths to Microservices
VMware Tanzu
 
Smarter Monitoring for Highly Distributed Cloud Foundry Application Environme...
Smarter Monitoring for Highly Distributed Cloud Foundry Application Environme...Smarter Monitoring for Highly Distributed Cloud Foundry Application Environme...
Smarter Monitoring for Highly Distributed Cloud Foundry Application Environme...
Dynatrace
 
Elastic APM : développez vos logs et vos indicateurs pour obtenir une vue com...
Elastic APM : développez vos logs et vos indicateurs pour obtenir une vue com...Elastic APM : développez vos logs et vos indicateurs pour obtenir une vue com...
Elastic APM : développez vos logs et vos indicateurs pour obtenir une vue com...
Elasticsearch
 
The Need of Cloud-Native Application
The Need of Cloud-Native ApplicationThe Need of Cloud-Native Application
The Need of Cloud-Native Application
Emiliano Pecis
 
Dynatrace Cloud-Native Workshop Slides
Dynatrace Cloud-Native Workshop SlidesDynatrace Cloud-Native Workshop Slides
Dynatrace Cloud-Native Workshop Slides
VMware Tanzu
 
Sogeti Guru Night 2015: Changes in-software-development
Sogeti Guru Night 2015: Changes in-software-developmentSogeti Guru Night 2015: Changes in-software-development
Sogeti Guru Night 2015: Changes in-software-development
erwindeg
 
Keynote: Elastic Observability evolution and vision
Keynote: Elastic Observability evolution and visionKeynote: Elastic Observability evolution and vision
Keynote: Elastic Observability evolution and vision
Elasticsearch
 
Dynatrace: The untouchables - the Dynatrace offering here and now
Dynatrace: The untouchables - the Dynatrace offering here and nowDynatrace: The untouchables - the Dynatrace offering here and now
Dynatrace: The untouchables - the Dynatrace offering here and now
Dynatrace
 
Cloud-Native Workshop New York- Dynatrace
Cloud-Native Workshop New York- DynatraceCloud-Native Workshop New York- Dynatrace
Cloud-Native Workshop New York- Dynatrace
VMware Tanzu
 
12-Factor App
12-Factor App12-Factor App
Building Highly Scalable Apps On Bluemix
Building Highly Scalable Apps On BluemixBuilding Highly Scalable Apps On Bluemix
Building Highly Scalable Apps On Bluemix
Ryan Baxter
 
Get the Message Across: Seamlessly Transport Data to Apps, Anywhere
Get the Message Across: Seamlessly Transport Data to Apps, AnywhereGet the Message Across: Seamlessly Transport Data to Apps, Anywhere
Get the Message Across: Seamlessly Transport Data to Apps, Anywhere
VMware Tanzu
 
Cloud Native Infrastructure Automation
Cloud Native Infrastructure AutomationCloud Native Infrastructure Automation
Cloud Native Infrastructure Automation
VMware Tanzu
 
Extending the Platform with Spring Boot and Cloud Foundry
Extending the Platform with Spring Boot and Cloud FoundryExtending the Platform with Spring Boot and Cloud Foundry
Extending the Platform with Spring Boot and Cloud Foundry
Kenny Bastani
 
Microsoft: Enterprise search for cloud native applications
Microsoft: Enterprise search for cloud native applicationsMicrosoft: Enterprise search for cloud native applications
Microsoft: Enterprise search for cloud native applications
Elasticsearch
 
Modernizing Your Aging Architecture: What Enterprise Architects Need To Know ...
Modernizing Your Aging Architecture: What Enterprise Architects Need To Know ...Modernizing Your Aging Architecture: What Enterprise Architects Need To Know ...
Modernizing Your Aging Architecture: What Enterprise Architects Need To Know ...
Legacy Typesafe (now Lightbend)
 

What's hot (20)

Day in the life event-driven workshop
Day in the life  event-driven workshopDay in the life  event-driven workshop
Day in the life event-driven workshop
 
Three Pillars, Zero Answers: Rethinking Observability
Three Pillars, Zero Answers: Rethinking ObservabilityThree Pillars, Zero Answers: Rethinking Observability
Three Pillars, Zero Answers: Rethinking Observability
 
Introduction to Rundeck
Introduction to Rundeck Introduction to Rundeck
Introduction to Rundeck
 
Agile integration cloud native developement
Agile integration   cloud native developementAgile integration   cloud native developement
Agile integration cloud native developement
 
How to Overcome Data Challenges When Refactoring Monoliths to Microservices
How to Overcome Data Challenges When Refactoring Monoliths to MicroservicesHow to Overcome Data Challenges When Refactoring Monoliths to Microservices
How to Overcome Data Challenges When Refactoring Monoliths to Microservices
 
Smarter Monitoring for Highly Distributed Cloud Foundry Application Environme...
Smarter Monitoring for Highly Distributed Cloud Foundry Application Environme...Smarter Monitoring for Highly Distributed Cloud Foundry Application Environme...
Smarter Monitoring for Highly Distributed Cloud Foundry Application Environme...
 
Elastic APM : développez vos logs et vos indicateurs pour obtenir une vue com...
Elastic APM : développez vos logs et vos indicateurs pour obtenir une vue com...Elastic APM : développez vos logs et vos indicateurs pour obtenir une vue com...
Elastic APM : développez vos logs et vos indicateurs pour obtenir une vue com...
 
The Need of Cloud-Native Application
The Need of Cloud-Native ApplicationThe Need of Cloud-Native Application
The Need of Cloud-Native Application
 
Dynatrace Cloud-Native Workshop Slides
Dynatrace Cloud-Native Workshop SlidesDynatrace Cloud-Native Workshop Slides
Dynatrace Cloud-Native Workshop Slides
 
Sogeti Guru Night 2015: Changes in-software-development
Sogeti Guru Night 2015: Changes in-software-developmentSogeti Guru Night 2015: Changes in-software-development
Sogeti Guru Night 2015: Changes in-software-development
 
Keynote: Elastic Observability evolution and vision
Keynote: Elastic Observability evolution and visionKeynote: Elastic Observability evolution and vision
Keynote: Elastic Observability evolution and vision
 
Dynatrace: The untouchables - the Dynatrace offering here and now
Dynatrace: The untouchables - the Dynatrace offering here and nowDynatrace: The untouchables - the Dynatrace offering here and now
Dynatrace: The untouchables - the Dynatrace offering here and now
 
Cloud-Native Workshop New York- Dynatrace
Cloud-Native Workshop New York- DynatraceCloud-Native Workshop New York- Dynatrace
Cloud-Native Workshop New York- Dynatrace
 
12-Factor App
12-Factor App12-Factor App
12-Factor App
 
Building Highly Scalable Apps On Bluemix
Building Highly Scalable Apps On BluemixBuilding Highly Scalable Apps On Bluemix
Building Highly Scalable Apps On Bluemix
 
Get the Message Across: Seamlessly Transport Data to Apps, Anywhere
Get the Message Across: Seamlessly Transport Data to Apps, AnywhereGet the Message Across: Seamlessly Transport Data to Apps, Anywhere
Get the Message Across: Seamlessly Transport Data to Apps, Anywhere
 
Cloud Native Infrastructure Automation
Cloud Native Infrastructure AutomationCloud Native Infrastructure Automation
Cloud Native Infrastructure Automation
 
Extending the Platform with Spring Boot and Cloud Foundry
Extending the Platform with Spring Boot and Cloud FoundryExtending the Platform with Spring Boot and Cloud Foundry
Extending the Platform with Spring Boot and Cloud Foundry
 
Microsoft: Enterprise search for cloud native applications
Microsoft: Enterprise search for cloud native applicationsMicrosoft: Enterprise search for cloud native applications
Microsoft: Enterprise search for cloud native applications
 
Modernizing Your Aging Architecture: What Enterprise Architects Need To Know ...
Modernizing Your Aging Architecture: What Enterprise Architects Need To Know ...Modernizing Your Aging Architecture: What Enterprise Architects Need To Know ...
Modernizing Your Aging Architecture: What Enterprise Architects Need To Know ...
 

Similar to Reactive programming: Brincando com eficiência, composição e assíncronia

'How to build efficient backend based on microservice architecture' by Anton ...
'How to build efficient backend based on microservice architecture' by Anton ...'How to build efficient backend based on microservice architecture' by Anton ...
'How to build efficient backend based on microservice architecture' by Anton ...
OdessaJS Conf
 
Stateful on Stateless - The Future of Applications in the Cloud
Stateful on Stateless - The Future of Applications in the CloudStateful on Stateless - The Future of Applications in the Cloud
Stateful on Stateless - The Future of Applications in the Cloud
Markus Eisele
 
We are drowning in complexity—can we do better?
We are drowning in complexity—can we do better?We are drowning in complexity—can we do better?
We are drowning in complexity—can we do better?
Jonas Bonér
 
Cloudify your applications: microservices and beyond
Cloudify your applications: microservices and beyondCloudify your applications: microservices and beyond
Cloudify your applications: microservices and beyond
Ugo Landini
 
Acme Freight: Developing Microservices and APIs on Bluemix
Acme Freight: Developing Microservices and APIs on BluemixAcme Freight: Developing Microservices and APIs on Bluemix
Acme Freight: Developing Microservices and APIs on Bluemix
Joe Sepi
 
Build A Scalable Mobile App
Build A Scalable Mobile App Build A Scalable Mobile App
Build A Scalable Mobile App
Mohamed Aboul-Fotouh
 
Reactive - Is it really a Magic Pill?
Reactive - Is it really a Magic Pill?Reactive - Is it really a Magic Pill?
Reactive - Is it really a Magic Pill?
Tech Triveni
 
Best Practices Building Cloud Scale Apps with Microservices
Best Practices Building Cloud Scale Apps with MicroservicesBest Practices Building Cloud Scale Apps with Microservices
Best Practices Building Cloud Scale Apps with Microservices
Jim (张建军) Zhang
 
Docebo: history of a journey from legacy to serverless
Docebo: history of a journey from legacy to serverlessDocebo: history of a journey from legacy to serverless
Docebo: history of a journey from legacy to serverless
AWS User Group Italy
 
Microservice
MicroserviceMicroservice
Microservice
Viney Shih
 
Preparing for Neo - Singapore OutSystems User Group October 2022 Meetup
Preparing for Neo - Singapore OutSystems User Group October 2022 MeetupPreparing for Neo - Singapore OutSystems User Group October 2022 Meetup
Preparing for Neo - Singapore OutSystems User Group October 2022 Meetup
YashrajNayak4
 
Microservices Architecture
Microservices ArchitectureMicroservices Architecture
Microservices Architecture
Lucian Neghina
 
Modernizing Applications with Microservices and DC/OS (Lightbend/Mesosphere c...
Modernizing Applications with Microservices and DC/OS (Lightbend/Mesosphere c...Modernizing Applications with Microservices and DC/OS (Lightbend/Mesosphere c...
Modernizing Applications with Microservices and DC/OS (Lightbend/Mesosphere c...
Lightbend
 
Microservices Architecture - Bangkok 2018
Microservices Architecture - Bangkok 2018Microservices Architecture - Bangkok 2018
Microservices Architecture - Bangkok 2018
Araf Karsh Hamid
 
Pragmatic Approach to Microservices and Cell-based Architecture
Pragmatic Approach to Microservices and Cell-based Architecture Pragmatic Approach to Microservices and Cell-based Architecture
Pragmatic Approach to Microservices and Cell-based Architecture
Andrew Blades
 
Why Microservice
Why Microservice Why Microservice
Why Microservice
Kelvin Yeung
 
AppDev with Microservices
AppDev with MicroservicesAppDev with Microservices
AppDev with Microservices
Rishabh Dugar
 
CWIN17 Utrecht / cg u services - frank van der wal
CWIN17 Utrecht / cg u services - frank van der walCWIN17 Utrecht / cg u services - frank van der wal
CWIN17 Utrecht / cg u services - frank van der wal
Capgemini
 
Why Your Digital Transformation Strategy Demands Middleware Modernization
Why Your Digital Transformation Strategy Demands Middleware ModernizationWhy Your Digital Transformation Strategy Demands Middleware Modernization
Why Your Digital Transformation Strategy Demands Middleware Modernization
VMware Tanzu
 
Adopting the Cloud
Adopting the CloudAdopting the Cloud
Adopting the Cloud
Tapio Rautonen
 

Similar to Reactive programming: Brincando com eficiência, composição e assíncronia (20)

'How to build efficient backend based on microservice architecture' by Anton ...
'How to build efficient backend based on microservice architecture' by Anton ...'How to build efficient backend based on microservice architecture' by Anton ...
'How to build efficient backend based on microservice architecture' by Anton ...
 
Stateful on Stateless - The Future of Applications in the Cloud
Stateful on Stateless - The Future of Applications in the CloudStateful on Stateless - The Future of Applications in the Cloud
Stateful on Stateless - The Future of Applications in the Cloud
 
We are drowning in complexity—can we do better?
We are drowning in complexity—can we do better?We are drowning in complexity—can we do better?
We are drowning in complexity—can we do better?
 
Cloudify your applications: microservices and beyond
Cloudify your applications: microservices and beyondCloudify your applications: microservices and beyond
Cloudify your applications: microservices and beyond
 
Acme Freight: Developing Microservices and APIs on Bluemix
Acme Freight: Developing Microservices and APIs on BluemixAcme Freight: Developing Microservices and APIs on Bluemix
Acme Freight: Developing Microservices and APIs on Bluemix
 
Build A Scalable Mobile App
Build A Scalable Mobile App Build A Scalable Mobile App
Build A Scalable Mobile App
 
Reactive - Is it really a Magic Pill?
Reactive - Is it really a Magic Pill?Reactive - Is it really a Magic Pill?
Reactive - Is it really a Magic Pill?
 
Best Practices Building Cloud Scale Apps with Microservices
Best Practices Building Cloud Scale Apps with MicroservicesBest Practices Building Cloud Scale Apps with Microservices
Best Practices Building Cloud Scale Apps with Microservices
 
Docebo: history of a journey from legacy to serverless
Docebo: history of a journey from legacy to serverlessDocebo: history of a journey from legacy to serverless
Docebo: history of a journey from legacy to serverless
 
Microservice
MicroserviceMicroservice
Microservice
 
Preparing for Neo - Singapore OutSystems User Group October 2022 Meetup
Preparing for Neo - Singapore OutSystems User Group October 2022 MeetupPreparing for Neo - Singapore OutSystems User Group October 2022 Meetup
Preparing for Neo - Singapore OutSystems User Group October 2022 Meetup
 
Microservices Architecture
Microservices ArchitectureMicroservices Architecture
Microservices Architecture
 
Modernizing Applications with Microservices and DC/OS (Lightbend/Mesosphere c...
Modernizing Applications with Microservices and DC/OS (Lightbend/Mesosphere c...Modernizing Applications with Microservices and DC/OS (Lightbend/Mesosphere c...
Modernizing Applications with Microservices and DC/OS (Lightbend/Mesosphere c...
 
Microservices Architecture - Bangkok 2018
Microservices Architecture - Bangkok 2018Microservices Architecture - Bangkok 2018
Microservices Architecture - Bangkok 2018
 
Pragmatic Approach to Microservices and Cell-based Architecture
Pragmatic Approach to Microservices and Cell-based Architecture Pragmatic Approach to Microservices and Cell-based Architecture
Pragmatic Approach to Microservices and Cell-based Architecture
 
Why Microservice
Why Microservice Why Microservice
Why Microservice
 
AppDev with Microservices
AppDev with MicroservicesAppDev with Microservices
AppDev with Microservices
 
CWIN17 Utrecht / cg u services - frank van der wal
CWIN17 Utrecht / cg u services - frank van der walCWIN17 Utrecht / cg u services - frank van der wal
CWIN17 Utrecht / cg u services - frank van der wal
 
Why Your Digital Transformation Strategy Demands Middleware Modernization
Why Your Digital Transformation Strategy Demands Middleware ModernizationWhy Your Digital Transformation Strategy Demands Middleware Modernization
Why Your Digital Transformation Strategy Demands Middleware Modernization
 
Adopting the Cloud
Adopting the CloudAdopting the Cloud
Adopting the Cloud
 

More from Felipe Mamud

Erlang sem enrolação
Erlang sem enrolaçãoErlang sem enrolação
Erlang sem enrolação
Felipe Mamud
 
Desenvolvendo software no mundo atual
Desenvolvendo software no mundo atualDesenvolvendo software no mundo atual
Desenvolvendo software no mundo atual
Felipe Mamud
 
Reactive programming no mundo Java
Reactive programming no mundo JavaReactive programming no mundo Java
Reactive programming no mundo Java
Felipe Mamud
 
Minha aplicação Java vai pra nuvem. E agora?
Minha aplicação Java vai pra nuvem. E agora?Minha aplicação Java vai pra nuvem. E agora?
Minha aplicação Java vai pra nuvem. E agora?
Felipe Mamud
 
FTD Groovy
FTD GroovyFTD Groovy
FTD Groovy
Felipe Mamud
 
Golang
GolangGolang
Golang
Felipe Mamud
 
Java8
Java8Java8
EBD - Perguntas que não querem calar
EBD - Perguntas que não querem calarEBD - Perguntas que não querem calar
EBD - Perguntas que não querem calar
Felipe Mamud
 
EBD - UFC
EBD - UFCEBD - UFC
EBD - UFC
Felipe Mamud
 
EBD - Escolhas
EBD - EscolhasEBD - Escolhas
EBD - Escolhas
Felipe Mamud
 
EBD - A importância da Escola Bíblica Dominical
EBD - A importância da Escola Bíblica DominicalEBD - A importância da Escola Bíblica Dominical
EBD - A importância da Escola Bíblica Dominical
Felipe Mamud
 
EBD - Força de jovem
EBD - Força de jovemEBD - Força de jovem
EBD - Força de jovem
Felipe Mamud
 
EBD - O que você quer ser
EBD - O que você quer serEBD - O que você quer ser
EBD - O que você quer ser
Felipe Mamud
 
EBD - Deixando de ser bebê
EBD - Deixando de ser bebêEBD - Deixando de ser bebê
EBD - Deixando de ser bebê
Felipe Mamud
 
EBD - O que você faria se fosse invisível
EBD - O que você faria se fosse invisívelEBD - O que você faria se fosse invisível
EBD - O que você faria se fosse invisível
Felipe Mamud
 
EBD - Coisas que não fazem sentido
EBD - Coisas que não fazem sentidoEBD - Coisas que não fazem sentido
EBD - Coisas que não fazem sentido
Felipe Mamud
 
EBD - Faça mais do que saber o que e um bocejo
EBD - Faça mais do que saber o que e um bocejoEBD - Faça mais do que saber o que e um bocejo
EBD - Faça mais do que saber o que e um bocejo
Felipe Mamud
 
EBD - Varias formas de dizer a mesma coisa
EBD - Varias formas de dizer a mesma coisaEBD - Varias formas de dizer a mesma coisa
EBD - Varias formas de dizer a mesma coisa
Felipe Mamud
 
EBD - 10 coisas que temos de dar a Deus
EBD - 10 coisas que temos de dar a DeusEBD - 10 coisas que temos de dar a Deus
EBD - 10 coisas que temos de dar a Deus
Felipe Mamud
 

More from Felipe Mamud (20)

Erlang sem enrolação
Erlang sem enrolaçãoErlang sem enrolação
Erlang sem enrolação
 
Desenvolvendo software no mundo atual
Desenvolvendo software no mundo atualDesenvolvendo software no mundo atual
Desenvolvendo software no mundo atual
 
Reactive programming no mundo Java
Reactive programming no mundo JavaReactive programming no mundo Java
Reactive programming no mundo Java
 
Minha aplicação Java vai pra nuvem. E agora?
Minha aplicação Java vai pra nuvem. E agora?Minha aplicação Java vai pra nuvem. E agora?
Minha aplicação Java vai pra nuvem. E agora?
 
FTD Groovy
FTD GroovyFTD Groovy
FTD Groovy
 
FTD JVM Internals
FTD JVM InternalsFTD JVM Internals
FTD JVM Internals
 
Golang
GolangGolang
Golang
 
Java8
Java8Java8
Java8
 
EBD - Perguntas que não querem calar
EBD - Perguntas que não querem calarEBD - Perguntas que não querem calar
EBD - Perguntas que não querem calar
 
EBD - UFC
EBD - UFCEBD - UFC
EBD - UFC
 
EBD - Escolhas
EBD - EscolhasEBD - Escolhas
EBD - Escolhas
 
EBD - A importância da Escola Bíblica Dominical
EBD - A importância da Escola Bíblica DominicalEBD - A importância da Escola Bíblica Dominical
EBD - A importância da Escola Bíblica Dominical
 
EBD - Força de jovem
EBD - Força de jovemEBD - Força de jovem
EBD - Força de jovem
 
EBD - O que você quer ser
EBD - O que você quer serEBD - O que você quer ser
EBD - O que você quer ser
 
EBD - Deixando de ser bebê
EBD - Deixando de ser bebêEBD - Deixando de ser bebê
EBD - Deixando de ser bebê
 
EBD - O que você faria se fosse invisível
EBD - O que você faria se fosse invisívelEBD - O que você faria se fosse invisível
EBD - O que você faria se fosse invisível
 
EBD - Coisas que não fazem sentido
EBD - Coisas que não fazem sentidoEBD - Coisas que não fazem sentido
EBD - Coisas que não fazem sentido
 
EBD - Faça mais do que saber o que e um bocejo
EBD - Faça mais do que saber o que e um bocejoEBD - Faça mais do que saber o que e um bocejo
EBD - Faça mais do que saber o que e um bocejo
 
EBD - Varias formas de dizer a mesma coisa
EBD - Varias formas de dizer a mesma coisaEBD - Varias formas de dizer a mesma coisa
EBD - Varias formas de dizer a mesma coisa
 
EBD - 10 coisas que temos de dar a Deus
EBD - 10 coisas que temos de dar a DeusEBD - 10 coisas que temos de dar a Deus
EBD - 10 coisas que temos de dar a Deus
 

Recently uploaded

Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
XfilesPro
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
KrzysztofKkol1
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
Ortus Solutions, Corp
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 

Recently uploaded (20)

Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 

Reactive programming: Brincando com eficiência, composição e assíncronia

  • 1. Reactive Programming: Brincando com eficiência, composição e assincronia. Felipe Mamud @ftmamud Raphael Almeida @raphait HPC
  • 3. Será que nossos sistemas já estão no limite?
  • 4.
  • 5. 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
  • 6. As exigências e as expectativas para aplicações mudaram drasticamente nos últimos anos.
  • 7. Precisamos de sistemas que irão: ● Reagir a eventos (Event-Driven) ● Reagir a carga (Scalable) ● Reagir a falhas (Resilient) ● Reagir a usuários (Responsive)
  • 10. 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
  • 12. Message-Driven “Reactive Systems rely on asynchronous message-passing”
  • 13. Share Mutable State ● with threads: ○ code that is totally non-deterministic; ○ the root of all evil; ● Avoid it at all cost; ● Use immutability;
  • 14. Never/Avoid Block ● Unless you really have to; ● Blocking kills scalability (+ performance); ● Use non-blocking IO; ● Use lock-free concurrency;
  • 15. Async ● Use asynchronous event/message passing; ● Lower latency (vs sales); ● Better throughput; ● A more loosely coupled architecture, easier to extend, evolve and maintain.
  • 16. Some t ls ● Actors ● Agents ● Future/Dataflow ● Reactive Extensions (Rx)
  • 17. Actors ● Isolated lightweight event-based processes; ● Each actor has a mailbox (message queue); ● Communicates through asynchronous and non-blocking message passing; ● Location transparent (distributable); ● Supervision-based failure management;
  • 18. Agents ● Reactive memory cells; ● Send a update function to the Agent; ● Reads are “free”, just dereferences the Ref; ● Composes nicely;
  • 19. Futures/Dataflow ● Allows you to spawn concurrent computations and work with the not yet computed results; ● Freely sharable; ● Allows non-blocking composition; ● Build in model for managing failure;
  • 20. Reactive Extensions (Rx) ● Extend Futures with the concept of a Stream; ● Composable in a type-safe way; ● Event-based & asynchronous; ● Observable ⇛ Push Collections;
  • 21. Elastic “Capable of being easily expanded or upgraded on demand”
  • 22. ● Mobile ● SQL Replication ● NoSQL DB ● Cloud Services Distributed systems
  • 23. What is the essence of distributed computing?
  • 24. What is the essence of distributed computing? 1. Information travels at the speed of light; 2. Independent things fail independently.
  • 25. Why necessary? ● Scalability; ● Availability; ● The network is unreliable; ● Location Transparency;
  • 26. “Almost” no limit to scalability. Shared Nothing Assynchronous communication Location Transparency Loose Coupling
  • 27. Resilience “The ability of a substance or object to spring back into shape.” “The capacity to recover quickly from difficulties.”
  • 28. ● Exception in thread; ● Errors do not propagate between threads; ● Error handling tangled with business logic; Failure recover
  • 29. Right Way ● Isolate the failure; ● Compartmentalize; ● Manage failure locally; ● Avoid cascading failures; ● Supervision;
  • 30. Responsive “Quick to respond or react appropriately”
  • 31. ● Latency consistent; ● Use Back Pressure; ● Smart Batching; ● Reative Request (Async & Non-blocking Request & Response) Responsive
  • 32.
  • 34. THANK YOU! FRIENDS TECHDAY COMPARTILHAR, APRENDER E CONTRIBUIR! Felipe Mamud @ftmamud Raphael Almeida @raphait We are a reactive family