Traditional Setup - (Early 2000s) We used to configure desktop apps that directly connect to application’s database. Desktop Desktop Desktop Desktop Desktop
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
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
N-Tier Setup - Scaling N-tier makes scaling software layers much more easier Tablets Load balancer Mobile Clients Web Clients Database Layer Desktop Clients
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
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
N-Tier – Use Cases Small & Medium Business Projects that require multiple platforms Projects that require decent amount of data security Cloud-based Projects
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
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