Skip to content
CS-701 · Software Architectures/Quick Revision Short Notes

Software Architectures (CS-701) - Unit 3 Short Notes

How unit 3 is examined

This unit covers the languages, frameworks and middleware used to describe and build architectures; ADLs, RMI and CORBA carry the most marks, then UML, Node JS and J2EE.

Software Architecture Description Languages (ADLs)

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">High weight</span>

Definition. <mark>An Architecture Description Language (ADL) is a formal language with precise syntax and semantics for specifying a software architecture in terms of its components, connectors and configurations.</mark>

Key points.

  1. An ADL replaces vague box-and-line drawings with a formal notation, so the architecture is unambiguous and can be checked by tools.
  2. A component is a unit of computation or data store, and it has interfaces (ports) that define how it talks to the outside.
  3. A connector is an interaction element such as a pipe, procedure call, event or RPC, and it has roles that attach to component ports.
  4. A configuration is the topology that says which component ports are attached to which connector roles, so it describes the whole system structure.
  5. An ADL has formal semantics, so it supports analysis such as deadlock, consistency, performance and type checking before any code exists.
  6. ADLs support reuse, because components, connectors and styles are defined once and instantiated many times.
  7. Many ADLs support refinement and code generation, so an abstract architecture is refined step by step toward an implementation.
  8. Examples are Wright (CSP-based, protocol and deadlock checking of connectors), ACME (a common interchange language between ADL tools), UniCon (component-connector view with code generation) and Darwin, Rapide, xADL.

Example. In Wright a client-server system has components Client and Server and a connector RPC with roles caller and callee; the configuration attaches Client.request to caller and Server.serve to callee, and the tool checks that the protocol cannot deadlock.

Answer frame. Open with the definition; list the three building blocks (component, connector, configuration) as the features; then analysis, reuse, code generation; close with Wright, ACME and UniCon as examples.

Pitfall: An ADL is not UML; it has formal semantics, which is why it can be analysed.

Asked: [14 marks] (Dec 2020, Nov 2022, Nov 2023, Jun 2025) What is an Architecture Description Language? Outline its features; explain the role of ADL with suitable examples.

Struts

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>

Definition. <mark>Apache Struts is an open-source Java web framework that implements the MVC (Model-View-Controller) pattern for building servlet/JSP web applications.</mark>

Key points.

  1. The Controller is a front servlet (ActionServlet in Struts 1, a filter in Struts 2) that receives every request and maps it to an Action using struts-config.xml or struts.xml.
  2. The Model is the business logic and data, held in Action classes and beans that call the back end.
  3. The View is usually JSP pages using Struts tag libraries, chosen by the result the Action returns.
  4. Struts separates presentation from logic, so pages and business code can change independently, and it gives built-in form validation and internationalisation.

Hibernate

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Low weight</span>

Definition. <mark>Hibernate is an open-source Object-Relational Mapping (ORM) framework that maps Java classes to database tables, so the program works with objects instead of writing JDBC and SQL by hand.</mark>

Key points.

  1. The configuration (hibernate.cfg.xml) holds the JDBC URL, user, password and dialect, and it builds a SessionFactory once per application.
  2. Mapping links a class to a table and its fields to columns, using an hbm.xml file or annotations such as @Entity and @Id.
  3. A Session is a short-lived object that performs save, get, update and delete inside a Transaction, and Hibernate generates the SQL.
  4. Flow: application object, Session, Hibernate mapping, JDBC, database, and the result comes back as objects.
  5. Benefits are abstraction from SQL, first- and second-level caching, database portability through dialects, and less boilerplate.
SessionFactory sf = new Configuration().configure().buildSessionFactory();
Session s = sf.openSession();
Transaction t = s.beginTransaction();
s.save(new Student(1, "Asha"));   // INSERT generated by Hibernate
t.commit();
s.close();

Asked: [7 marks] (Jun 2025) Demonstrate how Hibernate can be used for database interaction in a software system.

Node JS

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Medium weight</span>

Definition. <mark>Node.js is an open-source, cross-platform JavaScript runtime built on Google's V8 engine that runs JavaScript on the server using an event-driven, non-blocking I/O model.</mark>

Key points.

  1. Node.js is single-threaded with an event loop, so a slow I/O operation does not block other requests.
  2. It uses one language, JavaScript, on both server and browser, so one team can build the whole stack.
  3. npm gives a huge package ecosystem, and Node suits real-time apps, REST APIs and microservices.
  4. AngularJS is a client-side MVC framework running in the browser, and it gives two-way data binding, directives and single-page apps (SPA).
  5. Together they form a modern stack: Angular renders the SPA and Node serves JSON APIs, so the pages stay fast and the code stays in one language.
Aspect Node.js AngularJS
Nature Server-side runtime Client-side front-end framework
Runs in Server, on V8 Browser
Purpose Back end, APIs, real-time services Dynamic UI and SPAs
Architecture Event-driven, non-blocking MVC with two-way binding
Language JavaScript JavaScript plus HTML templates
Typical use Chat server, REST API Dashboard, single-page app

Answer frame. Open by defining Node.js as runtime and AngularJS as framework; give the table for the comparison question; for the "help build" question add points 1-5 and close with the MEAN-style stack benefit (single language, SPA, data binding, performance).

Asked: [7 marks] (Dec 2024) How is Node JS different from Angular JS? Asked: [7 marks] (Dec 2025) How do Node.js and Angular JS help in building modern web applications?

Angular JS

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>

Definition. <mark>AngularJS is a JavaScript front-end framework from Google that extends HTML with directives and builds single-page applications using the MVC pattern.</mark>

