Software Architecture Assignment - 2

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 18
At a glance
Powered by AI
The key learnings from designing the architecture of the Blinkit application include the importance of identifying architecturally significant requirements and using appropriate tactics and design patterns to address them.

The three architecturally significant requirements identified for the Blinkit application are reliability, performance, and security.

One tactic recommended to address the reliability requirement is using redundant servers and load balancers to ensure high availability. This involves duplicating critical components so that if one fails, its functions can be quickly taken over by a redundant component, reducing disruptions.

Software Architecture Assignment - 2

Name : Karthik Sureshkumar Halakatti


BITS ID : 2022MT93511
M.Tech Software Engineering,
Work Integrated Learning Program
Application chosen : blinkit
Blink Commerce Private Limited, d/b/a Blinkit and
formerly Grofers, is an Indian instant delivery
service. It was founded in December 2013 and is
based out of Gurgaon.
Customers of the company use a mobile
application to order groceries and essentials online.
Blinkit's employees then secure the items from their
warehouse and deliver the items to the consumer
within 10 minutes.By November 2021, the company
was delivering 1.25 lakhs order every day.Blinkit
currently operates in more than 30 cities in India
Activity 1 : Identify top 3 Architecturally Significant Requirements (ASRs) and write them in
the form of a Utility tree. Why are these architecturally significant?

Top 3 Architecturally Significant Requirements (ASRs) and Utility tree of blinkit


app :
Blinkit is a smart retail platform that allows customers to browse products, make
purchases, and receive personalized recommendations using smart screens
placed in physical stores. The platform has the following ASRs:
1) Reliability
2) Performance
3) Security
Top 3 Architecturally Significant Requirements (ASRs) and Utility Tree of blinkit app :
1. Reliability: The system needs to be available at all times to ensure customers can access and use the platform without
interruption. To address this requirement, the following tactics can be employed:

i) Use redundant servers and load balancers to ensure high availability.

ii)Implement automatic failover mechanisms to quickly recover from server failures.

iii)Use a distributed caching system to reduce the number of database queries and improve performance.

2. Performance: The system needs to respond quickly and smoothly to user interactions to provide a seamless user experience. To
address this requirement, the following tactics can be employed:

i) Use a front-end framework that allows for fast rendering of the user interface.

ii) Implement a caching system to reduce server load and improve response times.

iii) Use a content delivery network (CDN) to serve static assets quickly to users.

3. Security: The system needs to ensure that user data is secure and protected from unauthorized access or modification. To
address this requirement, the following tactics can be employed:

i) Use encryption to protect sensitive data such as user credentials and payment information.

ii) Implement access controls to prevent unauthorized access to sensitive data.

iii) Use security monitoring tools to detect and respond to security threats.
Activity 2 : Describe in detail, the tactics you recommend for each ASR. For example, if caching is a tactic
you recommend, please mention what you will cache, what tool you would use, how it will work, etc.

To address the Architecturally Significant Requirements (ASRs) for the Blinkit application, the following
tactics can be employed:
1.Reliability Tactics:
i)Redundancy and Failover: Use multiple servers in different regions to ensure high availability.
Implement automatic failover mechanisms to quickly recover from server failures. Use load balancers to
distribute traffic evenly across servers and avoid overloading any one server.
ii)Distributed Caching: Use a distributed caching system such as Redis to reduce the number of
database queries and improve performance. This will also help in reducing the load on the servers and
ensure faster response times.
iii)Monitoring and Alerting: Use monitoring tools like AWS CloudWatch to continuously monitor the
application and receive alerts in case of any issues. Set up automated scripts to handle common issues
such as server restarts, service restarts, etc.
2. Performance Tactics:

i) Front-end Optimization: Use a front-end framework such as React that allows for fast rendering of the user interface. This will
ensure faster page loads and provide a better user experience.

ii) Caching: Use a caching system such as Varnish to reduce server load and improve response times. Cache frequently accessed
pages and resources to avoid generating the same content repeatedly.

iii) Content Delivery Network (CDN): Use a CDN such as Cloudflare to serve static assets quickly to users. This will ensure faster
page loads and better performance for users in different geographic locations.

3. Security Tactics:

i) Encryption: Use encryption to protect sensitive data such as user credentials and payment information. Implement HTTPS to
ensure that all communication between the server and client is secure.

ii) Access Controls: Implement access controls to prevent unauthorized access to sensitive data. Use multi-factor authentication to
add an extra layer of security to user accounts.

iii) Security Monitoring: Use security monitoring tools such as AWS GuardDuty to detect and respond to security threats. Set up
alerts for any suspicious activity and investigate any alerts to ensure that the system is secure.

Overall, by implementing these tactics, the Blinkit application can ensure reliability, performance, and security, and provide a seamless
user experience to customers.
Activity 3 : Draw 2 software architecture diagrams -
component & connection view and deployment view – to
understand how the system works.
Component and Connection View

In this diagram, we have two main components: the Client


and the Server. The Client includes the User Interface (UI),
Controllers, Views, Models, Authentication (Auth), and the
API Client. The Server includes the API Server, Controllers,
Views, Models, Authentication (Auth), the Database (DB),
and the Caching component.

The arrows indicate the connections between the different


