arquitetura reativa
TRANSCRIPT
Arquitetura ReativaFabiano Guizellini Modos
Arquiteto de Software: HBSIStwitter: @fmodos
github.com/fmodos
Agenda
• Introdução• Message Driven• Elastic• Resilient• Responsive• Ferramentas• Estudo de Caso
Por que Arquitetura Reativa?
10 years ago Now
Server nodes 10’s 1000’s
Response times Seconds Milliseconds
Maintenance downtimes Hours None
Data volume GBs TBs -> PBs
Demanda atual não é atendida pelas arquiteturas antigas
O que é Arquitetura Reativa?Um termo que agrupa algumas soluções que estão sendo utilizadas nos últimos anos:
http://www.reactivemanifesto.org/
Por que Message Driven?
Síncrona/Single Thread
Por que Message Driven?
Assíncrona/Multi Thread
???
Concorrente
Por que Message Driven?
Assíncrono / Non-Blocking / Paralelo
O que é Message Driven?
• Loosely couple architecture, easier to extend, maintain, evolve
• Location transparency
• Asynchronous, non-blocking, parallel
• Immutable state
Por que Elastic?
Porque Elastic?
O que é Elastic?
• React to changes by increasing or decreasing the resources
• Scalability and elasticity to the Cloud
• More cost-efficient utilization of hardware
• Project has no contention points or central bottlenecks
Por que Resilient?
Software
VM
Server
Network
DataCenter
Por que Resilient?
O que é Resilient?
• Failure is embraced as a natural state in the app lifecycle
• Resilience is a first-class construct
• Failure is detected, isolated, and managed
• Application self heal
Por que Responsive?
O que é Responsive?
• Real time, engaging, rich and collaborative
• Create an open and ongoing, dialog with users
• Inpires a feeling of connectedness
• Fully Reactive enabling push instead of pull
Ferramentas
• Akka (Message Driven)• RabbitMQ (Message Driven)• Elastic BeanStalk/Auto Scaling(Elastic)• Hystrix (Resilient)• WebSocket (Responsive)
Estudo de Caso
WebServer Operadora Carão de Crédito
HTTP HTTP
Fluxo:1- Usuário Confirma Compra 2- WebServer autoriza compra com operadora de Cartão de Crédito3- WebServer notifica usuário se a compra foi autorizada
Estudo de Caso
LoadBalancer
Operadora Cartão de Crédito
HTTPWebServer
WebServer
MessageQueue
WebSocket
WebSocket
Monitoramento
Referências Bibliograficas
• http://www.reactivemanifesto.org/• https://www.typesafe.com/• https://vimeo.com/78892176• http://blog.andrefaria.com/programacao-reativa-reactive-programming• https://github.com/Netflix/Hystrix/wiki• http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/Welcome.html• https://www.rabbitmq.com/• https://github.com/Netflix/SimianArmy/wiki• https://www.websocket.org/
Obrigado… That’s All Folks!!!