Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Consistência de dados entre microservices utili...

Consistência de dados entre microservices utilizando serverless e FaaS

Eba! Temos microservices! Agora tudo está resolvido: podemos escalar, distribuir e orquestrar nossos serviços sem qualquer preocupação!

Será? Já parou para pensar nos dados de cada serviço? E nos dados compartilhados entre eles? E pior: já pensou nas transações entre serviços?

Transações ACID não servem mais. Transações distribuídas menos ainda. Como fazer então?

Para isso existe o padrão de Sagas! Com ele é possível resolver esse problema de uma forma inteligente, consistente e alinhado ao paradigma de microservices.

Afinal, de que adianta dezenas, centenas... milhares de microservices, se os dados não forem confiáveis?

Elder Moraes

April 18, 2018
Tweet

More Decks by Elder Moraes

Other Decks in Programming

Transcript

  1. Copyright © 2018, Oracle and/or its affiliates. All rights reserved.

    | Consistência de Dados entre Microservices Utilizando Serverless e FaaS Elder Moraes Cloud Evangelist Oracle Abril, 2018
  2. Copyright © 2018, Oracle and/or its affiliates. All rights reserved.

    | Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.
  3. Copyright © 2018, Oracle and/or its affiliates. All rights reserved.

    | –  M. Conway (Conway’s Law) 9 “Organizations which design systems (…) are constrained to produce designs which are copies of the communication structure of these organizations”
  4. Copyright © 2018, Oracle and/or its affiliates. All rights reserved.

    | 11 “Two Pizzas Rule” Jeff Bezos, CEO at Amazon
  5. Copyright © 2018, Oracle and/or its affiliates. All rights reserved.

    | 12 https://martinfowler.com/articles/microservices.html
  6. Copyright © 2018, Oracle and/or its affiliates. All rights reserved.

    | 13 https://martinfowler.com/articles/microservices.html
  7. Copyright © 2018, Oracle and/or its affiliates. All rights reserved.

    | 14 https://martinfowler.com/articles/microservices.html
  8. Copyright © 2018, Oracle and/or its affiliates. All rights reserved.

    | 17 ACID Atomicity Consistency Isolation Durability
  9. Copyright © 2018, Oracle and/or its affiliates. All rights reserved.

    | 18 ACID Atomicity Consistency Isolation Durability Microservices
  10. Copyright © 2018, Oracle and/or its affiliates. All rights reserved.

    | 19 PRODUCT SERVICE DATABASE CART SERVICE DATABASE Transação
  11. Copyright © 2018, Oracle and/or its affiliates. All rights reserved.

    | 21 https://www.cs.cornell.edu/andru/cs711/2002fa/reading/sagas.pdf
  12. Copyright © 2018, Oracle and/or its affiliates. All rights reserved.

    | 22 T1 T2 T3 T4 C1 C2 C3 Transações de Compensação
  13. Copyright © 2018, Oracle and/or its affiliates. All rights reserved.

    | E aí, Tom… vamos orquestrar tudo na mão?
  14. Copyright © 2018, Oracle and/or its affiliates. All rights reserved.

    | Demo FLIGHT PROVIDER book cancel HOTEL PROVIDER book cancel CAR RENTAL PROVIDER book cancel EMAIL PROVIDER send Flight booking fn Flight cancellation fn Hotel booking fn Hotel cancellation fn Car booking fn Car cancellation fn Email sending fn Trip booking fn