Key points.

  1. Two-way data binding keeps the view and the model in sync automatically.
  2. Directives such as ng-model and ng-repeat add behaviour to HTML, and controllers and services hold the logic.
  3. Dependency injection and routing let a single page swap views without reloading.

J2EE - JSP

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Medium weight</span>

Definition. <mark>J2EE (Java EE) is a multi-tier enterprise platform of standard APIs and containers for building distributed, scalable, secure applications; JSP (JavaServer Pages) is its presentation technology, HTML with embedded Java that is compiled into a servlet.</mark>

Key points.

  1. The client tier is a browser or client application that sends requests.
  2. The web tier runs in the web container and holds JSP for presentation and Servlets as controller logic.
  3. The business tier runs in the EJB container, and EJBs (session, entity, message-driven) hold the business logic and transactions.
  4. The EIS tier is the database or legacy system, reached through JDBC, and JNDI and JMS provide naming and messaging between the tiers.
  5. Containers supply services such as security, transactions and pooling, so developers write only the business code.
  6. JSP is translated to a servlet on first request, so it is compiled once and then served fast.

Diagram. <figure class="ds-fig" style="margin:1.4rem 0;overflow-x:auto"><svg xmlns="http://www.w3.org/2000/svg" id="dsfig-u3-01" viewBox="0 0 467 209" width="467" height="209" role="img" aria-label="J2EE tiers. Br = browser client, Web = web container (JSP and servlets), EJB = EJB container, DB = database (EIS), MQ = JMS queue"><style>#dsfig-u3-01 .e{stroke:#454C5A;stroke-width:1.4;fill:none}#dsfig-u3-01 .e.hi{stroke:#2340B8;stroke-width:2.6}#dsfig-u3-01 .n{fill:#FFFFFF;stroke:#16181D;stroke-width:1.4}#dsfig-u3-01 .n.hi{fill:#E3E9FC;stroke:#2340B8;stroke-width:2.2}#dsfig-u3-01 .n.rb-b{fill:#16181D;stroke:#16181D}#dsfig-u3-01 .n.rb-r{fill:#BD3227;stroke:#BD3227}#dsfig-u3-01 text{font-family:"JetBrains Mono",ui-monospace,Menlo,Consolas,monospace;font-size:13px}#dsfig-u3-01 .t{fill:#16181D;font-weight:500}#dsfig-u3-01 .t.inv{fill:#FFFFFF;font-weight:700}#dsfig-u3-01 .kd{stroke:#16181D;stroke-width:1.2}#dsfig-u3-01 .dot{fill:#16181D}#dsfig-u3-01 .ann{fill:#2340B8;font-size:11px;font-weight:700}#dsfig-u3-01 .lbl{fill:#6F7787;font-family:system-ui,-apple-system,sans-serif;font-size:12px;font-weight:700}#dsfig-u3-01 .ptr{fill:#2340B8;font-size:12px;font-weight:700}#dsfig-u3-01 .ah{fill:#454C5A}#dsfig-u3-01 .ah.hi{fill:#2340B8}#dsfig-u3-01 .wl rect{fill:#FFFFFF;stroke:#DCE0E7}#dsfig-u3-01 .wl .t{font-size:12px;font-weight:700}#dsfig-u3-01 .wl.hi rect{fill:#2340B8;stroke:#2340B8}#dsfig-u3-01 .wl.hi .t{fill:#FFFFFF}html.dark #dsfig-u3-01 .e{stroke:#B1B7C3}html.dark #dsfig-u3-01 .e.hi{stroke:#8FA3FF}html.dark #dsfig-u3-01 .n{fill:#161920;stroke:#E6E8ED}html.dark #dsfig-u3-01 .n.hi{fill:#1E2748;stroke:#8FA3FF}html.dark #dsfig-u3-01 .n.rb-b{fill:#E6E8ED;stroke:#E6E8ED}html.dark #dsfig-u3-01 .n.rb-r{fill:#FF7E71;stroke:#FF7E71}html.dark #dsfig-u3-01 .t{fill:#E6E8ED}html.dark #dsfig-u3-01 .t.inv{fill:#0F1115}html.dark #dsfig-u3-01 .kd{stroke:#E6E8ED}html.dark #dsfig-u3-01 .dot{fill:#E6E8ED}html.dark #dsfig-u3-01 .ann{fill:#8FA3FF}html.dark #dsfig-u3-01 .lbl{fill:#858D9C}html.dark #dsfig-u3-01 .ptr{fill:#8FA3FF}html.dark #dsfig-u3-01 .ah{fill:#B1B7C3}html.dark #dsfig-u3-01 .ah.hi{fill:#8FA3FF}html.dark #dsfig-u3-01 .wl rect{fill:#161920;stroke:#2A2E37}html.dark #dsfig-u3-01 .wl.hi rect{fill:#8FA3FF;stroke:#8FA3FF}html.dark #dsfig-u3-01 .wl.hi .t{fill:#0F1115}</style><defs><marker id="ah8" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah" d="M0,1 L9,5 L0,9 z"/></marker><marker id="ahh8" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah hi" d="M0,1 L9,5 L0,9 z"/></marker></defs><path class="e" d="M59,40 L148,40" marker-end="url(#ah8)"/><path class="e" d="M188,40 L277,40" marker-end="url(#ah8)"/><path class="e" d="M317,40 L406,40" marker-end="url(#ah8)"/><path class="e" d="M298,61 L298,148" marker-end="url(#ah8)" marker-start="url(#ah8)"/><g class="wl"><rect x="84.1" y="31" width="40.8" height="18" rx="9"/><text class="t" x="104.5" y="40" dy=".35em" text-anchor="middle">HTTP</text></g><g class="wl"><rect x="213.1" y="31" width="40.8" height="18" rx="9"/><text class="t" x="233.5" y="40" dy=".35em" text-anchor="middle">call</text></g><g class="wl"><rect x="342.1" y="31" width="40.8" height="18" rx="9"/><text class="t" x="362.5" y="40" dy=".35em" text-anchor="middle">JDBC</text></g><g class="wl"><rect x="281.2" y="95.5" width="33.6" height="18" rx="9"/><text class="t" x="298" y="104.5" dy=".35em" text-anchor="middle">JMS</text></g><circle class="n" cx="40" cy="40" r="18"/><text class="t" x="40" y="40" dy=".35em" text-anchor="middle">Br</text><circle class="n" cx="169" cy="40" r="18"/><text class="t" x="169" y="40" dy=".35em" text-anchor="middle">Web</text><circle class="n" cx="298" cy="40" r="18"/><text class="t" x="298" y="40" dy=".35em" text-anchor="middle">EJB</text><circle class="n" cx="427" cy="40" r="18"/><text class="t" x="427" y="40" dy=".35em" text-anchor="middle">DB</text><circle class="n" cx="298" cy="169" r="18"/><text class="t" x="298" y="169" dy=".35em" text-anchor="middle">MQ</text></svg><figcaption style="font-size:.82em;opacity:.72;margin-top:.45rem">J2EE tiers. Br = browser client, Web = web container (JSP and servlets), EJB = EJB container, DB = database (EIS), MQ = JMS queue</figcaption></figure>

