0% found this document useful (0 votes)
9 views15 pages

SAD TheFirst

Uploaded by

damt9362
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views15 pages

SAD TheFirst

Uploaded by

damt9362
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 15

1.What is the Ralph Johnson’s definition of Architecture (V1)?

Ralph Johnson's definition of Architecture (V1) emphasizes the high-level structure


of a software system. He defines architecture as:

"The architecture of a software system is the set of design decisions that are
expensive to change."

This definition focuses on the idea that architecture comprises the fundamental design
choices that have a long-term impact on the system. These decisions are typically
difficult or costly to modify once implemented, so they must be carefully considered at
the start of the development process. It highlights the importance of stability and the
durability of design choices in shaping the architecture of a system.

2.Give examples of non-functional requirement (V1)?

Non-functional requirements (NFRs) describe the qualities or attributes of a system,


rather than specific behaviors or functions. They focus on how the system performs and
are crucial in determining its overall quality and user experience.

Here are examples of non-functional requirements (V1):

1. Performance: The system must handle 1,000 transactions per second.


2. Scalability: The system should be able to scale up to support 10,000
concurrent users without degradation in performance.
3. Security: The system must ensure that data is encrypted during transmission
and storage, and only authorized users can access sensitive information.
4. Usability: The user interface should be intuitive and allow users to complete
tasks with fewer than three clicks.
5. Reliability: The system should have 99.9% uptime over a period of one year.
6. Maintainability: The system should be easy to modify, with a requirement that
80% of changes can be implemented within two weeks.
7. Availability: The system must be available 24/7, with planned downtime of no
more than two hours per month.
8. Portability: The software should run on multiple platforms, including Windows,
macOS, and Linux, without requiring significant code changes.
9. Compliance: The system must adhere to GDPR regulations for data privacy
and protection.
10. Efficiency: The system should use no more than 70% of CPU resources
during peak operation times.

3.Why software architecture?

Software architecture plays a critical role in the success of a software system for
several key reasons:

- Ensures System Quality


Software architecture defines the high-level structure and design decisions that
influence the non-functional attributes of the system, such as performance,
scalability, security, and maintainability. Properly designed architecture helps ensure
that the system meets these quality attributes and can operate under expected loads
and constraints.

- Provides a Blueprint for Development

Architecture acts as a blueprint for the system’s development process, providing a


clear framework for how different components of the software interact. It guides the
development team on how to organize code, manage dependencies, and ensure
alignment with design principles.

- Manages Complexity

As software systems grow in size and functionality, they become increasingly complex.
Software architecture helps to break down this complexity into manageable
components (modules, layers, or services), enabling teams to work on different parts
of the system independently while ensuring they can fit together as a cohesive whole.

- Facilitates Communication

Architecture serves as a common language between various stakeholders, including


developers, designers, project managers, and customers. It helps to align everyone's
understanding of the system’s structure and purpose, facilitating effective
communication across teams.

- Supports Reusability

A well-designed architecture promotes reuse of components, services, or modules


across projects, saving time and resources. It encourages the creation of reusable
libraries or services that can be leveraged in multiple systems or contexts.

- Guides Technology Decisions

Software architecture helps in making key technical decisions, such as choosing the
right frameworks, programming languages, databases, or communication protocols.
These decisions can have a lasting impact on the success and adaptability of the
system.

- Enhances Flexibility and Maintainability

A good architecture enables a system to be more adaptable to future changes and


evolution. It defines how easily new features can be added, old ones removed, or
components upgraded without disrupting the entire system. This is critical for ensuring
that the system remains maintainable over time.
- Minimizes Risk

By making important design decisions early in the process, software architecture


reduces the risk of expensive changes down the line. It allows teams to identify potential
risks, such as scalability issues, security vulnerabilities, or performance bottlenecks,
and address them before they become costly problems.

- Ensures Alignment with Business Goals

Software architecture helps ensure that the system is aligned with the business
requirements and goals. It translates business objectives into technical requirements,
ensuring that the system meets user needs, adheres to organizational standards, and
delivers value to stakeholders.

- Promotes System Integrity

A well-defined architecture helps maintain the integrity of the system by providing a


stable foundation for future development. It ensures consistency in how components are
designed, integrated, and interact with each other, leading to a more robust and
coherent system.

Conclusion

In summary, software architecture is crucial for creating scalable, maintainable, and


high-quality systems. It not only ensures that the system performs well under its
operational conditions but also lays the foundation for future growth and evolution,
aligning technical decisions with business goals.

4. Give examples of interfaces between components?

