harder over time Big/Growing monoliths can lead to the following problems: • Development velocity (hard to change, merge conflicts, …) • Operational complexity (scaling, bottleneck, …) • Code complexity (separation of concerns, …)
parts • 2 possible dimensions: • Vertically: (Abstraction) Layers • Horizontally: Services • Layers/services either logical or infrastructure • Some layers can be auto-generated
on which service clients will be generated • Components: • Wire protocol (HTTP, gRPC) • Serialization format, IDL & type system (Protobuf, Thrift, Msgpack, …) • Framework & tooling (e.g. codegen) • Options: • RPC frameworks: gRPC, Thrift, … • Manual: REST / JSON over HTTP Service A Service B Generated Client for Service A Server for Service A (exposes schema) Serialized Data
programming language(s) 3. CLI scaffolds server code and generates client libraries Example: Generates gRPC client in Go based on Protobuf schema protoc -I helloworld/ helloworld/helloworld.proto --go_out=plugins=grpc:helloworld
Single handler function Very efficient / performant Supports streaming Static API (no queries) Requires explicit field ordering GraphQL: Flexible & powerful • Server: resolvers functions Flexible queries Supports schema delegation Bigger ecosystem Still early outside of JS/Node
based on schema merging • Microservices contain business logic + each MS has its own database Pros: Rigid boundaries & scalable Cons: Infrastructure overhead