Example. An online shop: the browser posts an order, the servlet validates it, a session bean prices it and updates stock through JDBC, a message-driven bean sends the confirmation, and a JSP renders the reply.

Answer frame. Open by defining J2EE as a multi-tier platform; draw the four-tier diagram; develop client, web (JSP and servlet), business (EJB), EIS in order; close with the online-shop example and containers' services.

Asked: [7 marks] (Dec 2025) Discuss the use of J2EE components like JSP, Servlets and EJBs in enterprise applications. Asked: [7 marks] (Jun 2025) Develop a simple architecture for an enterprise application using J2EE components.

Servlets

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Low weight</span>

Definition. <mark>A servlet is a Java class that runs inside a web container and handles HTTP requests to generate dynamic responses; JSP is a page technology (HTML plus Java tags) that the container translates into a servlet.</mark>

Key points.

  1. init() is called once when the servlet is loaded, and it sets up resources.
  2. service() is called for every request on its own thread, and it dispatches to doGet() or doPost() that write the response.
  3. destroy() is called once before unloading, and it releases resources.
  4. A JSP goes through translation to a servlet, compilation, then the same init, service and destroy cycle.

<figure class="ds-fig" style="margin:1.4rem 0;overflow-x:auto"><svg xmlns="http://www.w3.org/2000/svg" id="dsfig-u3-02" viewBox="0 0 467 80" width="467" height="80" role="img" aria-label="Servlet life cycle. Ld = loaded, In = init() once, Sv = service() runs once per request and returns a response (repeats), De = destroy() once"><style>#dsfig-u3-02 .e{stroke:#454C5A;stroke-width:1.4;fill:none}#dsfig-u3-02 .e.hi{stroke:#2340B8;stroke-width:2.6}#dsfig-u3-02 .n{fill:#FFFFFF;stroke:#16181D;stroke-width:1.4}#dsfig-u3-02 .n.hi{fill:#E3E9FC;stroke:#2340B8;stroke-width:2.2}#dsfig-u3-02 .n.rb-b{fill:#16181D;stroke:#16181D}#dsfig-u3-02 .n.rb-r{fill:#BD3227;stroke:#BD3227}#dsfig-u3-02 text{font-family:"JetBrains Mono",ui-monospace,Menlo,Consolas,monospace;font-size:13px}#dsfig-u3-02 .t{fill:#16181D;font-weight:500}#dsfig-u3-02 .t.inv{fill:#FFFFFF;font-weight:700}#dsfig-u3-02 .kd{stroke:#16181D;stroke-width:1.2}#dsfig-u3-02 .dot{fill:#16181D}#dsfig-u3-02 .ann{fill:#2340B8;font-size:11px;font-weight:700}#dsfig-u3-02 .lbl{fill:#6F7787;font-family:system-ui,-apple-system,sans-serif;font-size:12px;font-weight:700}#dsfig-u3-02 .ptr{fill:#2340B8;font-size:12px;font-weight:700}#dsfig-u3-02 .ah{fill:#454C5A}#dsfig-u3-02 .ah.hi{fill:#2340B8}#dsfig-u3-02 .wl rect{fill:#FFFFFF;stroke:#DCE0E7}#dsfig-u3-02 .wl .t{font-size:12px;font-weight:700}#dsfig-u3-02 .wl.hi rect{fill:#2340B8;stroke:#2340B8}#dsfig-u3-02 .wl.hi .t{fill:#FFFFFF}html.dark #dsfig-u3-02 .e{stroke:#B1B7C3}html.dark #dsfig-u3-02 .e.hi{stroke:#8FA3FF}html.dark #dsfig-u3-02 .n{fill:#161920;stroke:#E6E8ED}html.dark #dsfig-u3-02 .n.hi{fill:#1E2748;stroke:#8FA3FF}html.dark #dsfig-u3-02 .n.rb-b{fill:#E6E8ED;stroke:#E6E8ED}html.dark #dsfig-u3-02 .n.rb-r{fill:#FF7E71;stroke:#FF7E71}html.dark #dsfig-u3-02 .t{fill:#E6E8ED}html.dark #dsfig-u3-02 .t.inv{fill:#0F1115}html.dark #dsfig-u3-02 .kd{stroke:#E6E8ED}html.dark #dsfig-u3-02 .dot{fill:#E6E8ED}html.dark #dsfig-u3-02 .ann{fill:#8FA3FF}html.dark #dsfig-u3-02 .lbl{fill:#858D9C}html.dark #dsfig-u3-02 .ptr{fill:#8FA3FF}html.dark #dsfig-u3-02 .ah{fill:#B1B7C3}html.dark #dsfig-u3-02 .ah.hi{fill:#8FA3FF}html.dark #dsfig-u3-02 .wl rect{fill:#161920;stroke:#2A2E37}html.dark #dsfig-u3-02 .wl.hi rect{fill:#8FA3FF;stroke:#8FA3FF}html.dark #dsfig-u3-02 .wl.hi .t{fill:#0F1115}</style><defs><marker id="ah9" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah" d="M0,1 L9,5 L0,9 z"/></marker><marker id="ahh9" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah hi" d="M0,1 L9,5 L0,9 z"/></marker></defs><path class="e" d="M59,40 L148,40" marker-end="url(#ah9)"/><path class="e" d="M188,40 L277,40" marker-end="url(#ah9)"/><path class="e" d="M317,40 L406,40" marker-end="url(#ah9)"/><g class="wl"><rect x="84.1" y="31" width="40.8" height="18" rx="9"/><text class="t" x="104.5" y="40" dy=".35em" text-anchor="middle">load</text></g><g class="wl"><rect x="213.1" y="31" width="40.8" height="18" rx="9"/><text class="t" x="233.5" y="40" dy=".35em" text-anchor="middle">init</text></g><g class="wl"><rect x="342.1" y="31" width="40.8" height="18" rx="9"/><text class="t" x="362.5" y="40" dy=".35em" text-anchor="middle">stop</text></g><circle class="n" cx="40" cy="40" r="18"/><text class="t" x="40" y="40" dy=".35em" text-anchor="middle">Ld</text><circle class="n" cx="169" cy="40" r="18"/><text class="t" x="169" y="40" dy=".35em" text-anchor="middle">In</text><circle class="n" cx="298" cy="40" r="18"/><text class="t" x="298" y="40" dy=".35em" text-anchor="middle">Sv</text><circle class="n" cx="427" cy="40" r="18"/><text class="t" x="427" y="40" dy=".35em" text-anchor="middle">De</text></svg><figcaption style="font-size:.82em;opacity:.72;margin-top:.45rem">Servlet life cycle. Ld = loaded, In = init() once, Sv = service() runs once per request and returns a response (repeats), De = destroy() once</figcaption></figure>

