Lab 15: Capstone — Order Platform

Objective

Combine all 14 Practitioner labs into a complete, concurrent order platform: sealed domain hierarchy, concurrent inventory with CAS, event bus, enum-driven state machine, pricing strategies, concurrent CompletableFuture pipelines, and a full test suite.

Background

Real production systems synthesise all the patterns you've learned. This capstone builds the innozverse-platform: an order processing system with typed domain models, thread-safe inventory, event-driven architecture, pluggable pricing, and async order processing — validated end-to-end with assertions.

Time

45 minutes

Prerequisites

  • Practitioner Labs 01–14

Tools

  • Docker: zchencow/innozverse-java:latest


Lab Instructions

Step 1: Domain Layer — Records, Sealed, Enums

📸 Verified Output:


What You Built

A complete innoZverse Order Platform combining all 14 Practitioner labs:

Component
Lab
Pattern

Domain records

07

Product, Order — immutable, validated

Sealed event hierarchy

07

Event — exhaustive pattern dispatch

Enum state machine

14

OrderStatus — abstract methods per constant

Pricing strategy

08/14

PricingTier enum with forSpend() factory

Thread-safe inventory

05

ConcurrentHashMap + synchronized

Event bus

08

Observer pattern with generic Consumer<T>

Async order processing

05

CompletableFuture.supplyAsync + allOf

Audit trail

08

Observer collecting to ArrayList<String>

Analytics

02

Collectors.groupingBy + stream aggregation

Test assertions

09

Custom check() pattern

Further Reading

Last updated