Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
44 views5 pages

Assignment 1

The document presents an analysis of an e-commerce system, specifically Amazon, utilizing a microservices architectural style to enhance scalability and fault isolation. It identifies key modules such as user management, product catalog, and payment gateway, and proposes design patterns like Circuit Breaker and CQRS to improve system resilience and efficiency. Additionally, it emphasizes the benefits of an event-driven architecture for modularization and independent service management.

Uploaded by

digiboo2147
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)
44 views5 pages

Assignment 1

The document presents an analysis of an e-commerce system, specifically Amazon, utilizing a microservices architectural style to enhance scalability and fault isolation. It identifies key modules such as user management, product catalog, and payment gateway, and proposes design patterns like Circuit Breaker and CQRS to improve system resilience and efficiency. Additionally, it emphasizes the benefits of an event-driven architecture for modularization and independent service management.

Uploaded by

digiboo2147
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/ 5

Assignment 1

CO4306 Software Architecture

STUDENT NAME : R.I BUWANEKA


INDEX :20/ENG/016
REGISTRATION NO :EN97548
SUBMISSION DATE :9/5/2025
PART A: Analysis of an E-commerce System(Amazon)

Architectural Style Identification


 Architectural Style: Microservices.
 Microservices are used by contemporary e-commerce platforms such as Amazon to accomplish
autonomous deployment, fault isolation, and scalability. Because each service (such as user
administration, inventory, and payment) functions independently, teams can update individual parts
of the system without affecting the system as a whole. This is in line with e-commerce's requirement
for high availability and quick iterations.

Module Identification
 User Management
o User administration is in charge of role-based access, profile management, and
authentication.
 Product Catalogue
o Oversees product categories, listings, and search features.
 Inventory management
o keeps tabs on stock levels and coordinates with vendors.
 Shopping Cart
o Holds chosen products and computes pricing in real time.
 Order processing
o oversees the creation, modification, and cancellation of orders.
 Payment Gateway
o Connects to third-party payment processors (like PayPal and credit cards).
 Recommendation Engine
o Makes product recommendations based on user behaviour and machine learning techniques.
 Shipping & Logistics
o Manages carrier integration and delivery tracking.

1
Design Pattern Assumptions
 Facade Pattern
a. streamlines communication with intricate subsystems (for example, a single Order Service
interface that conceals the complexity of shipping, inventory, and payment).
 Observer Pattern
a. provides users with order status updates, such as email or SMS notifications when an order
ships.

PART B: Proposed Redesign

More users and duties


can be handled more easily
when services are connected
via events. For instance, it is
not necessary for everything to
function simultaneously in
order to update the inventory
when an order is placed. Since
each component functions
independently, this setup is
simpler to correct in the event
of an issue. Additionally, it
makes it possible to
incorporate new features—like
real-time reports—without
completely altering the system. Services can expand independently as well; if orders increase significantly,
other components, such as the suggestions, won't be affected.

 Proposed Design Patterns


1. Circuit Breaker (Behavioral)
a. Payment service calls can be wrapped with a failure-monitoring technique to stop cascade
failures during
payment gateway
outages. The
system has the
ability to
automatically
switch to a cached payment method if the number of failures surpasses a certain threshold.
2
This helps to preserve service availability and prevent broader disruptions by guaranteeing
that customers may still complete transactions without disrupting other areas of the system,
even in the event that the principal payment gateway is unavailable.

2. CQRS (Command Query Responsibility Segregation) (Architectural)


a. It is possible to use the CQRS (Command Query Responsibility Segregation) paradigm to
optimise read and write operations, particularly in situations such as high-latency product
searches. The system can manage each type of action more effectively if the read and write
models are
separated,
for
example,
by using
one model for product searches (read) and another for inventory changes (write). Changes
can be tracked using event-sourced data, which makes sure that write activities don't slow
down read operations. This method guarantees accurate and consistent inventory updates in
the background while lowering latency for user enquiries.

3. Strategy (Behavioral)
a. ShippingStrategy interface can be developed to
manage numerous shipping providers with dynamic
selection, such selecting between FedEx and DHL.
Several algorithms for figuring out delivery costs
and times for each supplier would be included in this
interface. The system can dynamically choose the
best shipping provider depending on criteria like
price, delivery time, or other preferences by putting
distinct strategies into place for each shipping
company (for example, one for FedEx and one for
DHL). It is simpler to adjust to new shipping
providers or requirements with this method since it
permits flexibility in adding or modifying shipping providers without impacting the system as
a whole.

 Modularization Support
OrderService and InventoryService are two examples of the smaller, event-driven modules
that make up the system's Event-Driven Architecture (EDA). These modules all communicate by
sending out and receiving events, such as OrderPlacedEvents. Because of this, any service may
function separately, enabling them to be created, maintained, and expanded without interfering with
one another. This kind of service decoupling makes it simple for the system to expand and adapt to
new requirements, guaranteeing improved flexibility and performance.

The system's design is further improved with patterns like Circuit Breaker and CQRS
(Command Query Responsibility Segregation). By separating the writing and reading of data, CQRS
improves the efficiency and scalability of each process. By preventing failures in one module from
propagating to other modules, the Circuit Breaker pattern ensures greater resilience and safeguards
the system. When combined, these patterns increase the system's flexibility, scalability, and
resilience while maintaining a modular architecture that is simple to upgrade or grow as required.

3
Reference
 [1] D. Hardt, Ed., “The OAuth 2.0 Authorization Framework,” RFC 6749, Oct. 2012.
 [2] National Institute of Standards and Technology, “Digital Identity Guidelines,” *NIST Special
Publication 800-63-3*, Jun. 2017.
 [3] R. Sandhu, E. Coyne, H. Feinstein, and C. Youman, “Role-based access control
models,” Computer, vol. 29, no. 2, pp. 38–47, Feb. 1996.
 [4] L. Richardson, M. Amundsen, and S. Ruby, RESTful Web APIs. Sebastopol, CA, USA: O’Reilly
Media, 2013.
 [5] S. Newman, Building Microservices. Sebastopol, CA, USA: O’Reilly Media, 2015.
 [6] Google, “SEO Starter Guide,” Google Search Central, 2023. [Online]. Available:
https://developers.google.com/search/docs/beginner/seo-starter-guide. Accessed: Aug. 1, 2023.
 [7] PCI Security Standards Council, “PCI DSS Quick Reference Guide,” PCI Security Standards
Council, 2022. [Online]. Available: https://www.pcisecuritystandards.org. Accessed: Aug. 1, 2023.
 [8] T. Segaran, Programming Collective Intelligence. Sebastopol, CA, USA: O’Reilly Media, 2007.

You might also like