Asked: [7 marks] (Dec 2024) Define JSP. Describe the life cycle of servlets.

EJBs

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>

Definition. <mark>Enterprise JavaBeans (EJB) are server-side components that encapsulate business logic and run in an EJB container, which supplies transactions, security and pooling.</mark>

Key points.

  1. A session bean performs a task for a client and is stateless or stateful.
  2. An entity bean represents persistent data (a table row), and newer versions replace it with JPA entities.
  3. A message-driven bean consumes JMS messages asynchronously.
  4. The container manages the life cycle, so the developer writes only the business logic.

middleware: JDBC

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>

Definition. <mark>JDBC (Java Database Connectivity) is the Java API that lets a program connect to a relational database and run SQL through a database-specific driver.</mark>

Key points.

  1. The steps are load the driver, get a Connection from DriverManager or DataSource, create a Statement, execute the query, read the ResultSet and close.
  2. Drivers are of four types: JDBC-ODBC bridge, native API, network protocol and pure Java thin driver.
  3. It acts as middleware, keeping application code independent of the database vendor.

JNDI

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>

Definition. <mark>JNDI (Java Naming and Directory Interface) is an API that lets Java programs look up objects and resources by name in a naming or directory service such as LDAP, RMI registry or DNS.</mark>

Key points.

  1. A client calls lookup() on an InitialContext with a name such as java:comp/env/jdbc/DB and gets the object back.
  2. It hides the location and vendor of the resource, so EJBs, DataSources and JMS queues are found by name.
  3. Service providers plug in behind one API.

JMS

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>

Definition. <mark>JMS (Java Message Service) is the Java API for asynchronous messaging, in which a producer sends messages to a destination and a consumer receives them through a message broker.</mark>

Key points.

  1. The point-to-point model uses a Queue, and each message is consumed by exactly one receiver.
  2. The publish-subscribe model uses a Topic, and every subscriber receives the message.
  3. Producer and consumer are loosely coupled, so they need not run at the same time.
  4. Message-driven beans consume JMS messages inside J2EE.

RMI and CORBA

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">High weight</span>

Definition. <mark>Java RMI (Remote Method Invocation) lets an object in one JVM invoke methods on an object in another JVM as if it were local, using a stub and skeleton; CORBA (Common Object Request Broker Architecture) is an OMG standard that lets objects written in different languages on different platforms interoperate through an ORB.</mark>

Key points.

  1. In RMI the server object implements a remote interface that extends java.rmi.Remote, and it is registered with the RMI registry under a name.
  2. The client looks up the name in the registry and gets a stub, a local proxy that marshals the call and arguments.
  3. The skeleton on the server side unmarshals the request, calls the real object and returns the result (in modern Java the skeleton is replaced by reflection).
  4. RMI is Java-only and passes objects by serialisation, so it is simple but not language-neutral.
  5. In CORBA the interface is written in IDL (Interface Definition Language), and the IDL compiler generates a client stub and a server skeleton in the chosen language.
  6. The ORB carries requests between client and server, locates the object, and uses IIOP as the wire protocol.
  7. CORBA is language- and platform-independent, and it adds services such as naming, events and transactions, but it is heavier and more complex.
  8. RPC calls a procedure on a remote machine, and RMI is its object-oriented form.

