Software Engineering
REST API
An architectural style for networked applications where clients communicate with servers over HTTP using standard methods.
- GET: retrieve a resource
- POST: create a resource
- PUT / PATCH: update a resource
- DELETE: remove a resource
- Stateless — each request contains all needed information
- Resources identified by URLs; responses typically JSON
API Gateway
A server that acts as the single entry point for client requests, routing them to appropriate backend services and handling cross-cutting concerns.
- Responsibilities: authentication, rate limiting, logging, request routing
- Examples: Kong, AWS API Gateway, NGINX, custom FastAPI gateway
- Decouples clients from internal service topology
Authentication vs. Authorization
Two related but distinct security concepts:
- Authentication (authn): verifying who the caller is (e.g., API key, JWT, OAuth)
- Authorization (authz): verifying what the caller is allowed to do (e.g., admin vs. read-only)
You must authenticate before you can be authorized.
Containerization (Docker)
Packaging an application and its dependencies into a portable, isolated unit called a container.
- Containers share the host OS kernel (lighter than VMs)
Dockerfile: recipe for building an imagedocker-compose: define and run multi-container applications- Ensures consistent environments from development to production
CI/CD (Continuous Integration / Continuous Delivery)
Practices that automate building, testing, and deploying software.
- CI: every code change is automatically built and tested
- CD: validated changes are automatically deployed to staging or production
- Common tools: GitHub Actions, GitLab CI, Jenkins
- Reduces integration risk and speeds up delivery cycles
ORM (Object-Relational Mapper)
A library that maps between database tables and language objects, letting developers query the database using code instead of raw SQL.
- Examples: SQLAlchemy (Python), Prisma (TypeScript), Django ORM
- Handles query building, type mapping, and connection management
- Trade-off: convenience vs. control over generated SQL
Dependency Injection
A design pattern where a component receives its dependencies from the outside rather than creating them internally.
- Decouples components for easier testing and replacement
- Enables mock objects in unit tests
- Common in frameworks: FastAPI (
Depends), Angular, Spring
SQLite
A lightweight, serverless, file-based relational database.
- No separate server process — the database is a single
.dbfile - Suitable for local apps, prototypes, and low-concurrency services
- Used in the Ollama Gateway for API key and usage tracking
- Not suitable for high-concurrency production write workloads