Procesy rozproszone

Proces taki jak złożenie zamówienia dotyka kilku usług: magazynu, płatności, wysyłki. Żadna transakcja bazodanowa nie obejmie ich wszystkich, więc każdy krok zatwierdza się osobno. Zrozumiesz, jak koordynować takie procesy za pomocą zdarzeń, co zrobić, gdy któryś krok się nie uda, i jak zachować poprawność, gdy wiadomości są ponawiane albo przychodzą w złej kolejności.

Dwa pierwsze artykuły wyjaśniają sagę, process managera i choreografię i pokazują je w kodzie, łącznie z wycofaniem kroku, który się nie powiódł. Trzy kolejne pokazują, jak działa przetwarzanie wiadomości pod spodem: jak procesor pamięta, gdzie skończył, i jak rozłożyć pracę, gdy masz wielu klientów (tenantów). Dwa następne dotyczą zdarzeń przychodzących w nieoczekiwanej kolejności. Ostatnie dwa są o modelowaniu workflow: za pomocą typów w TypeScripcie i jako projekt silnika workflow.

Zacznij od dwóch pierwszych. Resztę czytaj, gdy dany problem się pojawi.

  1. Saga and Process Manager - distributed processes in practice

    2021-02-10What can go wrong with distributed systems? Everything! I like to compare distributed systems to Rocky Balboa fighting the last round with Apollo Creed. He is staggering…
  2. Event-driven distributed processes by example

    2022-07-13Some time ago, I wrote the general rules on processing the event-driven services. check my article Saga and Process Manager - distributed processes in practice. It…
  3. Consumers, projectors, reactors and all that messaging jazz in Emmett

    2025-12-01Did you know that you can build an event store in one hour? I even did it a few times on the conference stage. Actually, it took me usually around 25 minutes; the rest…
  4. Checkpointing the message processing

    2025-12-08Let’s start by asking you two questions. What Super Frog has to do with messaging? When was the last time you wrote if statements in SQL? If it’s been a long time, have…
  5. Multi-tenancy and dynamic messaging workload distribution

    2025-12-15There are several reasons why I’m blogging. The first one is that I forget, and writing helps me to remember and organise my findings. The other is that I like to share…
  6. Dealing with Race Conditions in Event-Driven Architecture with Read Models

    2025-10-20My events came out of order! What should I do?! Are you familiar with the term “phantom record” and its benefits? No? Let me explain it to you today. Everyone has a plan…
  7. Handling Events Coming in an Unknown Order

    2025-11-03After the last article on Dealing with Race Conditions in Event-Driven Architecture with Read Models, I got such a question from Ben: You described the scenario where you…
  8. How TypeScript can help in modelling business workflows

    2024-01-28TypeScript is an intriguing language. Some say that its type system, by itself, is Turing Complete. Some take it to the extreme and even implement Flappy Bird in…
  9. Workflow Engine design proposal, tell me your thoughts

    2025-07-28Welcome to the new week! As you may know, I’m building Emmett - a library/framework aiming to make building business-focused apps smoother with an event-driven approach…