Knowledge / Information Technology / API integration and middleware

API integration and middleware

Information Technology (B.E./B.Tech) · Web and enterprise · free study notes for exams, placements and interviews

In short

API integration is the work of making separate software systems — an ERP, a payment gateway, a CRM, a bank's core, a mobile app — exchange data reliably and securely; middleware is the layer of software that sits between them and does the connecting, routing, translating, queueing and securing. The subject matters because almost no Indian enterprise runs on one system: a retailer's order has to touch an e-commerce front end, a payment aggregator, a warehouse system, GST e-invoicing and a CRM within seconds. It is examined in university papers on enterprise computing, SOA and distributed systems, and in GATE-style questions on RPC, messaging and distributed transactions. In placements it is the core of every integration, backend and platform-engineering interview at TCS, Infosys, Wipro, Accenture, Cognizant, LTIMindtree, Razorpay, PhonePe, Zoho, Freshworks and every bank's technology arm.

Explained

What middleware is, and its families

Integration styles and architectures

API styles, contracts and data formats

Messaging middleware, delivery guarantees and transactions

API gateways, management and security

Resilience, performance and observability

Indian platforms, standards and compliance

Key points

Formulas and examples

Interfaces in point-to-point integration: I = n(n−1)/2 (n = number of systems)
Little's Law: L = λ × W — L = average concurrent in-flight requests, λ = arrival rate (req/s), W = average response time (s)
Throughput capacity: λ_max = (threads × utilisation) / W
Series (chained) availability: A_total = A₁ × A₂ × … × Aₙ ; Parallel/redundant: A = 1 − (1 − A)k
Downtime per month = (1 − A) × 43,200 min (30-day month)
M/M/1 queue: ρ = λ/μ ; W = 1/(μ − λ) ; W_q = ρ/(μ − λ) ; L_q = ρ²/(1 − ρ) — μ = service rate (msg/s)
Consumers needed = λ / (per-consumer rate × target utilisation)
Retry load amplification = 1 + r (r = maximum retries, worst case all failing)
Effective latency with cache = h × T_cache + (1 − h) × T_backend (h = hit ratio)
Bandwidth (Mbps) = req/s × payload bytes × 8 ÷ 10⁶

1. Spaghetti versus hub. A manufacturer has 9 systems (SAP ERP, CRM, WMS, MES, HRMS, e-commerce, bank, GST portal, BI).

2. Chained availability and the case for redundancy. A customer request passes gateway (99.95%), auth service (99.9%), core service (99.9%) and database (99.95%).

3. Little's Law sizing of an API gateway. Traffic 1,200 req/s, average response 150 ms.

4. Queue capacity and a consumer count. Orders arrive at λ = 500 msg/s; one consumer processes μ = 40 msg/s.

5. Caching and rate limiting. Backend latency 120 ms, gateway cache 5 ms, hit ratio 70%.

AspectSOAPRESTGraphQLgRPCMessaging (queue/topic)
ContractWSDL (strict)OpenAPI (optional)SDL schema.proto (strict)Schema registry / document
PayloadXMLJSONJSONProtobuf (binary)Any (JSON/Avro/Protobuf)
Coupling in timeSynchronousSynchronousSynchronousSync + streamingAsynchronous
Built-in securityWS-SecurityTLS + OAuth/JWTTLS + OAuth/JWTmTLS + tokensBroker ACLs + TLS
Typical useBanking, insurance back endsPublic/partner APIsMobile and web BFFInternal microservicesOrder, event and audit flows
CachingPoorStrong (HTTP)WeakLimitedNot applicable
Failure handlingMechanismWhen to use
Transient network errorRetry with exponential backoff + jitterIdempotent or key-protected calls
Repeated downstream failureCircuit breakerProtect a struggling dependency
Slow dependencyTimeout + bulkheadPrevent thread-pool exhaustion
Poison messageDead-letter queue + alertNon-retryable payload errors
Partial multi-step failureSaga with compensationsCross-service business transactions
Duplicate deliveryIdempotency key / idempotent receiverPayments, order creation, webhooks

Where it is used

Interview questions

Common mistakes

Related topics

REST APIs · Server-side web development · Back-end development with Node.js · Enterprise systems: ERP and CRM · E-commerce systems · Distributed systems and microservices

Open in the Knowledge reader →Find jobs →