Interfaces between components in a software system define how different parts of the
system communicate and interact with each other. They can be in the form of APIs,
protocols, messaging systems, or data exchanges. Here are some examples of
interfaces between components:

- Web API (RESTful API)


● Component A (Frontend): A web or mobile frontend that needs to fetch
data from the server.
● Component B (Backend API): The backend service exposes a RESTful
API for the frontend to retrieve user information.
● Interface: The interface is an HTTP-based REST API where the frontend
sends an HTTP GET request to
https://api.example.com/users/123 and the backend responds
with the user's data in JSON format.
- Database Interface
● Component A (Application Layer): A service that processes orders in an
e-commerce system.
● Component B (Database): A relational database that stores order details.
● Interface: The application layer interacts with the database using SQL
queries (SELECT, INSERT, UPDATE) to store and retrieve order data.
- Message Queue (e.g., RabbitMQ, Kafka)
● Component A (Order Processing Service): A service responsible for
handling orders.
● Component B (Inventory Service): A service that manages inventory
updates.
● Interface: The order processing service publishes a message to a
message queue (e.g., RabbitMQ or Kafka) when an order is placed. The
inventory service subscribes to the queue and listens for new orders to
update stock levels accordingly.

- File-Based Interface

● Component A (Data Export Service): A service that exports data to CSV


files.
● Component B (Data Import Service): A service that imports CSV files
and processes them for analytics.
● Interface: The two components communicate via the filesystem.
Component A writes data to a CSV file in a shared directory, and
Component B reads the file to process the data.
- Shared Memory Interface
● Component A (Image Processing Module): A component that
processes raw image data.
● Component B (Data Analysis Module): A component that analyzes the
processed image data.
● Interface: Both components share access to a block of memory where
image data is written by Component A and read by Component B. This is
common in high-performance computing systems.
- Remote Procedure Call (RPC)
● Component A (User Service): A service that manages user accounts.
● Component B (Notification Service): A service that sends notifications
to users.
● Interface: Component B makes a remote procedure call (RPC) to
Component A to fetch user contact details and then sends a notification.
The RPC could use gRPC or a similar protocol to handle this
communication.
- Third-Party Integration via OAuth
● Component A (Internal CRM): A customer relationship management
system that needs to fetch data from a third-party service like Google or
Facebook.
● Component B (External OAuth Provider): A third-party service like
Google that manages user authentication.
● Interface: The internal CRM integrates with the third-party service using
OAuth 2.0. Component A sends a request to Component B for an OAuth
token, which is then used to fetch user information.
- Microservice-to-Microservice Communication (gRPC)
● Component A (User Service): A microservice that handles user
registration.
● Component B (Billing Service): A microservice that manages billing and
subscription.
● Interface: The user service calls the billing service using gRPC, which
defines the method signatures and data formats for the services to
communicate over HTTP/2.
- Service Bus (e.g., Azure Service Bus)
● Component A (Order Service): A service that processes customer
orders.
● Component B (Payment Service): A service that handles payments.
● Interface: The order service sends a message to a service bus once an
order is completed. The payment service listens to the bus and processes
the payment accordingly.
- SOAP API
● Component A (Client Application): An enterprise client application that
needs to retrieve customer details.
● Component B (Backend Service): A SOAP web service that exposes
customer details.
● Interface: The client sends a SOAP request in XML format to the backend
service, which responds with a structured XML document containing the
customer information.

5.What are problems of Software reuse?

While software reuse offers many benefits, such as reducing development time and
cost, improving quality, and fostering consistency across applications, it also presents
several challenges and problems. Here are some key issues associated with software
reuse:

- Increased Complexity in Management


