Lecture 01. Microservices, HTTP APIs and Docker
Week 1 · Syllabus and preparation from the course outline; no study date or personal lecture notes have been recorded.
Business scenario
A new food-delivery service needs order creation and a restaurant catalogue without a single monolithic application.
Topics to cover in this class
- Distributed system vs distributed application; independent process boundaries and service ownership
- REST endpoints, HTTP status codes, JSON contracts, validation and request IDs
- Concurrency, HTTP client deadlines, unavailable dependencies and bounded retries
- Docker images vs containers, Dockerfiles, ports, networks, logs and multi-stage builds
- Introduction to service-specific persistence and the cumulative Git repository
Learning objectives
- Explain why a remote service call can fail independently of the caller.
- Build and containerize two communicating services.
- Identify a retry-safe and retry-unsafe operation.
Live demonstration checklist
- Run Order and Restaurant endpoints independently; show a REST call crossing a process boundary.
- Build two images, run containers, inspect logs and stop one dependency.
Preparation and optional written reflection (ungraded)
Reading focus: MIT 6.5840 introductory schedule material or Tanenbaum: discuss why a network call differs from a local function call. Optional individual reflection: In 150-250 words, explain two failure modes introduced when Order calls Restaurant across a network.
Study materials: official docs, websites and YouTube
Official | Go HTTP package | https://pkg.go.dev/net/http HTTP handlers, request handling and client deadlines
Official | Docker getting started | https://docs.docker.com/get-started/ Images, containers and core CLI
Official | Dockerfile build best practices | https://docs.docker.com/build/building/best-practices/ Efficient reproducible images
Website | TechWorld with Nana Docker guides | https://www.techworld-with-nana.com/guides Beginner-friendly explanatory articles
YouTube | Learn Docker in 1 Hour (JavaScript Mastery) | https://www.youtube.com/watch?v=GFgJkfScVNU Images, Dockerfile, commands, Compose introduction