Në një sistem, komponentët (shërbimet, klientët) komunikojnë përmes APIs dhe protokolleve të ndryshme — sinkrona (REST, gRPC) dhe asinkrona (mesazhe/radhë). Të kuptuar se si komunikojnë komponentët është thelbësor për dizajnimin e sistemeve të bëra nga shumë pjesë.
Komunikimi sinkron (kërkesë/përgjigje)
The caller WAITS for a response (blocking):
REST (HTTP) → most common; resources over HTTP (JSON) → simple, ubiquitous, web-friendly
gRPC → high-performance RPC (binary, HTTP/2) → fast, typed; good for internal services
GraphQL → flexible queries (client requests exactly what it needs)
→ for: direct request/response where the caller needs an answer now