● Problem: Managing a reusable component can become complex over
time, especially if it needs to serve multiple systems with different
requirements. Ensuring that the component remains flexible enough to be
reused across various contexts without overcomplicating it is a challenge.
● Impact: It may lead to a bloated component with unnecessary features or,
conversely, an underdeveloped component that cannot be reused
effectively in different scenarios.
- Integration Issues
● Problem: Reusing software components, libraries, or modules can lead to
integration problems due to differences in technologies, platforms, or
architectural patterns. A component that works well in one system may not
integrate smoothly into another.
● Impact: Time and effort may be required to adapt the reused components
to fit the new system, negating some of the benefits of reuse.
- Lack of Documentation
● Problem: Many reusable components suffer from insufficient or outdated
documentation, making it difficult for developers to understand how to
effectively integrate and use them.
● Impact: Without clear guidance, developers may misuse or improperly
integrate the component, leading to bugs or reduced performance.
- Versioning and Maintenance
● Problem: Managing multiple versions of reusable components can
become complicated. Different projects might rely on different versions,
and updating or maintaining them can cause compatibility issues across
systems.
● Impact: An update to a shared component may break functionality in other
systems, leading to increased maintenance costs.
- Reduced Flexibility
● Problem: Reused software components are often designed with a
particular set of requirements in mind. If the new system has different
requirements, adapting the component can be difficult or impossible.
● Impact: Developers may have to either modify the component extensively
or abandon reuse, resulting in a loss of the expected benefits.
- Quality Assurance Concerns
● Problem: Even though the reused component may have been tested in
other systems, it may not behave the same way in a new context due to
different integration environments or dependencies.
● Impact: Reused components require additional testing in the new system
to ensure they meet the new system’s specific requirements, which can
negate some of the time and cost savings.
- Dependency on External Code
● Problem: Relying on third-party or open-source components introduces
risks of dependency on external sources. If these components become
unsupported or no longer updated, it could compromise the integrity or
security of the system.
● Impact: Projects could become stuck using outdated libraries or
frameworks that may have security vulnerabilities or performance issues.
- Intellectual Property (IP) and Licensing Issues
● Problem: Reusing software components, especially open-source or third-
party libraries, can introduce legal issues regarding licensing. Some
components may have restrictions on commercial use, redistribution, or
modification.
● Impact: Failure to comply with licensing terms can lead to legal
consequences, and in some cases, components may need to be replaced
if the licensing terms are too restrictive.
6. Give examples of 3 types of software reuse?

6. COTS Reuse (Commercial Off-The-Shelf)

Definition: COTS reuse involves using pre-built, commercially available software


systems or components in new applications with little or no modification. This approach
leverages existing solutions to save development time and costs.
● Example: Integrating a Customer Relationship Management (CRM) system like
Salesforce into a new business application. Instead of developing a CRM from
scratch, the existing system is incorporated with minimal changes.
2. Component Reuse
Definition: Component reuse involves reusing software components, which can range
from small functions to entire subsystems, in different applications. These components
are designed to be modular and can be easily integrated into new systems.
● Example: Reusing a payment processing module across different e-commerce
platforms. This module handles transactions, integrates with various payment
gateways, and can be plugged into any e-commerce site to manage payments.
3. Object and Function Reuse
Definition: Object and function reuse involves reusing individual software objects or
functions that perform specific, well-defined tasks. These reusable elements are often
part of libraries or frameworks.
● Example: Utilizing a library for mathematical functions, such as NumPy in Python,
across various scientific computing projects. Individual functions or objects from
the library, like matrix operations or statistical calculations, are reused in
different applications.

7. Explain the following phrase: "the risk of over-engineering your systems"

"The risk of over-engineering your systems" refers to the potential danger of designing
or developing a system with more complexity, features, or detail than is necessary for its
intended purpose. Over-engineering can occur when developers or designers try to
account for too many possible scenarios, anticipate future needs that may never arise,
or aim for an overly perfect solution. While the goal might be to make the system robust
or future-proof, this often leads to wasted time, higher costs, and unnecessary
complications.

Why is it a risk?
1. Increased Development Time and Costs: When a system is over-engineered,
the development process becomes longer because more features and
complexity are added. This can drive up costs and delay project timelines.
2. Difficult Maintenance and Updates: The more complex a system is, the harder
it is to maintain and update. Developers might struggle to understand the over-
engineered components, making it time-consuming to fix bugs or add new
features.
3. Reduced Performance: Sometimes, adding too many features or making the
system too modular can decrease its performance. A system that tries to do
everything might not excel at anything in particular, making it less efficient.
4. Wasted Resources: Over-engineering can mean that resources (like developer
time, server capacity, or financial investments) are used for features that aren’t
necessary or valuable for the user.

Example of Over-engineering

Imagine a small online store that sells a limited range of products. The initial goal is to
build a basic e-commerce site where users can browse products, add them to the cart,
and check out. However, the development team starts adding unnecessary features like
a complex recommendation system powered by AI, an overly detailed user preference
management system, or multi-language support when the store only serves one region.

Instead of focusing on getting the store up and running with essential features, they
spend months adding functions that the business doesn’t yet need. The store takes
much longer to launch, costs far more to develop, and the business has invested in
capabilities that won't be useful until much later—if ever.

8. Example, pros and cons of client server architecture?

Advantages of client-server model

- Centralization

The fundamental benefit of a client-server network is that it allows for centralized