<figure class="ds-fig" style="margin:1.4rem 0;overflow-x:auto"><svg xmlns="http://www.w3.org/2000/svg" id="dsfig-u3-03" viewBox="0 0 596 252" width="596" height="252" role="img" aria-label="RMI architecture. Cl = client, St = stub, Net = network transport, Sk = skeleton, Ob = remote object, Rg = RMI registry (server binds, client looks up)"><style>#dsfig-u3-03 .e{stroke:#454C5A;stroke-width:1.4;fill:none}#dsfig-u3-03 .e.hi{stroke:#2340B8;stroke-width:2.6}#dsfig-u3-03 .n{fill:#FFFFFF;stroke:#16181D;stroke-width:1.4}#dsfig-u3-03 .n.hi{fill:#E3E9FC;stroke:#2340B8;stroke-width:2.2}#dsfig-u3-03 .n.rb-b{fill:#16181D;stroke:#16181D}#dsfig-u3-03 .n.rb-r{fill:#BD3227;stroke:#BD3227}#dsfig-u3-03 text{font-family:"JetBrains Mono",ui-monospace,Menlo,Consolas,monospace;font-size:13px}#dsfig-u3-03 .t{fill:#16181D;font-weight:500}#dsfig-u3-03 .t.inv{fill:#FFFFFF;font-weight:700}#dsfig-u3-03 .kd{stroke:#16181D;stroke-width:1.2}#dsfig-u3-03 .dot{fill:#16181D}#dsfig-u3-03 .ann{fill:#2340B8;font-size:11px;font-weight:700}#dsfig-u3-03 .lbl{fill:#6F7787;font-family:system-ui,-apple-system,sans-serif;font-size:12px;font-weight:700}#dsfig-u3-03 .ptr{fill:#2340B8;font-size:12px;font-weight:700}#dsfig-u3-03 .ah{fill:#454C5A}#dsfig-u3-03 .ah.hi{fill:#2340B8}#dsfig-u3-03 .wl rect{fill:#FFFFFF;stroke:#DCE0E7}#dsfig-u3-03 .wl .t{font-size:12px;font-weight:700}#dsfig-u3-03 .wl.hi rect{fill:#2340B8;stroke:#2340B8}#dsfig-u3-03 .wl.hi .t{fill:#FFFFFF}html.dark #dsfig-u3-03 .e{stroke:#B1B7C3}html.dark #dsfig-u3-03 .e.hi{stroke:#8FA3FF}html.dark #dsfig-u3-03 .n{fill:#161920;stroke:#E6E8ED}html.dark #dsfig-u3-03 .n.hi{fill:#1E2748;stroke:#8FA3FF}html.dark #dsfig-u3-03 .n.rb-b{fill:#E6E8ED;stroke:#E6E8ED}html.dark #dsfig-u3-03 .n.rb-r{fill:#FF7E71;stroke:#FF7E71}html.dark #dsfig-u3-03 .t{fill:#E6E8ED}html.dark #dsfig-u3-03 .t.inv{fill:#0F1115}html.dark #dsfig-u3-03 .kd{stroke:#E6E8ED}html.dark #dsfig-u3-03 .dot{fill:#E6E8ED}html.dark #dsfig-u3-03 .ann{fill:#8FA3FF}html.dark #dsfig-u3-03 .lbl{fill:#858D9C}html.dark #dsfig-u3-03 .ptr{fill:#8FA3FF}html.dark #dsfig-u3-03 .ah{fill:#B1B7C3}html.dark #dsfig-u3-03 .ah.hi{fill:#8FA3FF}html.dark #dsfig-u3-03 .wl rect{fill:#161920;stroke:#2A2E37}html.dark #dsfig-u3-03 .wl.hi rect{fill:#8FA3FF;stroke:#8FA3FF}html.dark #dsfig-u3-03 .wl.hi .t{fill:#0F1115}</style><defs><marker id="ah10" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah" d="M0,1 L9,5 L0,9 z"/></marker><marker id="ahh10" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah hi" d="M0,1 L9,5 L0,9 z"/></marker></defs><path class="e" d="M59,40 L148,40" marker-end="url(#ah10)"/><path class="e" d="M188,40 L277,40" marker-end="url(#ah10)"/><path class="e" d="M317,40 L406,40" marker-end="url(#ah10)"/><path class="e" d="M446,40 L535,40" marker-end="url(#ah10)"/><path class="e" d="M286.6,196.8 L181.6,56.8" marker-end="url(#ah10)"/><path class="e" d="M540.2,50.5 L315.5,200.4" marker-end="url(#ah10)"/><g class="wl"><rect x="84.1" y="31" width="40.8" height="18" rx="9"/><text class="t" x="104.5" y="40" dy=".35em" text-anchor="middle">call</text></g><g class="wl"><rect x="202.8" y="31" width="61.5" height="18" rx="9"/><text class="t" x="233.5" y="40" dy=".35em" text-anchor="middle">marshal</text></g><g class="wl"><rect x="464.4" y="31" width="54.3" height="18" rx="9"/><text class="t" x="491.5" y="40" dy=".35em" text-anchor="middle">invoke</text></g><g class="wl"><rect x="206.4" y="117" width="54.3" height="18" rx="9"/><text class="t" x="233.5" y="126" dy=".35em" text-anchor="middle">lookup</text></g><g class="wl"><rect x="406.6" y="117" width="40.8" height="18" rx="9"/><text class="t" x="427" y="126" dy=".35em" text-anchor="middle">bind</text></g><circle class="n" cx="40" cy="40" r="18"/><text class="t" x="40" y="40" dy=".35em" text-anchor="middle">Cl</text><circle class="n" cx="169" cy="40" r="18"/><text class="t" x="169" y="40" dy=".35em" text-anchor="middle">St</text><circle class="n" cx="298" cy="40" r="18"/><text class="t" x="298" y="40" dy=".35em" text-anchor="middle">Net</text><circle class="n" cx="427" cy="40" r="18"/><text class="t" x="427" y="40" dy=".35em" text-anchor="middle">Sk</text><circle class="n" cx="556" cy="40" r="18"/><text class="t" x="556" y="40" dy=".35em" text-anchor="middle">Ob</text><circle class="n" cx="298" cy="212" r="18"/><text class="t" x="298" y="212" dy=".35em" text-anchor="middle">Rg</text></svg><figcaption style="font-size:.82em;opacity:.72;margin-top:.45rem">RMI architecture. Cl = client, St = stub, Net = network transport, Sk = skeleton, Ob = remote object, Rg = RMI registry (server binds, client looks up)</figcaption></figure>

