Mada za sehemu hiiBuilding structures of the softwareMada 3
- Designing system architecture
- Designing data models
- Designing user interface
System architecture is the structured design that defines how all the parts of a software system interact, how data moves between them, and how the system is deployed. Choosing the right architecture is crucial because it determines whether a system can grow, be easily updated, and perform well.
System architecture is the blueprint of a software system. It shows the components (such as user interfaces, processing logic, and databases), how these components are connected, and how data flows through the system. A well-designed architecture ensures that the system meets user needs while remaining efficient, scalable, and easy to maintain.
A good architecture affects three key areas:
- Scalability – The ability of the system to handle more users or data when the organisation grows.
- Maintainability – How easily the system can be updated, fixed, or improved over time.
- Performance – How fast and reliably the system responds to user requests.
For example, a hospital system that works well for 50 patients may slow down or fail when asked to handle 500 patients if the architecture was not designed to scale.
There are three main types of software architecture that you need to understand: Client-Server, Monolithic, and Microservices.
Client-Server Architecture
In client-server architecture, the system is divided into two main parts:
- Client – The front-end application that users interact with. It handles the presentation layer (user interface). Examples include a web browser, mobile app, or desktop application.
- Server – The back-end that processes data, runs business logic, and manages the database. The server stores and retrieves information.
These two parts communicate over a network such as the internet or a local area network (LAN).
Example: A student portal at a university. Students use their laptops or phones (clients) to log in and view their grades. The grades are stored and retrieved from the university's database server.
[Student's Phone/Computer] -----> [University Server] -----> [Database]
(Client) (Server) (Data)
Monolithic Architecture
In a monolithic architecture, all parts of the system (user interface, business logic, and data access) are combined into a single, tightly integrated unit. Everything runs together as one application.
Characteristics:
- All components are built, deployed, and maintained as one unit.
- Suitable for small systems with simple functions.
- Difficult to scale, modify, or debug as the system grows larger.
Example: A traditional e-commerce website where product listings, user login, shopping cart, and payment processing are all contained in a single system. If the payment system needs updating, the entire website may need to be rebuilt and redeployed.
Microservices Architecture
In a microservices architecture, the system is broken down into small, independent services. Each service handles a specific function (such as user authentication, payments, or product management). These services communicate with each other through APIs (Application Programming Interfaces).
Characteristics:
- Each microservice can be developed, updated, and deployed independently.
- Highly scalable – you can add more copies of a specific service without affecting others.
- More complex to develop and maintain because services must coordinate with each other.
Example: A social media platform like Instagram or Facebook. One service handles user profiles, another handles posting content, another handles notifications, and another handles advertisements. Each service works independently, and the system can scale up the notification service during peak times without affecting other services.
| Feature | Client-Server | Monolithic | Microservices |
|---|---|---|---|
| Structure | Two-tier (client and server) | Single unit | Multiple independent services |
| Scalability | Moderate | Difficult | Easy |
| Maintenance | Moderate | Difficult (as system grows) | Easier (services updated separately) |
| Complexity | Low | Low | High |
| Example | Student portal, email system | Small e-commerce website | Large platforms like Netflix, Uber |
The choice depends on the system's size and needs:
- Use Client-Server for simple systems where separation of client and server is enough.
- Use Monolithic for small projects with limited functions and a small development team.
- Use Microservices for large, complex systems that need to handle high traffic and require frequent updates.
Consider a Library Management System for a secondary school in Tanzania. The system should allow students to search for books, borrow books, and return books. Librarians should be able to add new books and track borrowing records.
Analysis:
- This is a small to medium-sized system used within a school.
- Multiple users (students, librarians) will access the system.
- The system needs to store book records, student records, and borrowing transactions.
Recommended Architecture: Client-Server
For a school library system, a client-server architecture is appropriate because:
- It is simple to implement and maintain for a school environment.
- Students and librarians (clients) can access the system from different computers.
- The library database (server) can be stored on the school's server.
- It is easier to secure within a school's local network.
How it works:
- Librarians use a computer in the library to add books and manage borrowing records (client).
- Students use computers to search for book availability (client).
- All data is stored in a central database server managed by the school.
[Student Computer] [Librarian Computer] [School Server]
| | |
|---- Search books ----->| |
| |---- Query database --->|
|<--- Book info ---------|<--- Results -----------|
| | |
|---- Borrow request -->| |
| |---- Update record ---->|
|<--- Confirmation -----|<- Success -------------|
In groups, analyse the following systems and suggest an appropriate architecture:
-
A mobile money platform like M-Pesa that handles millions of transactions daily.
- Answer: Microservices architecture – each function (deposits, withdrawals, transfers, notifications) runs as a separate service that can scale independently.
-
An online learning platform where students watch video lessons.
- Answer: Client-Server or Microservices – the video content is served from specialized servers while user accounts are managed separately.
-
A small clinic patient registration system used by one receptionist.
- Answer: Monolithic or Client-Server – simple enough for a single integrated system.
In Tanzania, a small retail shop owner in Dar es Salaam might use a simple point-of-sale (POS) system with client-server architecture. The cash register (client) sends sales data to a central computer (server) that tracks inventory and generates daily sales reports. If the shop grows into a chain with multiple branches, the owner might later upgrade to a microservices architecture to manage inventory, payments, and customer accounts separately across all locations.
Jinsi utakavyotathminiwaTathmini ya mchakato · Tathmini ya matokeo · Tathmini ya maarifa
Tathmini ya mchakato
- Create basic architecture diagrams showing key components and their interactions.
- Design architectures based on scalability,reliability, and efficiency.
Tathmini ya matokeo
Well-documented system architecture diagrams that outline components, interactions, and deployment environments.
Tathmini ya maarifa
Detailed knowledge of:
Method used: The student should explain how to
- justify the architectural designs.
Principles: The student should explain the principles of:
- modularity, scalability, and maintainability.
Theories: The student should explain:
- concepts like multi-tier architecture (e.g., clientserver, 3-tier systems).
- architectural patterns such as MVC, microservices, and layered architecture.
Circumstantial knowledge:
Detailed knowledge about:
- trade-offs in design, such as cost versus scalability or performance.
Swali
What is system architecture?
Ingia ili kuwasilisha jibu lako na lihesabiwe katika umahiri wako.
Ingia ili kufanya mazoeziMwalimu
Umekwama? Niulize chochote kuhusu mada hii.
Ingia ili kumuuliza Mwalimu wa AI wa Sonza kuhusu swali hili.
Ingia ili kuulizaMajadiliano
Hakuna maswali bado