Product developmentManual web testingHow does the web work?

Types of architecture of web applications

8 minutes read

To better comprehend application testing approaches, you should understand the distinctions between architecture types. That's what this topic will cover.

Client-server architecture

Client-server architecture is a computing model where tasks or processes are divided between clients and servers in a network. You learned about this in the last topic. This architecture helps allocate processing power and resources, boosting efficiency and scalability in software systems.

Pros of client-server architecture

Cons of client-server architecture

Scalability. Additional clients can be added easily without affecting the core functionalities of the server

Single point of failure. If the server has any issues, it might compromise the entire system

Centralized data management. Centralized data storage on servers ensures system consistency and integrity

Latency. Dependence on network communication can cause delays, affecting real-time applications

Resource efficiency. Clients can be lightweight, focusing on user interfaces, while server handles data processing and storage

Initial setup complexity. Setting up a client-server architecture may be more complex than standalone applications

Easier maintenance. You can make updates or changes on the server side, reducing the need for modifications on the client side

Dependency on network stability. The system's functionality heavily depends on a stable and reliable network connection

Testing client-server architecture comes with some challenges. Testers should be aware of the following points:

  • Different network conditions can affect the application's performance. Simulating scenarios with varying speeds helps uncover potential problems.

  • Data usually resides on the server, requiring strict checks for consistency between the client and server. Testers need to pay close attention to data synchronization, making sure that updates made on the client are accurately reflected on the server and vice versa.

  • The server handles multiple client requests at the same time, making load management understanding vital. Conducting load testing is crucial to assess how the server performs under different loads, to identify possible bottlenecks, and to ensure the system's scalability.

  • Both the client and server sides can encounter errors, emphasizing the need for solid error handling. Testers should thoroughly check how the application responds to different error scenarios, ensuring clear error messages and smooth recovery from failures.

  • Client-server applications involve sensitive data exchanges, requiring rigorous security testing. Such testing should focus on detecting vulnerabilities in data transmission and storage, ensuring encrypted communication channels, and strong protection of sensitive information.

  • With multiple clients accessing and updating data simultaneously, concurrency issues might occur. Testers need to confirm that the system appropriately handles concurrent transactions, checking for potential race conditions, deadlocks, and other issues.

  • Clients can differ across devices and platforms, each with its unique characteristics. Comprehensive testing on different client devices and browsers is crucial to maintain a consistent user experience, considering various screen sizes and resolutions.

  • Server-side session management is vital for maintaining user interactions. Testers need to make sure sessions are correctly managed, ensuring proper user authentication and consistent maintenance of session data throughout user interactions.

Microservice Architecture

In a microservice architecture, an application breaks down into independently deployable services that communicate through API interfaces. This method makes the independent deployment and scaling of individual services easier, helping teams deliver high-volume and complex applications more frequently. Moreover, the microservice architecture enables quick roll-out of new features and updates without the need to revamp extensive parts of the existing code.

Microservice architecture has several unique features.

  • Multiple component services. Microservices are distinct, loosely coupled components. Each can be developed, deployed, updated, and redeployed independently without affecting other services or the overall application's integrity. This flexibility allows for the speedy roll-out of individual application capabilities.

  • Easy maintenance and testing. In a microservice architecture, teams can try out new features and easily revert to a prior version if issues emerge. This agility simplifies code updates, speeds up the introduction of new features, and makes bug identification and resolution within individual services easier.

  • Small teams as owners. Independent small teams usually handle individual services in a microservice architecture. This method encourages adopting agile and DevOps methods, enabling teams to work on their own and speed up development cycles.

  • Organising work based on business capability. In a microservice approach, services coalesce around business capabilities. The cross-functional teams possess the necessary skills for development and work together to implement individual functions.

  • Automated infrastructure. Teams managing microservices use infrastructure automation techniques like continuous integration (CI), continuous delivery (CD), and continuous deployment (CD). This allows each team to build and deploy its service independently without disrupting other teams' operations. Furthermore, teams can deploy new versions alongside existing ones.