Aspect RMI RPC
Orientation Object-oriented, invokes methods on objects Procedural, calls functions
Language Java only Language-neutral (C mostly), using XDR/IDL
Data passing Objects by serialisation, references to remote objects Simple data structures by value
Mechanism Stub, skeleton and registry Client stub, server stub, binding
State Objects keep state Usually stateless procedures
Use case Distributed Java applications Cross-language services such as NFS

Answer frame. For RMI notes: define it, draw the stub-skeleton-registry figure, then trace lookup, call, marshal, invoke, return; add CORBA with IDL, ORB and IIOP. For RMI vs RPC: define both, give the table, close with the object-vs-procedure point.

Pitfall: In the paper's "brief notes" the part on principles of sound documentation belongs to Unit 5, not to this unit.

Asked: [7 marks] (Dec 2020, Nov 2022, Dec 2024) Write brief notes on (i) RMI, (ii) Principles of sound documentation; also short notes on Java RMI, CORBA, and CORBA and RMI. Asked: [7 marks] (Dec 2024) Compare RMI and RPC.

Role of UML in software architecture

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Medium weight</span>

Definition. <mark>UML (Unified Modeling Language) is a standard graphical notation for visualising, specifying, constructing and documenting a software system, and it is used to represent the views of an architecture.</mark>

Key points.

  1. UML gives a common visual notation, so architects, developers and clients communicate the design without ambiguity.
  2. The use-case view shows the system's functions for its users and captures the requirements that drive the architecture.
  3. The logical view uses class diagrams to show the structure of classes and their relations.
  4. The component diagram shows the components, their provided and required interfaces, and connectors, and it is the main UML diagram for architecture.
  5. The deployment diagram maps software artifacts to hardware nodes and links, so it shows the physical architecture.
  6. The sequence diagram shows the dynamic behaviour, the order of messages among components over time.
  7. Structural diagrams (class, component, deployment) show what the system is, and behavioural diagrams (use case, sequence, state) show what it does.
  8. UML serves as documentation and helps visualisation, communication and analysis, though it is less formal than an ADL.

