Trilha Design de Cdigo Alexandre Brando Lustosa Microsoft
Trilha – Design de Código Alexandre Brandão Lustosa Microsoft MVP / IT Manager at Stone Pagamentos C#. Net MCSD / MCSA DBA SQL Server Io. T Maker / C++ Developer Engineer Founder and Community Manager at. Net Inside and Iot Inside Globalcode – Open 4 education
Message Patterns com Rabbit. MQ, Azure Service. Bus e. Net Core Alexandre Brandão Lustosa Microsoft MVP / IT Manager at Stone Pagamentos C#. Net MCSD / MCSA DBA SQL Server Io. T Maker / C++ Developer Engineer Founder and Community Manager at. Net Inside and Iot Inside Globalcode – Open 4 education
Twitter: @abrandaolustosa E-mail: abrandao@outlook. com abrandao@stone. com. br Linked. In: www. linkedin. com/in/abrandaol Phone: +55 (21) 97367 -6161 Entrepreneur at Stone Pagamentos C#. Net MCSD / MCSA DBA SQL Server Io. T / C++ Developer Engineer Entrepreneur C#. Net Io. T Maker Arquitetura de Sistemas Metodologias Ágeis Algoritmos Computacionais Guitarra e Violão Senior Software Engineer with 20 years of experience in web development, transactional and distributed systems, Microsoft C#. Net specialist and C/C ++ development for Linux Embedded and Microchip Microcontroller. Certificated by Microsoft. Net MCSD Web Developer, MCSA Microsoft SQL Server 2012 and Microsoft IT Specialist. Founder and community leader of Inside. Tech Conf. Globalcode – Open 4 education
Inside conf https: //www. facebook. com/groups/dotnetinside/ https: //www. facebook. com/groups/agileinside/ https: //www. facebook. com/groups/iotinside/ https: //www. facebook. com/groups/devopsinside/ Globalcode – Open 4 education
. Net Inside Cidades em 2018 Cidades em 2019 Rio de Janeiro São Paulo Florianopolis Recife Porto Alegre Espirito Santo Porto Alegre Belo Horizonte Fortaleza Globalcode – Open 4 education
Vagas na Stone Desafio Agile C++ Dev. Ops Python DBA Tecnologia Carreira Oportunidade Node. js C#. Net Java Go. Lang Globalcode – Open 4 education
Agenda Monolitos, Microserviços e Sistemas Distribuídos Controle de Fluxo Síncrono e Assíncrono Consistência Transacional e Eventual Processamento em lote (Batch) Pub/Sub - Observer Compressão, criptografia e payload Implementado padrões no Rabbit. MQ e Azure Service Bus Globalcode – Open 4 education
Message Queue Globalcode – Open 4 education
Message Patterns Which problems are solved? File Transfer Shared Database Remote Procedure Invocation Messaging Globalcode – Open 4 education
Message Queue A message queue is a form of asynchronous service -to-service communication used in serverless and microservices architectures. Messages are stored on the queue until they are processed and deleted. Each message is processed only once, by a single consumer. Globalcode – Open 4 education
Message Queue Globalcode – Open 4 education
Monolitos, Microserviços e Sistemas Distribuídos Globalcode – Open 4 education
Microserviços Requisitos Alta coesão Baixo Acoplamento Autonomia Independência Globalcode – Open 4 education
Globalcode – Open 4 education
Monolito vs Microserviços Globalcode – Open 4 education
Separação por responsabilidade Globalcode – Open 4 education
Globalcode – Open 4 education
Micro. Serviços Globalcode – Open 4 education
Globalcode – Open 4 education
Globalcode – Open 4 education
Globalcode – Open 4 education
Sistema Distribuído Globalcode – Open 4 education
Processamento distribuído Globalcode – Open 4 education
Actor Model Globalcode – Open 4 education
Globalcode – Open 4 education
Actor Model Globalcode – Open 4 education
Globalcode – Open 4 education
Message Broker Globalcode – Open 4 education
Globalcode – Open 4 education
Related Pattern Globalcode – Open 4 education
Controle de Fluxo Síncrono e Assíncrono Globalcode – Open 4 education
Chamada sincrona If an API call is synchronous, it means that code execution will block (or wait) for the API call to return before continuing. This means that until a response is returned by the API, your application will not execute any further, which could be perceived by the user as latency or performance lag in your app. Making an API call synchronously can be beneficial, however, if there is code in your app that will only execute properly once the API response is received. Globalcode – Open 4 education
Chamada sincrona Globalcode – Open 4 education
Chamada sincrona Globalcode – Open 4 education
Chamada assincrona Asynchronous calls do not block (or wait) for the API call to return from the server. Execution continues on in your program, and when the call returns from the server, a "callback" function is executed Globalcode – Open 4 education
Chamada assincrona Globalcode – Open 4 education
Chamada assincrona Globalcode – Open 4 education
Controle de Fluxo Consistência Eventual e Transacional Globalcode – Open 4 education
Consistência Transacional Consistency is one of the four guarantees that define ACID transactions; however, significant ambiguity exists about the nature of this guarantee. It is defined variously as: The guarantee that any transactions started in the future necessarily see the effects of other transactions committed in the past The guarantee that database constraints are not violated, particularly once a transaction commits The guarantee that operations in transactions are performed accurately, correctly, and with validity, with respect to application semantics Globalcode – Open 4 education
Consistência Eventual consistency is a consistency model used in distributed computing to achieve high availability that informally guarantees that, if no new updates are made to a given data item, eventually all accesses to that item will return the last updated value. Eventual consistency, also called optimistic replication, is widely deployed in distributed systems, and has origins in early mobile computing projects Globalcode – Open 4 education
SQL Server Cluster com Always On Globalcode – Open 4 education
Controle de Fluxo Processamento em lote(batch) Globalcode – Open 4 education
Processamento em lote Benefícios do Processamento em Lote: Acelera o processamento de informações em massa; Busca evitar a ociosidade do computador, não necessitando de supervisão ou interação do usuário; Permite o uso de diferentes prioridades para trabalhos interativos e não interativos; Executa apenas uma vez o programa para processar grandes quantias de dados, reduzindo a sobrecarga de sistema. Globalcode – Open 4 education
Processamento agendado ou aseado em chamada de eventos Globalcode – Open 4 education
Controlede Fluxo Pub/Sub Globalcode – Open 4 education
Pub/Sub Also called Observer and Observer-Observable. Use this pattern to notify event handlers (Subscribers or Observers) when some interesting object (Publisher or Observable) changes state. Globalcode – Open 4 education
Pub/Sub Globalcode – Open 4 education
Controle de Fluxo Compressão, Criptografia e Payload Globalcode – Open 4 education
Compressão Dependendo do tipo de dado e compressão, o ganho de performance na transferência pode chegar a 80% de ganho de performance Dificulta a análise de logs, a menos que seja incluído um identificador único para que seja possível rastrear a mensagem no pipeline de processamento da menssagem Globalcode – Open 4 education
Criptografia Garante a segurança da informação dentro do pipeline de processamento da mensagem Dificulta a análise de logs, a menos que seja incluído um identificador único para que seja possível rastrear a mensagem no pipeline de processamento da menssagem Globalcode – Open 4 education
Payload Formatos normalmente utilizados são: JSON XML CSV (text) Byte. Array (Streams) Globalcode – Open 4 education
Implementando Padrões no Rabbit. MQ e Azure Service Bus Globalcode – Open 4 education
Rabbit. MQ Is the most widely deployed open source message broker. https: //www. rabbitmq. com/ Globalcode – Open 4 education
Rabbit. MQ Management Tool Globalcode – Open 4 education
Conceitos Connection Channel Queue Exchange Virtual Host Globalcode – Open 4 education
Rabbit. MQ Protocolos AMPQ 0. 9 MQTT – Pub/Sub STOMP Globalcode – Open 4 education
Workers Globalcode – Open 4 education
Message Patterns Single Worker Pub/Sub Multiple Workers Routing Globalcode – Open 4 education
Topic RPC Globalcode – Open 4 education
Publisher C#. Net Globalcode – Open 4 education
Consumer Worker C#. Net Globalcode – Open 4 education
Cloud AMQP https: //www. cloudamqp. com/ Globalcode – Open 4 education
Azure Service Bus Globalcode – Open 4 education
Azure Service Bus Queue Globalcode – Open 4 education
Azure Service Bus Topic Globalcode – Open 4 education
Event Hub Globalcode – Open 4 education
Globalcode – Open 4 education
Queue Publisher Link para a site de exemplo do Azure Service Bus Queue Client Globalcode – Open 4 education
Queue Publisher Globalcode – Open 4 education
Queue Publisher Globalcode – Open 4 education
Queue Receiver Globalcode – Open 4 education
Queue Receiver Globalcode – Open 4 education
Queue Receiver Globalcode – Open 4 education
Obrigado abrandao@stone. com. br abrandaol@outlook. com (21) 97367 -6161 Linked. In: abrandaol Twitter: abrandaolustosa Globalcode – Open 4 education
- Slides: 75