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
| Level | What is shared | Technique | Example |
|---|---|---|---|
| Data level | Databases / files | Shared DB, ETL, replication, file export/import | Nightly sync of orders into accounting DB |
| Application / function level | Functionality via interfaces | APIs, RPC, web services, message queues | Web shop calls ERP's "check stock" service |
| Process (business-process) level | Whole workflows across systems | Workflow engines, BPEL, orchestration | Loan application flows through credit check → approval → disbursement |
| Presentation level | User interfaces combined | Portals, portlets, mashups, iframes, screen-scraping | University portal showing LMS, fee and exam widgets on one page |
3. Integration Topologies
| Topology | Idea | Pros | Cons |
|---|---|---|---|
| Point-to-point | Each system connects directly to each other system it needs | Simple for 2–3 systems | n(n−1)/2 links → "spaghetti"; brittle |
| Hub-and-spoke | A central broker translates and routes messages | n links only; central management | Hub is a bottleneck / single point of failure |
| Enterprise Service Bus (ESB) | Distributed bus with adapters, routing, transformation | Scalable, standards-based (SOA) | Heavyweight, costly |
| API gateway / microservices | Lightweight REST APIs behind a gateway | Agile, cloud-friendly | Many 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
| Point | Synchronous (request-response) | Asynchronous (messaging) |
|---|---|---|
| Caller | Waits for reply | Continues; reply/event later |
| Coupling | Tight — both must be available | Loose — queue buffers messages |
| Use | Payment authorization, stock check | Sending 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).