Pros of microservice architecture

Cons of microservice architecture

Microservices can be developed, deployed, and scaled independently, providing flexibility to adapt to changing demands

Operating a network of microservices can introduce complexities in communication, deployment, and coordination

Each microservice can be developed by a different team, encouraging autonomy and parallel development efforts

Maintaining data consistency among microservices can pose challenges that need careful design and implementation

Developers can choose the most suitable technology stack for each microservice, promoting innovation and specialisation

Managing distributed systems could pose challenges in monitoring, logging, and achieving overall system visibility

Issues in one microservice do not necessarily affect the entire system, facilitating better fault isolation and easier troubleshooting

The initial setup and development of microservices could require additional effort compared to monolithic architectures

For illustration, consider a fictional e-commerce software development project. The system consists of a web application interacting with various microservices, with each providing specific capabilities.

Microservice architecture

Applications interact with microservices through REST APIs shared by each service. The API gateway provides access to microservices' APIs and enables the replacement of one microservice with another that shares the same API.

  • Account service. It provides customer account information, such as address and payment details.

  • Stock service. It provides up-to-date information about available items.

  • Shopping basket service. It lets customers select items for purchase.

  • Payment Service. It facilitates customer payments for items in the shopping basket.

  • Delivery Service. It arranges the packaging and delivery of bought items.

Spotify, the music streaming service, is a good example of microservices application. Spotify's microservices divide into several components, each performing a specific function:

  • User Interface (UI).

  • Search and Recommendations.

  • User Management.

  • Music Playback.

  • Music Catalogue.

  • Statistics and analytics.

  • Payments and so on.

Monolithic Architecture

Monolithic Architecture is a conventional software design method in which all application components are closely integrated and interconnected as a single, unified entity. In this model, the whole application, composed of the user interface, business logic, and data access layer, is developed and deployed as a single codebase. Monolithic architectures are renowned for their simplicity and directness, as they consolidate all functionalities into one cohesive structure. A monolith is a monorepository with all app components included.

Pros of Monolithic Architecture

Cons of Monolithic Architecture

Monolithic architectures are straightforward and easy to understand, simplifying development and maintenance

Scaling a monolithic application is challenging as you have to scale the entire application, not just individual components

Developing and testing a monolithic application is generally easier since all components are within a single codebase

Adopting new technologies for specific functionalities can be difficult because the entire application is typically built on a single technology stack

The entire application is deployed as a single unit, reducing complexities related to deployment

Large monolithic applications may be unwieldy to maintain and update. Minor changes might necessitate redeploying the entire application

Monolithic architectures could provide better performance as there's no overhead related to inter-service communication

If one component within the monolith fails, it can possibly affect the entire application's functionality


Think about a traditional e-commerce application where the frontend, backend, and database are closely integrated into a single codebase. The application handles user authentication, product browsing, shopping cart management, and order processing in a unified structure.

Monolithic Architecture

Difference between microservice and monolithic architectures

The key difference between microservice and monolithic architectures lies in the structure of the application and the interaction between its components.

Difference between microservice and monolithic architectures

In monolithic architecture, the application is developed, deployed, and scaled as one closely integrated unit. All components, such as the user interface, business logic, and database access, all reside within a single code base. These components communicate with each other through in-process communication, usually via function or method calls. They share the same memory space and resources, which simplifies function calls.

In contrast, a microservice architecture breaks the application down into a collection of small, independent services, each focusing on a specific business function. These services are developed, deployed, and scaled individually, and they interact with each other using APIs. Communication among microservices often takes place through network protocols, typically through HTTP/REST or messaging queues. Each microservice operates in its process and can be developed using distinct technologies. These are sovereign units that engage with each other through clear-cut interfaces. Each architecture type tackles its sets of problems. None is superior or inferior to the other.

Conclusion

Each architecture outlines the sequence of interactions between elements and the process of data exchange. The specifics of these processes at a larger scale will be the focus of our next topic.

6 learners liked this piece of theory. 0 didn't like it. What about you?
Report a typo