components. For example, the Authentication component is
used by both the Client and the Server, and the API Client
communicates with the API Server.

This diagram provides a high-level overview of the different


components and their connections, which can help in
understanding the overall architecture of the Blinkit
application.
Deployment View
Deployment View
1. In this diagram, we have four main components: the User Interface (UI), the Load Balancer
(LB), and two instances of the API Server. The User Interface component runs on the client-
side and communicates with the API Server to fetch and display data.
2. The Load Balancer component distributes the traffic evenly across the two instances of the
API Server, which are identical and run the same code. This ensures that the application can
handle a high volume of requests and provides a high level of availability.
3. Each API Server instance includes the Controllers, Views, Models, Authentication (Auth), the
Database (DB), and the Caching component. These components work together to provide the
necessary functionality for the Blinkit application.
4. This diagram provides a high-level overview of the deployment architecture of the Blinkit
application, which can help in understanding how the different components are deployed and
connected to each other.
Activity 4 : Indicate important messages between components by labelling the connections in
the C&C view. Also indicate the communication method used.
Components in C&C View
Components in C&C View

● In the C&C diagram, labeled connections between the different components to


indicate the important messages being passed between them. For example, we
can see that the Authentication component receives requests for authentication
from the API Client, and the API Client sends requests to the API Server.
● Similarly, we can see that the API Server sends requests to the Controllers, which
in turn send responses to the Views. The Views fetch data from the Models, which
store data in the Database and cache it using the Caching component
● By labeling these connections, we can better understand the flow of data and
messages between the different components, which can help in understanding the
overall architecture and behavior of the Blinkit application.
5. Sequence diagram for one major scenario - Login Process in Blinkit App
Sequence diagram for Login Process in Blinkit App

● In this sequence diagram,the User initiates the process by performing a login action on the UI,
which sends a request to the API Client.
● The API Client forwards the request to the API Server, which authenticates the user's
credentials using the Auth component. Once the user is authenticated, the API Server fetches
the user's data from the Controllers, which in turn query the data from the Models.
● The Models fetch the data from the Database and cache it using the Cache component. Once
the data is cached, the Models return the data to the Controllers, which return it to the API
Server.
● The API Server then returns the user data to the API Client, which sends it back to the UI.
Finally, the UI displays the user data to the User.
● This sequence diagram helps to visualize the flow of messages and actions between the
different components during the login process, which can aid in understanding the behavior of
the Blinkit application.
6. State the architecture patterns used. Explain, where in the architecture, these patterns have
been used.

The architecture patterns used in the Blinkit application are:

1) Model-View-Controller (MVC) Pattern


2) Service-Oriented Architecture (SOA) Pattern
3) Microservices Architecture (MSA) Pattern
4) Caching Pattern

By using these architecture patterns, the Blinkit application is designed to be


modular, scalable, and maintainable. It also provides a highly performant and
responsive user experience, which helps to improve the overall user satisfaction.
Architecture patterns used in the Blinkit application

1)Model-View-Controller (MVC) Pattern:


The Blinkit application uses the MVC pattern to separate the application's concerns into three distinct components - the Model, the View, and the
Controller. This pattern helps to improve the modularity, scalability, and maintainability of the application by decoupling the user interface, business
logic, and data storage.
2)Service-Oriented Architecture (SOA) Pattern:
The Blinkit application uses the SOA pattern to create a modular and scalable architecture that enables the application to provide various services
to its users. The application has been designed as a collection of services, with each service performing a specific business function.
3)Microservices Architecture (MSA) Pattern:
The Blinkit application uses the MSA pattern to create small, independent, and highly scalable services that communicate with each other to form
the application. The application's services are designed to be loosely coupled, which allows for independent development, deployment, and scaling
of the services.
4)Caching Pattern:
The Blinkit application uses the Caching pattern to improve the performance of the application by caching frequently accessed data. The
application uses a caching component to cache data from the Models, which reduces the number of queries to the database and improves the
application's response time.
Key Learnings
●The importance of identifying Architecturally Significant Requirements (ASRs) and their impact on the overall architecture of the
application.
●The need for using appropriate tactics and design patterns to address ASRs and achieve the desired quality attributes.
●This assignment taught me the importance of identifying and addressing Architecturally Significant Requirements (ASRs) in software
applications. ASRs are the requirements that have a significant impact on the application's architecture, quality attributes, and overall
performance.
●To address ASRs, appropriate tactics and design patterns should be used. For example, caching can be used as a tactic to improve the
application's performance, and the Model-View-Controller (MVC) pattern can be used as a design pattern to separate the application's
concerns into three distinct components - the Model, the View, and the Controller
●The value of creating clear and concise architecture diagrams to convey the system's structure and behavior to stakeholders..
●Clear and concise architecture diagrams are also essential to convey the system's structure and behavior to stakeholders. These diagrams
help to improve communication among team members, stakeholders, and other parties involved in the software development process.
●Overall, this assignment helped me to develop my skills in system design, software architecture, and communication, which are crucial for
any software engineer at the Master's level.
●By working on this assignment, I also gained practical experience in architecting a real-life application and understanding the challenges
involved in designing a scalable and maintainable system. It helped me to develop my skills in system design, software architecture, and
communication, which are essential for any software engineer.

You might also like