SOA (Service-Oriented Architecture) اور microservices دونوں سسٹمز کو services میں تقسیم کرتے ہیں، لیکن یہ granularity، data ownership، اور services کی communication میں مختلف ہیں۔
SOA (Service-Oriented Architecture) اور microservices دونوں سسٹمز کو services میں تقسیم کرتے ہیں، لیکن یہ granularity، data ownership، اور services کی communication میں مختلف ہیں۔
| پہلو | SOA | Microservices |
|---|
| Granularity | Coarse-grained | Fine-grained |
| Communication | اکثر ESB کے ذریعے | Lightweight (REST/gRPC/messaging) |
| Data | اکثر مشترک | Database per service |
| Governance | مرکزی | غیر مرکزی |
| Protocol | اکثر SOAP/XML | عام طور پر HTTP/JSON، gRPC |
SOA ─▶ Service A ─▶ [ Enterprise Service Bus ] ─▶ Service B
(smart pipes, central orchestration, shared schemas)
Microservices ─▶ Service A ──(direct REST/gRPC/event)──▶ Service B
("smart endpoints, dumb pipes" — logic lives in services)
Microservices "smart endpoints, dumb pipes" کے اصول پر عمل کرتے ہیں: intelligence services میں رہتی ہے، اور transport سادہ رہتا ہے۔ SOA اکثر ESB میں منطق کو مرکزی بناتا ہے۔
ESB سے ملتی جلتی bottleneck دوبارہ متعارف نہ کرائیں۔ ایک بھاری مرکزی bus microservices کو SOA میں اضافی قدموں کے ساتھ تبدیل کر دیتا ہے۔
فرق بنیادی طور پر decentralization کے بارے میں ہے: microservices ہر service میں data ownership اور logic کو دھکیل دیتے ہیں تاکہ مرکزی bottleneck سے بچا جا سکے جس نے بہت سی SOA deployments کو متاثر کیا۔
یہ سمجھنا آپ کو SOA کی coupling کو accidentally microservices کے نام سے دوبارہ بنانے سے روکتا ہے۔