blob: ee9241d53556f1685532435b7c655350658bc8e2 [file] [log] [blame]
= Shopping Cart example architecture
include::ROOT:partial$include.adoc[]
This tutorial shows how to build the functionality for a Shopping Cart system. When complete, end users will be able to add items to a cart and checkout, creating an order. As shown in the following illustration, the system includes three services that use xref:concepts:akka-grpc.adoc[Akka gRPC] and Kafka as transport mechanisms: Cart, Order, and Analytics.
image::example-overview.svg[Example overview]
Each user's cart is represented by a Cart Entity. Cart state is persisted using xref:concepts:event-sourcing.adoc[Event Sourcing]: When a user updates their cart, the Entity persists events in an _Event Journal_ database. Using xref:concepts:cqrs.adoc[Command Query Responsibility Segregation] (CQRS), which separates read and write responsibility, {akka-projection}/[Akka Projections {tab-icon}, window="tab"] provide the data necessary for the Order and Analytics services.
The `PopularityProjection` uses the events from all shopping carts to store a representation in the database to answer queries of how popular the items are.
Follow the steps in the tutorial to build functionality a bit at a time and try running it as you go.