Skip to content

2.8c Architecture

2.8b Back-End | Home | Next: 2.8d Infrastructure


  • API architecture:
  • Standards: REST (resource-oriented, stateless, leveraging HTTP method semantics), SOAP (protocol-oriented, XML messages, strong type contracts).
  • Security: rate limiting to block bots, CAPTCHAs against automated attacks, OAuth 2.0 / API Key authentication.
  • Resiliency: Circuit Breaker pattern—when a third-party service fails, temporarily trip the circuit and fail fast rather than waiting, preventing cascading failures.
  • Externalized Configuration: Separate configuration (database connection strings, feature flags, etc.) from code into environment variables or a configuration center so the same build artifact can be deployed to different environments.
  • Everything as Code: Apply the idea of Infrastructure as Code (Terraform, Ansible, Docker, K8s) and Configuration as Code to everything else—documentation (Markdown + CI checks for spelling and broken links), training content (Git-managed, CI/CD deployment). Benefits: single source of truth, peer review, version history, CI/CD automation, breaking down silos.
  • Monolith vs. Microservices:
  • Monolith: Simple to deploy and debug, but large monoliths become tightly coupled and hard to scale.
  • Microservices: Independent deployment, independent scaling, freedom of technology stack, but introduces distributed system complexity (network latency, data consistency, service discovery).
  • Domain-Driven Design (DDD): Model around the business domain, focusing on Bounded Contexts, Aggregates, Entities, Value Objects, and Domain Events.
  • Hexagonal Architecture (Ports & Adapters): Isolate core business logic from external dependencies (databases, UI, third-party APIs) via ports (interfaces) and adapters (implementations).
  • Data modeling: The process of creating a data model for an information system by applying formal techniques. Three levels:
  • Conceptual model: Technology-independent business data description, discussed with stakeholders.
  • Logical model: Translated into implementable table/column/class structures.
  • Physical model: Accounts for partitions, indexes, storage, and performance details. Data models are progressive; a data model should be considered a living document. Common notations include entity-relationship diagrams (ERD), UML class diagrams, and IDEF1X.
  • Service Mesh: A dedicated infrastructure layer for microservice communication, handling traffic management, load balancing, service discovery, retries/timeouts, and observability—keeping business code unaware of the network layer.
  • Relevant internet protocols: HTTP/HTTPS (application layer), TCP/UDP (transport layer), LDAP (directory services), SSH (secure remote access), SMTP (email).

Sources

  • Romen Rodriguez-Gil — Everything 'As-code': https://www.romenrg.com/blog/2019/12/31/everything-as-code/
  • Wikipedia — Data modeling: https://en.wikipedia.org/wiki/Data_modeling

2.8b Back-End | Home | Next: 2.8d Infrastructure