<figure class="ds-fig" style="margin:1.4rem 0;overflow-x:auto"><svg xmlns="http://www.w3.org/2000/svg" id="dsfig-u3-04" viewBox="0 0 424 80" width="424" height="80" role="img" aria-label="Component diagram. UI = web UI component, Sv = service component, DB = database component; boxes joined by interfaces"><style>#dsfig-u3-04 .e{stroke:#454C5A;stroke-width:1.4;fill:none}#dsfig-u3-04 .e.hi{stroke:#2340B8;stroke-width:2.6}#dsfig-u3-04 .n{fill:#FFFFFF;stroke:#16181D;stroke-width:1.4}#dsfig-u3-04 .n.hi{fill:#E3E9FC;stroke:#2340B8;stroke-width:2.2}#dsfig-u3-04 .n.rb-b{fill:#16181D;stroke:#16181D}#dsfig-u3-04 .n.rb-r{fill:#BD3227;stroke:#BD3227}#dsfig-u3-04 text{font-family:"JetBrains Mono",ui-monospace,Menlo,Consolas,monospace;font-size:13px}#dsfig-u3-04 .t{fill:#16181D;font-weight:500}#dsfig-u3-04 .t.inv{fill:#FFFFFF;font-weight:700}#dsfig-u3-04 .kd{stroke:#16181D;stroke-width:1.2}#dsfig-u3-04 .dot{fill:#16181D}#dsfig-u3-04 .ann{fill:#2340B8;font-size:11px;font-weight:700}#dsfig-u3-04 .lbl{fill:#6F7787;font-family:system-ui,-apple-system,sans-serif;font-size:12px;font-weight:700}#dsfig-u3-04 .ptr{fill:#2340B8;font-size:12px;font-weight:700}#dsfig-u3-04 .ah{fill:#454C5A}#dsfig-u3-04 .ah.hi{fill:#2340B8}#dsfig-u3-04 .wl rect{fill:#FFFFFF;stroke:#DCE0E7}#dsfig-u3-04 .wl .t{font-size:12px;font-weight:700}#dsfig-u3-04 .wl.hi rect{fill:#2340B8;stroke:#2340B8}#dsfig-u3-04 .wl.hi .t{fill:#FFFFFF}html.dark #dsfig-u3-04 .e{stroke:#B1B7C3}html.dark #dsfig-u3-04 .e.hi{stroke:#8FA3FF}html.dark #dsfig-u3-04 .n{fill:#161920;stroke:#E6E8ED}html.dark #dsfig-u3-04 .n.hi{fill:#1E2748;stroke:#8FA3FF}html.dark #dsfig-u3-04 .n.rb-b{fill:#E6E8ED;stroke:#E6E8ED}html.dark #dsfig-u3-04 .n.rb-r{fill:#FF7E71;stroke:#FF7E71}html.dark #dsfig-u3-04 .t{fill:#E6E8ED}html.dark #dsfig-u3-04 .t.inv{fill:#0F1115}html.dark #dsfig-u3-04 .kd{stroke:#E6E8ED}html.dark #dsfig-u3-04 .dot{fill:#E6E8ED}html.dark #dsfig-u3-04 .ann{fill:#8FA3FF}html.dark #dsfig-u3-04 .lbl{fill:#858D9C}html.dark #dsfig-u3-04 .ptr{fill:#8FA3FF}html.dark #dsfig-u3-04 .ah{fill:#B1B7C3}html.dark #dsfig-u3-04 .ah.hi{fill:#8FA3FF}html.dark #dsfig-u3-04 .wl rect{fill:#161920;stroke:#2A2E37}html.dark #dsfig-u3-04 .wl.hi rect{fill:#8FA3FF;stroke:#8FA3FF}html.dark #dsfig-u3-04 .wl.hi .t{fill:#0F1115}</style><defs><marker id="ah11" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah" d="M0,1 L9,5 L0,9 z"/></marker><marker id="ahh11" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah hi" d="M0,1 L9,5 L0,9 z"/></marker></defs><path class="e" d="M59,40 L191,40" marker-end="url(#ah11)"/><path class="e" d="M231,40 L363,40" marker-end="url(#ah11)"/><g class="wl"><rect x="105.6" y="31" width="40.8" height="18" rx="9"/><text class="t" x="126" y="40" dy=".35em" text-anchor="middle">HTTP</text></g><g class="wl"><rect x="281.2" y="31" width="33.6" height="18" rx="9"/><text class="t" x="298" y="40" dy=".35em" text-anchor="middle">SQL</text></g><circle class="n" cx="40" cy="40" r="18"/><text class="t" x="40" y="40" dy=".35em" text-anchor="middle">UI</text><circle class="n" cx="212" cy="40" r="18"/><text class="t" x="212" y="40" dy=".35em" text-anchor="middle">Sv</text><circle class="n" cx="384" cy="40" r="18"/><text class="t" x="384" y="40" dy=".35em" text-anchor="middle">DB</text></svg><figcaption style="font-size:.82em;opacity:.72;margin-top:.45rem">Component diagram. UI = web UI component, Sv = service component, DB = database component; boxes joined by interfaces</figcaption></figure>

