a distributed enterprise system · 2022 · university project
Distributed Enterprise System
A university project where I built a system the enterprise way: several services, each owning its own data, talking over REST. Most of what I know about the boundaries between services I learned by getting them wrong here first.
- Layers
- application, services, data
- Built with
- SOA · Microservices · Service Architecture · Enterprise Patterns
- Elsewhere
- source on GitHub
- 1API gateway · auth, rate limit, routing with retry
- 2Service · controller, service and repository layers
- 3Store · one database per service, nothing shared
- 4REST · JSON over HTTP, versioned paths
- 5Service-to-service call · account asks person who owns what
- 6Timeout and retries · fail fast, log with the request id
The problem
A university course on enterprise systems, with a deliberately uncomfortable brief: build a system the way large organisations do, as several independent services that have to cooperate without sharing a database.
What I built
A set of microservices2, each owning one business domain and its own data store3, talking to each other over RESTful APIs4 behind a gateway1. I applied the patterns the course was about, Repository, Service Layer and DTOs, and spent most of the effort on the boundaries: how a service asks another for something it does not own5, what happens when that call fails6, and how to log across services so that a problem can be traced from end to end.
What I learned
Most of what I know about the boundaries between services I learned by getting them wrong here first. Splitting a system is easy; deciding what each piece owns is the real design work. Those lessons carried straight over to the cloud side of the IoT work later, where machines and services talk over unreliable networks.