How Software Works
How Software Works
#TheGoodBA
Hanoi ~ 2023
1. 3 layers in software business architecture
4. Q&A
3 layers in software
business architecture
The Front
Diagram
Business Logic: Domain (Entities, Flow, Report); Utilities (Log, Language, Ccy,
Datetime)
Data
Interface Layer
User Interface
- Mobile/Tablet/Web/Desktop
- Any I/O devices
System Interface
- API: https://shopify.dev/docs/api
- Webhook: https://shopify.dev/docs/api/admin-rest/2023-01/resources/webhook
Business Logic Layer
Business Domain
- Entities: People, Goods/Services, Transactions, Values
- Business Rules: Internal, External
- Business Processes: The processes that involve
- Business Intelligence: Data, Report, Insight
System/Common Utilities
- Logging/Audit Trail, Scheduler, Calendar/Datetime,
Currencies, Language, Security…
Data Layer
Data Storage
- Databases: SQL/Non-SQL
- Files/Documents: Media (Photo, Video), Spreadsheets…
Data ETL
- Extract - Transform - Load
- Distribution Flow
The Front
Source: IBM
MQ - Message Queue - Point to Point
MQ - Message Queue - Point to Point
Producers knows about consumer beforehand and only the specified consumer can consume
the message from the queue
MQ - Message Queue - Publish and Subscribe
MQ - Message Queue - Publish and Subscribe
Publisher has no knowledge of the receiver and it just publishes a message in the queue by
specifying a class or tag. Any receiver which has subscribed to that class or tag will receive the
message.
Common issues with message queues
Common issues with message queues
1. Message loss: Messages can be lost due to network failures, system overloaded,
system crashes, or other unexpected events.
2. Message sequence: In a distributed system, messages may not be received in
the same order they were sent, which can cause issues when processing the
messages.
3. Unmatched messages: messages that cannot be processed by the consuming
application due to errors such as missing mandatory fields, unmatched data
type/length, unmatched predefined data.
4. High latency: Queue-based systems can experience high latency due to long
processing times, large message sizes, or network congestion.
Message Queue - JSON Payload Sample
Physical Document Transfer
EDI - File Transfer (FTP/SFTP)
EDI - SWIFT
Which method to use?
7. Compose a lists of changes required for each applications. This will be the project’s
scope/high level backlog
API Requirement
1. Business Purpose: what the service is used for, and what it does.
2. Context: the provider, consumers and the usage context of the service.
3. Request/Response: details of the service inputs/outputs fields, with clear
explanation of their meanings, data type/length, mandatory/optional, mapping,
predefined list of values…
4. Service Processing: what actions need to be taken within the provider
application upon receiving the service requests.
5. Error Codes: possible error codes and their meaning.
a. Business Errors: Validation, Business Logic
b. System Errors: Connection, Timeout, Duplication
6. Non-Functional Requirement: Security, Performance, handling Timeout…
7. Sample Request/Response
8. API Requirement v.s API Documentation
Message Queue Requirement
1. Business Purpose: what the message queue is used for, and what it does.
2. Type of queue: Point to Point or Publish/Subscribe
3. Trigger: what triggers the generation of the message.
4. Message Payload: details of the payload, with clear explanation of fields,
description, data type/length, mandatory/optional, mapping, accepted values.
5. Acknowledgement: from consumer/subscribers if any
6. Non-Functional Requirement: Security, Encryption, Performance, Handling
message loss/duplication…
7. Sample payload
A Sample Project
1. Business Purpose: Missy Fantastic is a fashion retailer who runs their business on
different unconnected applications. As the online business grows dramatically during
Covid, they need their applications connected so that they can improve their operational
productivity and speed to better serve their clients.
2. List of applications
Missy Fantastic eCommerce website for online Sales 3rd party - Shopify Store
website
Provider Consumer