Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
F

flowing-retail

> 编程语言
Open source

Sample application demonstrating an order fulfillment system decomposed into multiple independant components (e.g. microservices). Showing concrete implementati

1.3K stars0 likes1 views
WebsiteGitHub

About

Sample application demonstrating an order fulfillment system decomposed into multiple independant components (e.g. microservices). Showing concrete implementati

Flowing Retail

This sample application demonstrates a simple order fulfillment system, decomposed into multiple independent components (like microservices).

The repository contains code for multiple implementation alternatives to allow a broad audience to understand the code and to compare alternatives. The table below lists these alternatives.

The example respects learnings from Domain Driven Design (DDD), Event Driven Architecture (EDA) and Microservices (µS) and is designed to give you hands-on access to these topics.

Note: The code was written in order to be explained. Hence, I favored simplified code or copy & paste over production-ready code with generic solutions. Don't consider the coding style best practice! It is purpose-written to be easily explainable code.

You can find more information on the concepts in the Practical Process Automation book with O'Reilly.

Flowing retail simulates a very easy order fulfillment system:

Architecture and implementation alternatives

The most fundamental choice is to select the communication mechanism:

  • Apache Kafka as event bus (could be easily changed to messaging, e.g. RabbitMQ):
  • REST communication between Services.
    • This example also shows how to do stateful resilience patterns like stateful retries leveraging a workflow engine.
  • Zeebe broker doing work distribution.

After the communication mechanism, the next choice is the workflow engine:

  • Camunda 8 (aka Zeebe)

and the programming language:

  • Java

Storyline

Flowing retail simulates a very easy order fulfillment system. The business logic is separated into the services shown above (shown as a context map).

Long running services and orchestration

Some services are long running in nature - for example: the payment service asks customers to update expired credit cards. A workflow engine is used to persist and control these long running interactions.

Workflows live within service boundaries

Note that the state machine (or workflow engine in this case) is a library used within one service. If different services need a workflow engine they can run whatever engine they want. This way it is an autonomous team decision if they want to use a framework, and which one:

Links and background reading

  • Practical Process Automation book
  • Introduction blog post: https://blog.bernd-ruecker.com/flowing-retail-demonstrating-aspects-of-microservices-events-and-their-flow-with-concrete-source-7f3abdd40e53
  • InfoQ-Writeup "Events, Flows and Long-Running Services: A Modern Approach to Workflow Automation": https://www.infoq.com/articles/events-workflow-automation

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Java

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言