HomeChallengesRepsProblemsLeaderboardTake a challenge

Splitting the Monolith

Ordering and Billing become separate services. The interesting question is not how to host two things — it is what they are allowed to know about each other.

Advanced25 min on the clock5 graded checks · 100 pointsLayered Architecture and Modular SystemsPro
Graded by reading your code against the checklist below.

What you build

  • The event contract in its own shared package, referenced by both
  • Each service with its own host module and its own database
  • Publish the event rather than calling the other service
  • Handle it on the other side, safely enough to be retried
  • Gateway routes so the client sees one API

Done means

Neither service references the other; both reference the shared contracts package.

How it is graded

Published in full, before you start — every point is one of these and there is nothing else.

  1. The event contract is in a shared package+20What services may know
  2. Ordering publishes rather than calling+25What services may know
  3. Billing handles it, safely enough to be retried+25What services may know
  4. Each service owns its own database+15What services may know
  5. A gateway gives the client one address+15What services may know

What it teaches

The rest of Layered Architecture and Modular Systems