CSS Prepare

optional · CSS study notes

10. Integration Architecture

CSS Optional — Paper-II, Section-B · P-II.VI.10 · How a web application connects to existing and external systems. One of Kappel's three architecture categories.

1. Why Integration?

Web applications rarely stand alone: they must use legacy systems (old databases, mainframes), enterprise systems (ERP, CRM, HR), and external services (payment gateways, SMS, maps, identity verification). Enterprise Application Integration (EAI) is the discipline of making these heterogeneous systems work together.

Pakistan examples: a bank's web portal integrating with its core banking system, NADRA CNIC verification and the Raast instant-payment system; e-commerce sites integrating courier tracking and mobile-wallet payments.

2. Levels of Integration

LevelWhat is sharedTechniqueExample
Data levelDatabases / filesShared DB, ETL, replication, file export/importNightly sync of orders into accounting DB
Application / function levelFunctionality via interfacesAPIs, RPC, web services, message queuesWeb shop calls ERP's "check stock" service
Process (business-process) levelWhole workflows across systemsWorkflow engines, BPEL, orchestrationLoan application flows through credit check → approval → disbursement
Presentation levelUser interfaces combinedPortals, portlets, mashups, iframes, screen-scrapingUniversity portal showing LMS, fee and exam widgets on one page

3. Integration Topologies

TopologyIdeaProsCons
Point-to-pointEach system connects directly to each other system it needsSimple for 2–3 systemsn(n−1)/2 links → "spaghetti"; brittle
Hub-and-spokeA central broker translates and routes messagesn links only; central managementHub is a bottleneck / single point of failure
Enterprise Service Bus (ESB)Distributed bus with adapters, routing, transformationScalable, standards-based (SOA)Heavyweight, costly
API gateway / microservicesLightweight REST APIs behind a gatewayAgile, cloud-friendlyMany services to govern

Numerical: 10 systems fully connected point-to-point need 10 × 9 / 2 = 45 interfaces; with a hub or bus, only 10 adapters.

4. Middleware and Technologies

  • RPC / RMI: call a remote procedure as if local (synchronous).
  • Object Request Brokers: CORBA, DCOM, Java RMI — distributed objects.
  • Message-Oriented Middleware (MOM): asynchronous queues/topics (RabbitMQ, Kafka, IBM MQ) — systems need not be online simultaneously; decoupling and reliability.
  • Transaction monitors: coordinate distributed transactions (two-phase commit).
  • Web services (SOAP): XML messages; WSDL describes the service; UDDI registry for discovery; WS-Security.
  • REST APIs: resources over HTTP with JSON — today's default.
  • Adapters / wrappers: expose legacy systems through modern interfaces.
  • ETL: extract-transform-load for data-level integration.

5. Synchronous vs Asynchronous Integration

PointSynchronous (request-response)Asynchronous (messaging)
CallerWaits for replyContinues; reply/event later
CouplingTight — both must be availableLoose — queue buffers messages
UsePayment authorization, stock checkSending emails, generating reports, order processing

6. Integration Challenges

Heterogeneous data formats and semantics (e.g. "customer" means different things), security and trust across systems, performance/latency, error handling and transactions across systems, versioning of interfaces, legacy systems with no APIs.


🎯 CSS Exam Angle

Define EAI → four integration levels table → topologies with the n(n−1)/2 numerical → middleware list → one Pakistan example. This structure fits any integration question.

⚠️ MCQ Traps

  • Point-to-point integration scales as n(n−1)/2, hub/bus as n.
  • WSDL describes a SOAP service; UDDI is a registry; SOAP messages are XML.
  • MOM is asynchronous; RPC is synchronous.
  • Portals integrate at the presentation level.

✅ Self-Check (with Answers)

Q1. What is Enterprise Application Integration?

Ans: The use of middleware, services and standards to make separate enterprise systems (legacy, ERP, CRM, web apps, partners) share data and functionality as a coordinated whole.

Q2. How many interfaces are needed to connect 6 systems point-to-point, and with an ESB?

Ans: Point-to-point: 6 × 5 / 2 = 15. ESB: 6 adapters.

Q3. Why would an e-commerce site send order-confirmation emails asynchronously?

Ans: The customer shouldn't wait for the mail server; a message queue decouples the systems, retries on failure and keeps checkout fast even if the email service is slow or down.

Q4. Give an example of presentation-level integration.

Ans: A university portal combining LMS assignments, fee status and exam results from different systems into widgets on one dashboard (portal/portlets or mashup).

Q5. How can a legacy system with no API be integrated with a new web app?

Ans: Wrap it with an adapter/wrapper service that translates modern API calls into the legacy system's interface (or use data-level integration via ETL, or screen-scraping as a last resort).