Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Traditional, N-Tier & Microservices

Allan Chua
February 18, 2022

Traditional, N-Tier & Microservices

A simple way of looking into pros and cons of traditional, N-tier and microservice architectures.

Allan Chua

February 18, 2022

More Decks by Allan Chua

Other Decks in Technology


  1. Traditional Setup - (Early 2000s) We used to configure desktop

    apps that directly connect to application’s database. Desktop Desktop Desktop Desktop Desktop
  2. Traditional Setup - Advantages Simple to build Lower skill barrier

    Less components to manage Less manpower cost
  3. Traditional Setup - Disadvantages Data management code is not re-usable

    Higher number of vulnerability points Requires complete rebuild during upgrades / migrations Lower compatibility with different operating systems Outdated client versions Bad use of database connections Heavyweight Client Applications
  4. 5-Tier Setup (2010s) To solve the problem of traditional apps,

    we can introduce a middle layer that’s in-charge of data. Industry calls this component “API” Tablets Desktop Clients Mobile Clients Web Clients Database Layer
  5. N-Tier Setup - Scaling N-tier makes scaling software layers much

    more easier Tablets Load balancer Mobile Clients Web Clients Database Layer Desktop Clients
  6. APIs Deep Dive Promotes centralized data management code Could be

    shared by multiple clients through HTTP Controlled environment due to residence in server environment More efficient usage of database connections Application Programming Interface Improved security of database server Rebuilding GUI clients is now a separate business from API upgrades Updates are decoupled to client applications
  7. N-Tier – Disadvantages APIs can easily bloat with logic and

    long running tasks Can often run in trouble especially with long running queries Single point of failure Could fall victim to inefficient scaling of resources
  8. N-Tier – Use Cases Small & Medium Business Projects that

    require multiple platforms Projects that require decent amount of data security Cloud-based Projects
  9. Microservices (2014s) We focus on building small & focused services.

    Staff APIs Invoices APIs Products Clients Clients Clients Email Service PDF Generator Service Payment Reconciliation Analytics Management CRON Triggers Notification Generators
  10. Microservices – Deep Dive Small Services Focused on a narrow

    domain of the software Composed by loosely coupled services
  11. Microservices - Advantages Smaller Deployments Lower Blasts Radius Easier to

    Understand Services Re-usability of Pieces Choose tech that fits use-case
  12. Microservices - Disadvantages More expensive to run in the cloud

    Could go wild if unmanaged Integrations are harder to tests Slower to deploy if not automated Tech adversity has its challenges
  13. Microservices - Compromises CI/CD is encourage Use a common programming

    language for MOST services Communication & Teamwork is a MUST