<figure class="ds-fig" style="margin:1.4rem 0;overflow-x:auto"><svg xmlns="http://www.w3.org/2000/svg" id="dsfig-u3-05" viewBox="0 0 424 80" width="424" height="80" role="img" aria-label="Sequence view as message flow. Cl = client, Wb = web server, Ap = application server; draw as lifelines with arrows in this order"><style>#dsfig-u3-05 .e{stroke:#454C5A;stroke-width:1.4;fill:none}#dsfig-u3-05 .e.hi{stroke:#2340B8;stroke-width:2.6}#dsfig-u3-05 .n{fill:#FFFFFF;stroke:#16181D;stroke-width:1.4}#dsfig-u3-05 .n.hi{fill:#E3E9FC;stroke:#2340B8;stroke-width:2.2}#dsfig-u3-05 .n.rb-b{fill:#16181D;stroke:#16181D}#dsfig-u3-05 .n.rb-r{fill:#BD3227;stroke:#BD3227}#dsfig-u3-05 text{font-family:"JetBrains Mono",ui-monospace,Menlo,Consolas,monospace;font-size:13px}#dsfig-u3-05 .t{fill:#16181D;font-weight:500}#dsfig-u3-05 .t.inv{fill:#FFFFFF;font-weight:700}#dsfig-u3-05 .kd{stroke:#16181D;stroke-width:1.2}#dsfig-u3-05 .dot{fill:#16181D}#dsfig-u3-05 .ann{fill:#2340B8;font-size:11px;font-weight:700}#dsfig-u3-05 .lbl{fill:#6F7787;font-family:system-ui,-apple-system,sans-serif;font-size:12px;font-weight:700}#dsfig-u3-05 .ptr{fill:#2340B8;font-size:12px;font-weight:700}#dsfig-u3-05 .ah{fill:#454C5A}#dsfig-u3-05 .ah.hi{fill:#2340B8}#dsfig-u3-05 .wl rect{fill:#FFFFFF;stroke:#DCE0E7}#dsfig-u3-05 .wl .t{font-size:12px;font-weight:700}#dsfig-u3-05 .wl.hi rect{fill:#2340B8;stroke:#2340B8}#dsfig-u3-05 .wl.hi .t{fill:#FFFFFF}html.dark #dsfig-u3-05 .e{stroke:#B1B7C3}html.dark #dsfig-u3-05 .e.hi{stroke:#8FA3FF}html.dark #dsfig-u3-05 .n{fill:#161920;stroke:#E6E8ED}html.dark #dsfig-u3-05 .n.hi{fill:#1E2748;stroke:#8FA3FF}html.dark #dsfig-u3-05 .n.rb-b{fill:#E6E8ED;stroke:#E6E8ED}html.dark #dsfig-u3-05 .n.rb-r{fill:#FF7E71;stroke:#FF7E71}html.dark #dsfig-u3-05 .t{fill:#E6E8ED}html.dark #dsfig-u3-05 .t.inv{fill:#0F1115}html.dark #dsfig-u3-05 .kd{stroke:#E6E8ED}html.dark #dsfig-u3-05 .dot{fill:#E6E8ED}html.dark #dsfig-u3-05 .ann{fill:#8FA3FF}html.dark #dsfig-u3-05 .lbl{fill:#858D9C}html.dark #dsfig-u3-05 .ptr{fill:#8FA3FF}html.dark #dsfig-u3-05 .ah{fill:#B1B7C3}html.dark #dsfig-u3-05 .ah.hi{fill:#8FA3FF}html.dark #dsfig-u3-05 .wl rect{fill:#161920;stroke:#2A2E37}html.dark #dsfig-u3-05 .wl.hi rect{fill:#8FA3FF;stroke:#8FA3FF}html.dark #dsfig-u3-05 .wl.hi .t{fill:#0F1115}</style><defs><marker id="ah12" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah" d="M0,1 L9,5 L0,9 z"/></marker><marker id="ahh12" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah hi" d="M0,1 L9,5 L0,9 z"/></marker></defs><path class="e" d="M57.8,46.6 Q126,72 192.3,47.3" marker-end="url(#ah12)"/><path class="e" d="M229.8,46.6 Q298,72 364.3,47.3" marker-end="url(#ah12)"/><path class="e" d="M366.2,33.4 Q298,8 231.7,32.7" marker-end="url(#ah12)"/><path class="e" d="M194.2,33.4 Q126,8 59.7,32.7" marker-end="url(#ah12)"/><g class="wl"><rect x="108.7" y="50.5" width="33.6" height="18" rx="9"/><text class="t" x="125.5" y="59.5" dy=".35em" text-anchor="middle">req</text></g><g class="wl"><rect x="277.1" y="50.5" width="40.8" height="18" rx="9"/><text class="t" x="297.5" y="59.5" dy=".35em" text-anchor="middle">call</text></g><g class="wl"><rect x="281.7" y="11.5" width="33.6" height="18" rx="9"/><text class="t" x="298.5" y="20.5" dy=".35em" text-anchor="middle">ret</text></g><g class="wl"><rect x="106.1" y="11.5" width="40.8" height="18" rx="9"/><text class="t" x="126.5" y="20.5" dy=".35em" text-anchor="middle">page</text></g><circle class="n" cx="40" cy="40" r="18"/><text class="t" x="40" y="40" dy=".35em" text-anchor="middle">Cl</text><circle class="n" cx="212" cy="40" r="18"/><text class="t" x="212" y="40" dy=".35em" text-anchor="middle">Wb</text><circle class="n" cx="384" cy="40" r="18"/><text class="t" x="384" y="40" dy=".35em" text-anchor="middle">Ap</text></svg><figcaption style="font-size:.82em;opacity:.72;margin-top:.45rem">Sequence view as message flow. Cl = client, Wb = web server, Ap = application server; draw as lifelines with arrows in this order</figcaption></figure>

Answer frame. Open with the definition and the point that UML documents architecture views; draw one component and one deployment diagram (and a sequence diagram if time allows); develop points 2-7 in order; close with the benefits in point 8.

Asked: [7 marks] (Dec 2020, Nov 2022, Nov 2023) Discuss the role of UML in Software Architecture; describe various UML diagrams used in software architecture with diagrams.

Last-minute revision

  • ADL: formal language for components, connectors, configurations; Wright, ACME, UniCon.
  • Struts is MVC: ActionServlet controller, Action model, JSP view.
  • Hibernate is ORM: Configuration, SessionFactory, Session, Transaction, mapping.
  • Node.js is a server-side V8 runtime with an event loop; AngularJS is a client-side MVC framework with two-way binding.
  • J2EE tiers: client, web (JSP, servlet), business (EJB), EIS (database).
  • Servlet life cycle: init() once, service() per request, destroy() once.
  • EJB types: session, entity, message-driven.
  • JDBC steps: driver, connection, statement, result set, close.
  • JNDI looks up resources by name; JMS has queue (one receiver) and topic (many).
  • RMI uses stub, skeleton, registry and is Java-only; CORBA uses IDL, ORB and IIOP and is language-neutral.
  • UML views: use case, logical (class), component, deployment, sequence.

Memory hooks

  • ADL = "C-C-C": Components, Connectors, Configurations.
  • Servlet = "ISD": init, service, destroy.
  • J2EE tiers = "C-W-B-E": Client, Web, Business, EIS.
  • RMI = Java only (stub and registry); CORBA = any language (IDL and ORB).
  • Queue = one receiver, Topic = topic for all subscribers.

Coverage checklist

  • Software Architecture Description Languages (ADLs): ADL definition, features and examples (14 marks).
  • Struts: definition and MVC roles (no past question).
  • Hibernate: Hibernate for database interaction (7 marks).
  • Node JS: Node vs Angular JS, and how they build web apps (7 marks each).
  • Angular JS: definition and key points (no past question).
  • J2EE - JSP: JSP, Servlets and EJBs use; simple J2EE architecture (7 marks each).
  • Servlets: define JSP, servlet life cycle (7 marks).
  • EJBs: definition and bean types (no past question).
  • middleware: JDBC: definition and steps (no past question).
  • JNDI: definition and lookup (no past question).
  • JMS: definition and messaging models (no past question).
  • RMI and CORBA: RMI and CORBA notes, compare RMI and RPC (7 and 14 marks).
  • Role of UML in software architecture: UML role and diagrams (7 marks).
Go to where you left off?

Quick Add to Notes

Save questions, your own notes and screenshots into notes filed by unit. It takes a free account.

Create free account

Have an account? Log in