management—all the information you can find in one place. Because the network
administrator has complete control over management and administration, this is
extremely advantageous. Any issue that arises throughout the whole network may be
resolved in one location. It also becomes easier to upgrade data.

- Adaptability

Customers can easily expand the number of clients or servers. Because the server is
centralized, there are no concerns regarding authorization to network resources growing
in size. As a result, the setups only require a small number of people.

- Protection
Because of the centralized design of a client-server network, data is adequately
secured. So only if you’re an authorized user can you access the data via login and
password and two-factor authentication. In addition, if the data is lost, the records can
be recoverable quickly with one backup.

- Operation

It is simple to handle files because they are all kept on a single server. A client-server
network can simply monitor and access necessary file records.

Disadvantages of Client Server Network

1. Traffic Congestion

The primary disadvantage of client server network is the traffic congestion it undergoes.
If too many clients make request from the same server, it will result in crashes or
slowing down of the connection. An overloaded server creates many problems in
accessing informations.

2. Robustness

As we all know client server networks are centralized. In case if the main server
happens to undergo failure or interference, then the whole network will be disrupted.
Therefore, client server networks lacks on the side of robustness.

3. Cost

The cost involved in setting up and maintaining the server is usually high in client server
network as it does on the network operations. Since the networks are powerful they can
be expensive to purchase. Hence, not all the users will be able to afford them.

4. Maintenance

When the servers are implemented, it is going to work non-stop. Which means it must
be given proper attention. If there are any problems, it must be resolved immediately
without any delay. Hence, there should be a specialized network manager appointed to
maintain the server.

5. Resources

Not all the resources that is present on the server is acquirable. For an example, it is
not possible to print a document on the web directly or edit any informations on the
client hard disk drive.

For example:
Advantage: Centralization

Example: In a bank, all customer account data is stored on a centralized server.


Employees at various branches can easily access customer information from this
system, allowing them to quickly process transactions or update customer details
without needing to update data at each branch individually.

Disadvantage: Traffic Congestion

Example: During peak times like the end of the month, many customers simultaneously
access the online banking services to check their accounts or perform transactions. This
leads to the bank's server becoming overloaded, causing the system to slow down or
even crash, disrupting service for both customers and branch employees.

9. Explain and give an example of SOA?

Service-oriented architecture (SOA) is a software development model that makes


services reusable and lets them communicate across different platforms and languages
to form new applications. An SOA service is a self-contained unit of software designed
to complete a specific task. Applications use SOA and simple interface standards to
access services to form new applications.

SOA creates interoperability between apps and services. It ensures existing


applications can be easily scaled, while simultaneously reducing costs related to the
development of business service solutions.

Example of SOA:

Scenario: An e-commerce platform with various services.

● Inventory Service: Keeps track of products in stock and updates quantities after
sales.
● Payment Service: Processes payments from customers through different
methods (credit cards, PayPal, etc.).
● Shipping Service: Handles the logistics of shipping orders, including tracking
and delivery updates.
● Customer Service: Manages customer profiles, preferences, and purchase
history.

Each service operates independently but communicates with others when needed. For
instance, when a customer places an order, the system calls the Payment Service to
process the payment, the Inventory Service to check product availability, and the
Shipping Service to arrange delivery.

Because these services are loosely coupled, the platform can update or replace one
service (e.g., adding a new payment method) without affecting the others. This flexibility
allows the e-commerce platform to scale and adapt to new business needs efficiently.

10. Explain and give an example of Microservices architecture?

Microservices Architecture:

Microservices architecture is a design approach where a large application is broken


down into small, independent services. Each service is focused on a specific business
function, such as user management, payment processing, or notifications. These
services communicate with each other using lightweight protocols like HTTP or
messaging queues. Unlike monolithic architectures, where the entire application is
tightly coupled, microservices allow each component to be developed, deployed, and
scaled independently.

Key benefits of microservices include flexibility, scalability, and ease of maintenance, as


developers can update or replace individual services without affecting the rest of the
system.

Example of Microservices in Spotify:


Spotify, the popular music streaming platform, uses microservices architecture to
manage its vast and dynamic system. Here’s how it works:

● User Profile Service: Manages user accounts, playlists, and preferences.


● Recommendation Service: Suggests new songs, albums, or playlists based on
a user's listening history and preferences.
● Streaming Service: Manages music playback, ensuring smooth and fast
delivery of songs.
● Search Service: Allows users to search for songs, albums, artists, and playlists.
● Billing Service: Handles subscription payments and renewals.

