



















Preview text:
lOMoAR cPSD| 58647650 ASSIGMENT 1 – START
1.1 Why do we need to study Software Architecture and Design? (3 pages)
1.1.1. What is Software Architecture and Software Design?
Software development is a complex process that requires careful planning and
structuring to ensure efficiency, maintainability, and scalability. Two fundamental
aspects that contribute to the success of software systems are software architecture and software design.
a. What is Software Architecture?
Software architecture is the high-level structure of a software system,
defining its components, their interactions, and the overall organization. It serves
as a blueprint for software development, outlining key decisions regarding
scalability, security, and performance.
Key characteristics of software architecture: •
Defines system components and their relationships. •
Establishes communication between components (e.g., APIs, message queues). •
Determines non-functional requirements like security, performance, and scalability. •
Helps teams make informed technical decisions throughout the development lifecycle.
Common software architectural styles include: •
Monolithic Architecture – A single codebase that handles all functionalities. •
Microservices Architecture – A distributed system where functionalities are
broken into independent services. •
Layered Architecture – Separates concerns into different layers (e.g.,
presentation, business logic, data).
b. What is Software Design?
Software design is the process of defining how individual components of a
system will be implemented and interact. While software architecture focuses lOMoAR cPSD| 58647650
on the overall system structure, software design deals with finer details like
algorithms, data structures, and code organization.
Key aspects of software design: •
Defines how software components interact at a detailed level. •
Uses principles like encapsulation, modularity, and reusability. •
Implements architectural decisions through design patterns and best practices. •
Ensures usability, security, and performance at the code level.
Common software design principles: •
SOLID Principles – Guidelines for writing maintainable and scalable code. •
Design Patterns – Proven solutions to recurring design problems (e.g.,
Singleton, Factory, Observer). •
DRY (Don't Repeat Yourself) – Encourages reusability to reduce redundancy.
1.1.2. Importance of Software Architecture
Software architecture is a critical aspect of software development
that influences long-term system success. Understanding its importance
helps developers build software that meets business and technical requirements effectively.
a. Ensuring Scalability and Maintainability •
A well-architected system can efficiently handle increasing user demands. •
Maintainability is improved by modular design, making updates and enhancements easier.
b. Improving System Performance •
Architectural choices affect system speed and resource consumption. •
Proper architectural decisions (e.g., caching, load balancing) enhance performance.
c. Reducing Development and Maintenance Costs lOMoAR cPSD| 58647650 •
Good architecture minimizes technical debt and prevents costly rewrites. •
A structured system design helps teams collaborate efficiently and avoid system failures.
1.1.3. Importance of Software Design
Software design is essential for translating architectural decisions
into functional and maintainable software. Studying software design
ensures: a. Enhancing Code Reusability and Modularity •
Well-designed systems use reusable components, reducing development time. •
Modular code improves collaboration by allowing different teams to work independently.
b. Ensuring Software Reliability and Security •
Good design principles improve error handling and fault tolerance. •
Security-focused design prevents vulnerabilities and data breaches.
c. Supporting Agile and DevOps Practices •
A structured design allows quick adaptations in Agile development. •
A strong design foundation supports Continuous Integration/Continuous Deployment (CI/CD). 1.1.4. Conclusion
Software architecture and design are essential for building high-quality
software. They help developers create systems that are scalable, maintainable, and
cost-effective. By understanding these principles, software teams can ensure
better performance, security, and long-term success of their applications.
1.2 Monolithic and Microservice. Microservice and AGILE ([1] [2] write 7 pages) 1. Introduction lOMoAR cPSD| 58647650
Software architecture defines how applications are structured and built. Two
of the most commonly discussed architectural styles are Monolithic Architecture
and Microservices Architecture. While monolithic architecture has been the
traditional approach, microservices have gained popularity due to their flexibility
and scalability, especially in Agile environments. This section explores the
differences between the two architectures and how microservices complement Agile development practices.
2. Monolithic Architecture
a. What is Monolithic Architecture?
Monolithic architecture refers to a software design where the entire
application is developed as a single, unified unit. All components - such as the
user interface, business logic, and database - are tightly integrated into a single
codebase. b. Characteristics of Monolithic Architecture •
Single Codebase – All functionalities are in one large codebase. •
Tightly Coupled Components – Changes in one module can affect the entire system. •
Single Deployment – The entire application is deployed at once. •
Shared Database – A single database handles all application data.
c. Advantages of Monolithic Architecture
Simplified Development & Deployment – Easy to develop, test, and deploy as a single unit.
Performance Efficiency – No inter-service communication overhead.
Easier Debugging & Troubleshooting – All components reside in one place,
making it easier to trace issues.
d. Disadvantages of Monolithic Architecture
Scalability Issues – Hard to scale specific components independently.
Slower Development – As the system grows, adding new features becomes complex. lOMoAR cPSD| 58647650
Technology Lock-in – Difficult to migrate to new technologies without
rewriting the entire application.
Risk of System Failure – A bug in one part of the system can bring down the entire application.
e. When to Use Monolithic Architecture? Best for: ✔
Small to Medium-Sized Applications – Ideal for startups or simple
applications that don’t require high scalability. ✔
Tightly Coupled Features – If the business logic is highly interdependent,
monolithic is easier to manage. ✔
Quick Prototyping – Faster to develop and deploy since all components are in a single codebase. ✔
Limited DevOps Expertise – Easier to deploy without complex
infrastructure like container orchestration. Not if:
You need frequent deployments without affecting the whole system.
Different parts of the system require independent scaling.
Teams need to work on separate features without conflicts.
3. Microservices Architecture
a. What is Microservices Architecture?
Microservices architecture is a modular approach where an application is
composed of independent services, each responsible for a specific function.
These services communicate through APIs and can be developed, deployed, and scaled independently.
b. Characteristics of Microservices Architecture •
Independent Services – Each microservice handles a specific function
(e.g., authentication, order processing). lOMoAR cPSD| 58647650 •
Decentralized Data Management – Each service can have its own database. •
Independent Deployment – Services can be deployed separately without
affecting the entire application. •
Technology Agnostic – Each service can use different technologies or programming languages.
c. Advantages of Microservices Architecture
Scalability – Individual services can be scaled independently.
Faster Development & Deployment – Teams can work on different services simultaneously.
Improved Fault Isolation – A failure in one service does not bring down the entire application.
Better Maintainability – Easier to update and enhance services independently. d.
Disadvantages of Microservices Architecture
Increased Complexity – Managing multiple services requires careful orchestration.
Higher Deployment Overhead – Requires tools for API management,
containerization, and service discovery.
Data Consistency Challenges – Handling transactions across multiple databases can be complex.
e. When to Use Microservices Architecture? Best for: ✔
Large-Scale, Complex Applications – Works well for platforms handling millions of users. ✔
High Scalability Needs – Individual services can scale separately based on traffic. ✔
Frequent Updates & CI/CD – Supports Agile workflows with independent deployments. lOMoAR cPSD| 58647650 ✔
Diverse Tech Stacks – Different services can use different programming languages and databases. Not if:
The project is small and doesn’t require frequent scaling.
The team lacks DevOps experience (requires Kubernetes, CI/CD pipelines).
Microservices introduce too much complexity for a simple use case. 4.
Comparing Monolithic and Microservices Architecture Feature
Monolithic Architecture
Microservices Architecture Codebase Single, unified Multiple independent services Easy (individual services can Scalability Difficult scale) Services deployed Deployment Entire app deployed at once independently Multiple technologies per Technology Stack Single technology stack service
System failure affects the entire Failure of one service does not Fault Tolerance app impact others
Development Speed Slower for large applications
Faster due to independent teams Maintenance Harder as the system grows
Easier due to modular approach 5. What is Agile?
a. Definition of Agile
Agile is a software development methodology that focuses on iterative
development, collaboration, and flexibility. It emphasizes delivering small,
functional increments of software rather than completing a large project in one
go. Agile enables teams to adapt to changing requirements quickly and improves
customer satisfaction by continuously delivering value.
b. Key Principles of Agile (from the Agile Manifesto)
• Individuals and Interactions Over Processes and Tools – Teams should
focus on collaboration rather than rigid procedures. lOMoAR cPSD| 58647650
• Working Software Over Comprehensive Documentation – Deliver
functional software frequently instead of excessive planning.
• Customer Collaboration Over Contract Negotiation – Involve stakeholders in the development process.
• Responding to Change Over Following a Plan – Be flexible and adjust to new requirements as needed.
c. Agile Development Approaches
Agile is implemented using various methodologies, including:
• Scrum – Uses fixed-length development cycles (sprints) with daily stand- up meetings.
• Kanban – Focuses on continuous delivery and visualizing work using boards.
• Extreme Programming (XP) – Emphasizes frequent releases and test-driven development (TDD). d. Benefits of Agile
Faster Time-to-Market – Frequent releases mean quicker product updates.
Increased Collaboration – Agile encourages cross-functional teamwork.
Higher Quality – Continuous testing improves software reliability.
Greater Flexibility – Agile makes it easier to adjust to new business needs.
6. How Microservices Support Agile Development
a. Microservices and Agile: A Perfect Match
Microservices and Agile complement each other because both prioritize
flexibility, independence, and continuous delivery. Microservices allow
Agile teams to develop, test, and deploy individual services separately, reducing dependencies and bottlenecks.
b. Key Features of Microservices That Align with Agile Feature How It Supports Agile lOMoAR cPSD| 58647650
Agile teams can focus on smaller, independent Modular Architecture
services instead of a large monolithic system.
Teams can release updates for one service without
Independent Deployment affecting the entire application.
Agile encourages teams with diverse skills; Cross-functional Teams
microservices let teams own specific services.
Continuous Integration & Microservices enable rapid development and Deployment (CI/CD)
frequent releases, key goals of Agile.
Agile requires adaptability; microservices allow
Scalability & Flexibility easy scaling of different services.
c. How Agile Teams Work with Microservices
- Small, Autonomous Teams •
In an Agile-microservices environment, teams are structured around
specific services (e.g., an order management team, a payment team). •
Each team works independently, reducing interdependencies.
- Frequent Deployments with CI/CD •
Agile promotes frequent iterations; microservices facilitate continuous
integration and continuous deployment (CI/CD). •
Example: Amazon deploys code every 11.7 seconds using microservices
- Faster Development and Testing •
Each microservice is developed and tested individually, reducing the risk of widespread failures. •
Example: Netflix runs thousands of automated tests daily to ensure service stability.
- Microservices Encourage DevOps Culture •
Agile development often goes hand-in-hand with DevOps, where
developers and operations teams work together. •
Microservices help implement Infrastructure as Code (IaC), making
deployments faster and more reliable.
d. Challenges of Using Microservices with Agile lOMoAR cPSD| 58647650 •
Increased Complexity – Managing multiple services requires strong DevOps practices. •
Service Communication Issues – Requires well-defined APIs and message brokers. •
Testing Difficulties – Testing microservices in isolation and integration
requires robust test strategies.
7. Real-World Examples of Microservices in Agile Environments
E-commerce Platform (e.g., Amazon, eBay) •
Agile Aspect: Teams work independently on shopping cart, payment, and recommendation services. •
Microservices Example: The order service is separate from the inventory
service, allowing updates to pricing without affecting transactions.
Streaming Service (e.g., Netflix, Spotify) •
Agile Aspect: Continuous experimentation and A/B testing for personalized recommendations. •
Microservices Example: The content delivery service is independent from
the user profile service, allowing Netflix to scale based on demand.
Ride-Sharing App (e.g., Uber, Grab) •
Agile Aspect: Frequent updates to driver and passenger experiences. •
Microservices Example: The ride-matching service is separate from the
payment service, ensuring reliability even if one service goes down. 8. Conclusion
The choice between monolithic and microservices architecture depends on
business needs, team expertise, and scalability requirements. While monolithic
architecture is suitable for small to medium applications, microservices offer
flexibility and scalability, making them ideal for large-scale, Agile-driven
development environments. By integrating microservices with Agile
methodologies, organizations can achieve faster development cycles,
improved resilience, and better scalability. lOMoAR cPSD| 58647650
1.3 Decomposing a Software System into Microservices
a. Decomposing an E-commerce System Business Requirements
An e-commerce platform (like Amazon) needs:
✔ Product catalog management
✔ User authentication & profiles
✔ Shopping cart & checkout ✔ Order processing
✔ Payment gateway integration ✔ Inventory management
✔ Review & rating system
Microservices Breakdown Service Functionality User Service
Manages users, authentication, roles Product Service
Handles product catalog, categories, pricing Cart Service Stores items added by users Order Service
Manages order placement and tracking Payment Service
Integrates with payment gateways (PayPal, Stripe) Review Service
Manages product reviews and ratings Inventory Service Tracks stock availability Shipping Service
Handles order fulfillment and delivery lOMoAR cPSD| 58647650
b. Decomposing a Medicine System Business Requirements
A healthcare management system needs:
✔ Patient registration & records
✔ Doctor scheduling & appointments ✔ Prescription management ✔ Medical billing ✔ Pharmacy inventory lOMoAR cPSD| 58647650
Microservices Breakdown Service Functionality Patient Service
Manages patient records, history Doctor Service
Stores doctor profiles, specializations Appointment Service
Handles scheduling and availability Prescription Service
Manages electronic prescriptions Billing Service
Handles invoices, payments, and insurance Pharmacy Service
Tracks drug inventory and orders lOMoAR cPSD| 58647650 lOMoAR cPSD| 58647650
c. Decomposing a Tourist Assistant System Business Requirements
A tourism assistant platform (like TripAdvisor) needs:
✔ User profile & authentication
✔ Destination search & recommendations
✔ Hotel & flight booking ✔ Itinerary planning
✔ Review & rating system
Microservices Breakdown Service Functionality User Service
Handles registration, authentication Destination Service Manages places, attractions Booking Service
Handles hotels, flights, tours Itinerary Service
Generates personalized travel plans Review Service Allows users to post feedback lOMoAR cPSD| 58647650
d. Decomposing a University Management System Business Requirements
A university system (like a digital campus) needs:
✔ Student enrollment & records ✔ Course management
✔ Faculty & staff profiles ✔ Timetable scheduling ✔ Examination & grading lOMoAR cPSD| 58647650
Microservices Breakdown Service Functionality Student Service
Manages student data, enrollment Course Service
Stores course details, schedules Faculty Service
Handles instructor assignments Exam Service
Manages tests, grading, results Library Service
Manages books, borrowing, digital resources lOMoAR cPSD| 58647650 lOMoAR cPSD| 58647650
e. Decomposing a Grab Car Management System Business Requirements
A ride-hailing service (like Uber or Grab) needs:
✔ Driver & passenger profiles ✔ Ride matching ✔ Fare calculation ✔ Payment processing ✔ GPS tracking
Microservices Breakdown Service Functionality User Service Handles passenger accounts Driver Service
Stores driver profiles, licenses Ride Matching Service Assigns rides to drivers Pricing Service Calculates fares dynamically Payment Service
Processes transactions securely lOMoAR cPSD| 58647650