Assignment 3
Fall 2019
Deadline Date: 9/January/2020 at 11:30 AM (HARDCOPY IN CLASS)
➢ Viva/Quiz may be conducted ON 09-01-2020, AFTER SUBMISSION OF ASSIGNMENT for
evaluation. LATE PENALTY 25% PER DAY
➢ Print and attach this title page to your assignment
➢ Write in your own words to answer the following, if you use material from any book/website
apart from your recommended book please provide relevant references. All work will be assumed
yours otherwise.
➢ Justify your answers where needed. Explain briefly and concisely
➢ DECLARATION
I SOLEMNLY DECLARE ALL THE MATERIAL PROVIDED IN ASSIGNMENT HAS BEEN
DONE BY ME AND/OR PROPERLY REFERENCED & ALL INFO PROVIDED IS CORRECT
Name
Signature: ____________
Date:
Question 1:
Consider the following architectural patterns and explain them with 2 practical examples each.
1) Pipe and Filters:
A very simple, yet powerful architecture, that is also very robust. It consists of any number of
components (filters) that transform or filter data, before passing it on via connectors (pipes) to other
components. The filters are all working at the same time. The architecture is often used as a simple
sequence, but it may also be used for very complex structures.
Pipe: The filter transforms or filters the data it receives via the pipes with which it is connected. A filter
can have any number of input pipes and any number of output pipes.
Filters: The pipe is the connector that passes data from one filter to the next. It is a directional stream of
data that is usually implemented by a data buffer to store all data, until the next filter has time to process
it.
Examples:
UNIX programs. The output of one program can be linked to the input of another program.
Compilers. The consecutive filters perform lexical analysis, parsing, semantic analysis, and code
generation.
2) Layered:
The most common architecture pattern is the layered architecture pattern, otherwise known as the n-tier
architecture pattern. In this type of architecture data moves from one defined level of processing to
another.
Examples:
1. Communications protocols
2. Web Applications
3) Client and Server:
Client/server architecture is a computing model in which the server hosts, delivers and manages most of
the resources and services to be consumed by the client.
Examples:
Examples of servers include web servers, mail servers, and file servers.
4) Peer to Peer:
Peer-to-peer architecture (P2P architecture) is a commonly used computer networking architecture in
which each workstation, or node, has the same capabilities and responsibilities. It is often compared and
contrasted to the classic client/server architecture, in which some computers are dedicated to serving
others.
Examples:
When we create an ad-hoc network between two computers, you create a peer-to-peer network between
them.
5) Blackboard:
Separate programs communicate through the shared repository, known as the blackboard.
Examples:
Speech Recognition
Weather Recognition System
Pattern Recognition
6) Publish/Subscribe:
Publish/subscribe messaging, or pub/sub messaging, is a form of asynchronous service-to-service
communication used in server less and micro services architectures. In a pub/sub model, any message
published to a topic is immediately received by all of the subscribers to the topic.
Examples:
Amazon SNS: A paid commercial implementation managed by Amazon as part of the AWS
ecosystem.
XEP-0060: This is an extension to the XMPP protocol for generic publish-subscribe
functionality.
Question: 02
An e-mail system filters incoming e-mails with a whitelist (e-mails from senders on the whitelist are
accepted), a blacklist (e-mails from senders on the blacklist are deleted), and the Spam assassin tool (e-
mails that do not pass this check are marked as spam). The system will run on a single-core server
machine, but may be moved to a multi-core server if the load gets too high.
(a) Write down the name of architectural style.
Ans. Pipe-and-Filter.
(b) Draw diagram of architectural style with respect to the above scenario and write description to explain
the components.
Description:
The system consists of multiple filters which are linked in sequence. An incoming email is given to the
first filter. Then, each filter either moves the Email to a destination (inbox, trash, spam), or hands it off to
the next filter. The emails that are left at the end will go to the inbox.
(c) Name the components and connectors of above mentioned scenario.
Components:
Here the components are Whitelist, Blacklist, and SpamAssassin.
Connectors:
Connectors or pipes are those which helps in data transmission in between the above filters or
components.
(d) Identify the sink tasks.
1. When the emails are pushed to the trash.
2. When the emails are pushed to the Spam.
3. When the emails are pushed to the Inbox.
Question 3:
Suppose the process of pizza making. We have 3 tasks that are progressing asynchronously, that is sauce
for pizza, chopping the vegetables for the pizza topping and the pizza crust. When all three of these have
been completed, then we will assemble them. After it has been assembled, we can then add the cheese to
the pizza, and then bake it in oven, before delivering it to our customer.
(a) Identify the architecture style and draw diagram.
Here we will Use Pipe and Filters - Data Flow.
(b) Identify the components and connectors
Here the components or filters are Making Sauce, Vegetable Chopping, and Pizza Crust, Assembling all
of these 3 parts, adding cheese, baking it and serving it to the customer.
The connectors are pipes from where the filters are getting inputs in the form of ingredients in above
case.
Question 4: Describe the Web based systems:
Ans. For the Web based system the most suitable architectural style can be Client-Server
Communication Process.
(a) Component types:
Servers
Clients
(b) Connectors:
Remote procedure call, network protocols (Connectors are RPC-based network interaction protocols)
(c) Topology:
Two-level, multiple clients making requests to server.
Question 5: Identify the Architectural styles from the below statements.
(a) Database schema in which data stored in various tables inside the database is accessible by various
components used in the software. Repository-Data Centered
(b) Asynchronous messaging is an effective way to decouple senders from consumers, and avoid blocking
the sender to wait for a response. Publish/Subscribe - Event Systems
(c) Which is the appropriate architectural style for a system that can be divided into reusable, loosely
coupled components that can be flexibly combined and arranged to transform between various data
formats. Pipe and Filters - Data Flow
(d) If someone wants to set up a set of independent machines having equal computation power and
resources that are connected via a common protocol to share their services and provide robustness and
scalability, which of the following architectural style is best suited. Peer to Peer- Communicating
Processes
(e) Inventory management software with huge amount of data to handle. Client Server- Communicating
Processes
Question: 06
As the head of information systems for a college you are tasked with developing a new student
registration system….
Answer:
(a) Provide a complete class diagram
Attached on page: 1
(b) List 3 non-functional and 3 functional requirements for the above system.
Functional Requirements:
1. The new system will allow students to select four course offerings for the coming semester.
2. If a course offering becomes full while a student is building a schedule including that offering,
the student must be notified.
3. Once the registration process is completed for a student, the registration system sends information
to the billing system so the student can be billed for the semester.
Non-Functional Requirements:
1. The system must employ extra security measures to prevent unauthorized access.
2. The new system must ensure that access to the data on the legacy system occurs in a timely
manner.
3. Only Professors can enter grades for students.
(c) Draw sequence diagram of request catalogue. (Make sure the functions & classes listed in
sequence diagram are according to class diagram in part (a)).
Attached on page: 2
(d) Provide a complete use case diagram
(e) Provide a complete activity diagram
Attached on page: 03
(f) The above mentioned system is designed in client server architecture, provide the components of
the client server architecture with respect to the above mentioned system.
Answer: In the above mentioned client-server architecture system the components are Server (Here the
server used is UNIX Server) and here the clients are Students, Registrar and the Teachers which can
request different tasks from the server.