2. System components in monolithic and microservice architectures
2.1 Common components
2.1.1 Database
A database is an organized collection of structured information that is stored electronically. It enables efficient retrieval, modification, and management of data. Databases are used in almost every industry, from banking and e-commerce to healthcare and social media.
Key Features of a Database
Data Storage – Keeps large amounts of information in a structured format.
Accessibility – Allows users and applications to retrieve data quickly.
Security – Protects sensitive information with authentication and encryption.
Scalability – Can handle growing amounts of data without performance loss.
Types of Databases
a) Relational Databases (SQL-based)
Organizes data in tables with rows and columns.
Uses Structured Query Language (SQL) for queries.
ExamplePersons: MySQL, PostgreSQL, Microsoft SQL Server.
b) NoSQL Databases (Non-relational)
Stores data in flexible structures like documents, graphs, or key-value pairs.
Ideal for handling large-scale applications with dynamic data.
ExamplePersons: MongoDB, Cassandra, Redis.
c) Cloud Databases
Hosted on cloud platforms for remote access and scalability.
ExamplePersons: Amazon RDS, Google Cloud Firestore, Microsoft Azure SQL.
d) Time-Series Databases
Optimized for storing and analyzing time-stamped data (e.g., IoT sensors, financial trends).
ExamplePersons: InfluxDB, TimescaleDB.
How Databases Are Used
a) Web Applications – Store user accounts, transaction records, and content.
b) Business Intelligence – Analyze trends and make data-driven decisions.
c) Healthcare Systems – Manage patient records and medical histories.
d) E-Commerce – Handle product catalogs, inventory, and customer orders.
2.1.2 Web Application
A web app (short for web application) is a software application that runs in a web browser instead of being installed on a local device. Unlike traditional desktop applications, web apps rely on internet connectivity and are accessed through a URL.
Characteristics of Web Apps:
Runs in a Browser: Web apps don’t require installation; users access them via browsers like Chrome, Firefox, or Safari.
Cross-Platform Compatibility: Works on different operating systems (Windows, macOS, Linux) and devices (PCs, smartphones, tablets).
Internet Dependency: Most web apps require an internet connection to function, though some offer offline capabilities.
Automatic Updates: Since web apps are hosted on servers, updates are applied centrally without requiring user intervention.
ExamplePersons of Web Apps
Email Services: Gmail, Outlook Web, Yahoo Mail.
Office & Productivity Tools: Google Docs, Microsoft 365, Trello.
Social Media Platforms: Facebook, Twitter, LinkedIn.
E-commerce & Banking: Amazon, eBay, PayPal.
Types of Web Apps
Static Web Apps: Simple, display-only content (e.g., blogs, portfolios).
Dynamic Web Apps: Interactive, database-driven applications (e.g., social media platforms, online banking).
Single-Page Applications (SPAs): Loads all content dynamically without refreshing the page (e.g., Gmail, Netflix).
Progressive Web Apps (PWAs): Offer offline functionality and native-like experiences (e.g., Spotify Web, Twitter Lite).
2.1.3 Mobile Application
A mobile app is a software application designed to run on mobile devices such as smartphones and tablets. These apps provide various functionalities, from entertainment and social networking to productivity and business tools.
Key Characteristics of Mobile Apps
Platform-Specific or Cross-Platform: Some apps are built for specific operating systems (iOS, Android), while others work across multiple platforms.
Optimized for Touch Interaction: Designed for touchscreens, using gestures like tapping, swiping, and pinching.
Internet-Dependent or Offline: Some apps require an internet connection (e.g., streaming apps), while others work offline (e.g., calculators, note-taking apps).
Downloadable from App Stores: Distributed via platforms like Google Play Store (Android) and Apple App Store (iOS).
Types of Mobile Apps
Native Apps: Built specifically for one platform (Android or iOS), offering high performance and seamless user experience.
Web Apps: Accessed through web browsers and do not require installation (e.g., Progressive Web Apps).
Hybrid Apps: Combine elements of both native and web apps, often built using frameworks like React Native or Flutter.
ExamplePersons of Popular Mobile Apps
Social Media: Facebook, Instagram, Twitter.
Productivity: Microsoft Office, Evernote, Trello.
Gaming: Candy Crush, PUBG Mobile, Pokémon GO.
E-commerce: Amazon, eBay, Shopify.
2.1.4 Machine Application
A machine bot app is a software application that automates tasks, interactions, or processes, often powered by artificial intelligence (AI) or rule-based algorithms. These apps are designed to work autonomously or assist users in performing repetitive or complex actions.
Functions of a Machine Bot App
Task Automation: Executes predefined actions, such as scheduling tasks, processing data, or sending alerts.
Chatbots & Virtual Assistants: Engages in conversations to provide customer support, answer questions, or assist with navigation.
Process Optimization: Enhances efficiency in business workflows, manufacturing, and IT operations.
Data Collection & Analysis: Monitors systems, gathers insights, and recommends improvements.
Integration with Other Systems: Connects with APIs, databases, and software applications to perform tasks seamlessly.
ExamplePersons of Machine Bot Apps
Customer Support Bots: Live chat assistants on websites.
Trading Bots: Automated stock and cryptocurrency trading applications.
AI Personal Assistants: Siri, Google Assistant, Microsoft Copilot.
Robotic Process Automation (RPA) Bots: Used in businesses to handle repetitive office tasks.
Machine bots come in various types, each designed to automate tasks, enhance efficiency, or simulate intelligent behavior. Here’s a breakdown of the main categories:
1. Chatbots
These bots engage in conversation with users, providing assistance, answering questions, or handling customer service interactions.
News Aggregation Bots: Share updates or articles automatically.
8. Robotics Bots (Physical Machines)
Used in industries, healthcare, and home automation, operating as physical robots.
Industrial Robots: Automate manufacturing tasks.
Service Robots: Assist in healthcare and customer service.
Autonomous Vehicles: Self-driving cars and delivery drones.
2.1.5 Reports
Applications often generate reports tailored to their specific function and industry. Here are some common types of reports found in various business applications:
a) Sales & Revenue Reports: Track transactions, revenue streams, and customer purchase trends. Useful for sales teams and financial planning.
b) User Activity Reports: Monitor login times, feature usage, and engagement statistics, helping businesses understand customer behavior.
c) Inventory Reports: Essential for e-commerce and retail applications, showing stock levels, reorder points, and supplier performance.
d) Financial Reports: Include balance sheets, profit & loss statements, and expense summaries—critical for accounting software.
e) Performance Dashboards: Provide visual insights on KPIs, employee productivity, and system efficiency.
f) Error & Exception Reports: Help IT teams diagnose system issues, identify failures, and enhance application reliability.
g) Compliance & Audit Reports: Ensure businesses adhere to regulatory requirements by tracking data usage, financial transactions, and security logs.
Generating reports in a software application typically involves these steps:
1) Define the Data Source: Ensure the application is connected to a structured database, data warehouse, or external APIs to fetch relevant data.
2) Select a Reporting Tool: Many applications integrate reporting libraries or tools like SQL-based reporting engines, Power BI, Crystal Reports, or embedded dashboards.
3) Create Query Logic: Write SQL queries or API calls to retrieve the required data. Some applications have built-in query builders for easy customization.
4) Design the Report Format: Configure layouts, charts, tables, and summaries using a report designer within the application or external reporting tools.
5) Apply Filters & Parameters: Allow users to refine reports by date range, location, user segment, or other criteria.
6) Generate & Export the Report: Once ready, the report can be viewed in the application, downloaded in formats like PDF, Excel, or CSV, or scheduled for automated delivery.
2.1.6 ETL-Process
An ETL process (Extract, Transform, Load) plays a crucial role in data warehousing by ensuring that raw data from various sources is collected, processed, and stored efficiently for analysis and reporting.
Roles of an ETL Process in a Data Warehouse
Extract:
Gathers data from multiple sources (databases, APIs, flat files, etc.).
Handles structured and unstructured data from disparate systems.
Ensures data integrity while retrieving information.
Transform:
Cleans the data by removing duplicates, handling missing values, and correcting inconsistencies.
Applies business rules to standardize data formats.
Performs aggregation, filtering, and enrichment to make the data meaningful.
Converts data into a format that aligns with the data warehouse schema.
Load:
Transfers processed data into a centralized data warehouse for storage.
Supports either batch loading (scheduled updates) or streaming loading (real-time updates).
Ensures optimized indexing and partitioning to improve query performance.
Why is ETL Important for a Data Warehouse?
Improves Data Quality: Cleansing and transformation ensure that only reliable, relevant data is stored.
Enhances Performance: Preprocessing data before storing it speeds up querying and reporting.
Supports Analytics & Decision-Making: Enables organizations to access structured and well-organized data for business intelligence.
Ensures Scalability: Can handle large amounts of data from diverse sources, making it essential for growing businesses.
ETL Tools Used in Data Warehousing
Apache Nifi – For real-time ETL processing.
Talend – Open-source tool with strong data integration capabilities.
Microsoft SQL Server Integration Services (SSIS) – Popular for enterprise ETL workflows.
Informatica PowerCenter – Used for complex data transformation tasks.
2.1.7 Datawarehouse
A data warehouse is a game-changer for companies looking to make informed, strategic decisions. Here’s why it’s so valuable:
Centralized Data Storage: Instead of scattered data across multiple systems, a data warehouse consolidates information into a single source of truth. This ensures consistency and reliability across departments.
Improved Decision-Making: With historical and real-time data in one place, businesses can analyze trends, forecast outcomes, and make strategic decisions faster and with greater confidence.
Enhanced Performance: Since a data warehouse is optimized for analytical processing, queries run much faster compared to transactional databases. This means reports and insights can be generated in seconds, not hours.
Data Quality and Accuracy: A well-maintained data warehouse ensures clean, organized, and validated data. This reduces errors in reporting and improves trust in business intelligence insights.
Regulatory Compliance and Security: Many industries require strict data governance. A data warehouse allows companies to implement access controls, monitor data usage, and ensure compliance with laws like GDPR or financial regulations.
Competitive Advantage: With deep insights into customer behavior, market trends, and operational efficiency, businesses can stay ahead of competitors and adapt proactively to market shifts.
Ultimately, a data warehouse transforms raw data into actionable intelligence, fueling growth and innovationDifferent industries leverage data warehouses to meet their unique needs and challenges. Here are some tailored use cases:
Retail & E-Commerce: Companies store customer purchase history, sales transactions, and inventory data to optimize stock management, personalize marketing campaigns, and analyze consumer trends.
Healthcare & Pharmaceuticals: Hospitals and research institutions use data warehouses to track patient records, drug effectiveness, clinical trial outcomes, and regulatory compliance, leading to better treatment decisions and operational efficiency.
Finance & Banking: Financial institutions rely on data warehouses for fraud detection, risk assessment, transaction analysis, and predictive modeling to safeguard assets and enhance customer services.
Manufacturing & Supply Chain: Manufacturers integrate production data, supplier metrics, and logistics tracking to streamline operations, improve quality control, and optimize resource allocation.
Telecommunications: Telecom companies store call records, service usage, and customer preferences to improve network reliability, detect anomalies, and enhance customer experience with targeted service offerings.
Education: Universities and schools use data warehouses to manage student enrollment, academic performance analytics, research data, and funding insights, helping improve educational outcomes.
Energy & Utilities: Providers analyze consumption patterns, weather forecasts, and infrastructure performance to optimize energy distribution, predict outages, and improve sustainability efforts.
Every industry benefits from harnessing structured data to drive decisions, increase efficiency, and stay competitive.
2.2 Additional microservice components
2.2.1 Discovery Service
In a microservice architecture, a Discovery Service is a crucial component that enables services to dynamically locate and communicate with each other. Rather than hardcoding service locations, the Discovery Service allows services to register themselves and discover others at runtime, enhancing flexibility and scalability.
Functions of a Discovery Service: Service Registration: When a microservice starts up, it registers its network location (such as an IP address and port) with the Discovery Service.
Service Discovery: Other microservices can query the Discovery Service to find the instances of services they need to interact with.
Load Balancing: Helps distribute requests among available service instances to optimize performance.
Failover Handling: If a service instance goes down, the Discovery Service ensures that requests are redirected to healthy instances.
Decoupling Services: By abstracting service locations, it reduces dependencies and allows dynamic scaling without requiring service location updates in configuration files.
ExamplePersons of Discovery Services: Eureka (Spring Cloud Netflix) – Often used in Java-based applications.
Consul – Provides key-value storage and health checking.
etcd – Used in Kubernetes for service discovery.
Zookeeper – Used in distributed systems for service coordination.
2.2.2 Message Broker
A message broker is a software component that facilitates communication between different services, applications, or systems by transmitting messages. It acts as an intermediary, ensuring that data flows efficiently, reliably, and asynchronously between producers (systems that generate messages) and consumers (systems that process them).
How a Message Broker Communicates with Microservices In a microservices architecture, services are often loosely coupled and communicate with each other via messages. A message broker helps manage this communication through various mechanisms:
a) Publish-Subscribe Model
A microservice publishes a message to a topic.
Multiple subscribers (microservices) listen to that topic and process the message independently.
Example: Apache Kafka, RabbitMQ.
b) Point-to-Point Messaging
One microservice sends a message to a queue.
Another microservice retrieves and processes the message.
Ensures that each message is consumed once, improving reliability.
Example: ActiveMQ, IBM MQ.
c) Event-Driven Architecture
Services communicate based on events rather than direct API calls.
When an event occurs (e.g., "order placed"), the broker distributes it to relevant microservices.
Example: Amazon SNS, Azure Event Grid.
d) Message Routing & Transformation
The broker can filter, modify, or route messages based on predefined rules.
This ensures each microservice receives relevant data without unnecessary complexity.
Benefits of Using a Message Broker in Microservices a) Decoupling: Services do not need to know about each other directly.
b) Scalability: Supports high-load environments by distributing messages efficiently.
c) Reliability: Ensures messages are processed even if a service is temporarily down.
d) Load Balancing: Distributes messages across multiple instances for better performance.
2.2.3 Storage Service
The storage service consumes all changes that the different business microservices publish to the message broker. Every change in the different local database will also happen after a latency time. After this time, the storage database is in a consistent state. The storage database has the global schema of the whole application. Reports, that based on the data schema of the monolithic application, will still work, after the system has been migrated to a microservice architecture. Also, the ETL process that collects the data of different company applications and stores them in a datawarehouse, will still work after the migration to a microservice architecture.