Each of these services operates independently but communicates with others through
APIs. For example, when a user opens Spotify and starts playing a song, the
Streaming Service delivers the audio, while the Recommendation Service updates
the suggestions based on the song being played. The Billing Service ensures that the
user has an active subscription.
11. Microservices often communicate through the HTTP protocol, which allows them to
interact with each other using standard HTTP methods like 'GET, POST, PUT, and
DELETE. ' This 'RESTful API' communication ensures decoupled services and platform
independence. Microservices also communicate with each other through network
protocols and messaging mechanisms. Some of the common methods of their
communication are: HTTP/HTTPS, Messaging Queues, RPC (Remote Procedure
Calls), Event Streaming, Service Mesh. These communication mechanisms enable
microservices to interact effectively in distributed systems, facilitating scalability,
resilience, and maintainability.

12. Solution Architects focus on the big picture and aligning technology with business
goals, while Technical Architects delve into the details of implementing and maintaining
IT solutions. In particular, there are some key differences:

- Education and Training: Solution Architects may have a stronger background in


business or management, while Technical Architects often have more technical
expertise.

- Work Environment: Technical Architects may be more involved in specific IT


implementation projects, while Solution Architects have a broader focus on overall IT
strategy.

- Job Duties:

· Solution Architects are responsible for identifying and designing IT solutions that
align with an organization's goals. They focus on business needs and how technology
can enable them.

· Technical Architects are more hands-on, ensuring that technical implementations


are feasible, efficient, and meet the organization's requirements. They often work
closely with development teams.

- Skills:
· Solution Architects may have stronger skills in business analysis, strategic
thinking, and communication with non-technical stakeholders.

· Technical Architects often have deeper expertise in specific technologies, software


development, and infrastructure design.

13. I think there are 3 things need to do:

- Embrace lifelong learning: Continuously updating knowledge and skills. This can be
achieved through attending workshops, webinars, or online courses, reading books and
articles, or joining professional organizations. By staying informed about the latest
trends and developments, it can enhance the performance and expand horizons.

- Adopt digital tools: In order to increase productivity, foster creativity, and better
comprehend difficult ideas, learners should become familiar with digital tools and
platforms. These resources can include interactive learning platforms for virtual and
augmented reality as well as software for developing, modeling, or analyzing data.

- Focus more on User-Friendly Architecture:

● Flexibility: Create spaces that can be easily reconfigured to meet the evolving
needs of users. Consider factors like workspace flexibility, collaboration areas,
and technology integration.
● Future-Proofing: Design for user experiences that anticipate future technological
advancements, such as virtual reality, augmented reality, or wearable devices.

14.

- When to use SaaS

SaaS may be the most beneficial option in several situations, including:

· Startups or small companies that need to launch e-commerce quickly and don’t
have time for server issues or complex on-premises software

· Short-term projects that require quick, easy, and affordable collaboration

· Applications that aren’t needed too often, such as tax software

· Applications that need both web and mobile access

- When to use PaaS

Using PaaS is beneficial, sometimes even necessary, in several situations. For


example, PaaS can streamline workflows when multiple developers are working on the
same development project. If other vendors must be included, PaaS can provide great
speed and flexibility to the entire process. PaaS is particularly beneficial if you need to
create customized applications. This cloud service also can greatly reduce costs and
simplify some of the challenges that arise if you are rapidly developing or deploying an
application.

- When to use IaaS

Just as with SaaS and PaaS, there are specific situations when IaaS is most
advantageous.

· Startups and small companies may prefer IaaS to avoid spending time and money
on purchasing and creating hardware and software.

· Larger companies may prefer to retain complete control over their applications and
infrastructure, but they want to purchase only what they actually consume or need.

· Companies experiencing rapid growth like the scalability of IaaS, and they can
change out specific hardware and software easily as their needs evolve.

15. Google Cloud consists of a set of physical assets, such as computers and hard disk
drives, and virtual resources, such as virtual machines (VMs), that are contained in data
centers around the globe. Google Cloud Platform (GCP) is also a suite of cloud
computing services offered by Google that includes a variety of infrastructure and
platform services for businesses and developers. GCP, which leverages Google’s
extensive global infrastructure, enables organizations to efficiently build, deploy, and
scale applications and services. The platform offers a variety of services for businesses
and developers, including infrastructure and platform services. Some of the key features
of the platform are application development and deployment, big data and analytics,
machine learning and artificial intelligence, storage and databases, networking
solutions, the Internet of Things, and DevOps and continuous integration/continuous
deployment.

You might also like