8. Nós acreditamos que é necessária uma abordagem coerente para
arquitetura de sistemas... ...nós queremos sistemas Responsivos,
Resilientes, Elásticos e Orientados a Mensagens. Nós chamamos isso
de Sistemas Reativos.
Essas transformações estão acontecendo por causa dos requisitos
que mudaram drasticamente nos últimos anos... ...Hoje há aplicações
em produção em todos os lugares, desde aplicativos móveis até
aplicações na nuvem com clusters rodando milhares processadores
multi-core. Geralmente os usuários esperam respostas em
milisegundos e 100% de disponibilidade.
– The Reactive Manifesto
11. Responsive
• Que responde em tempo hábil;
• Uma aplicação responsiva é o que queremos;
• Responsividade é impossível sem escalabilidade e
resiliência;
“A responsive system is quick to react to all users
—under blue skies and grey skies—in order to
ensure a consistently positive user experience.”
14. Resilient
• O sistema continua respondendo em caso de falha;
• Qualquer sistema que não é resiliente ficará fora
do ar depois de uma falha;
15.
16. Elastic/Scale
• O sistema continua responsivo mesmo sob
variações de demanda;
• Projetos que não tenham pontos de contenção ou
gargalos centrais;
• Prove métricas relevantes e em tempo real;
17.
18. Message Driven
• Não bloqueante;
• Programação Assíncronia;
• Message-driven = event-driven, actor-based, ou
combinação das duas;
25. “Anything can be a stream:
variables, user inputs,
properties, caches, data
structures, etc.”
26.
27.
28.
29.
30.
31. Streams e Collections
“Streams are a series of elements
emitted over time. The series
potentially has no beginning and no
end. Contrast that to arrays, which
are a series of elements arranged
in memory. Arrays have a beginning
and an end”
35. Sistemas que usam
Streams
• Sistemas que normalmente usam abstrações
streams, ETL (extract, transform, load) ;
• Sistemas CEP (complex event processing);
• Sistemas de Reports/Analytics;
• Movimento NoETL, similar ao NoSQL~Como a data
flui pelo Sistema; reports em real time, intenso uso
de dados ~;
37. • You can merge two streams. You can filter a stream
to get another one that has only those events you
are interested in. You can map data values from
one stream to another new one.
• Streams são o centro da reatividade
Organizações que trabalham em diferentes ramos, estão independentemente descobrindo padrões aleatórios para criarem sistemas semelhantes. Esses sistemas são mais robustos, mais resistentes, mais flexíveis e melhor posicionados para sustentar as demandas modernas.
Essas transformações estão acontecendo por causa dos requisitos que mudaram drasticamente nos últimos anos
Roland Kuhn e Jonas Bonér => akka project
Quickness and a positive user experience under various conditions, such as failure of an external system or a spike of traffic, depends on the two traits of a Reactive application: resilience and scalability. A message-driven architectureprovides the overall foundation for a responsive system.
Take another example of synchrony, the single-threaded event loop. This is typical of event-based frameworks such as Node.js — events are emitted, queued, and processed by an event handler in a synchronous loop, and the recipients of those events are anonymous function callbacks. Bottlenecks occur when blocking occurs on the same thread as the event loop, such as one of the callbacks initiating a trip to the database.
A stream is a sequence of ongoing events ordered in time. It can emit three different things: a value (of some type), an error, or a “completed” signal.