Batch Vs Online Systems
Batch Vs Online Systems
In a mainframe environment, processing tasks can be categorized into batch systems and online systems based on how the tasks are executed and the type of user interaction involved.
Batch Systems -
A batch system processes large volumes of data sequentially, typically without user interaction. It is used for tasks that do not require immediate results or real-time processing.
Characteristics:
- No User Interaction: Jobs run without requiring any real-time input or interaction from users.
- Scheduled Execution: Jobs are often scheduled to run at specific times, such as during off-peak hours.
- Sequential Processing: Tasks in a batch are processed one after another, although modern systems may allow some parallel processing.
- Delayed Results: Results are available only after the entire batch is processed.
- Resource Optimization: Utilizes system resources efficiently by running large jobs during non-peak hours.
Use Cases:
- Payroll processing.
- Monthly billing cycles for utilities or credit cards.
- Generating large-scale reports.
- Data backups and system maintenance tasks.
Online Systems -
Online systems process transactions in real-time, allowing immediate interaction between users and the system. They are commonly used in scenarios requiring quick responses and dynamic processing.
Characteristics:
- Real-Time Interaction: Users provide input, and the system processes the request immediately, returning results instantly or within seconds.
- Immediate Response: Results or feedback are provided as soon as the transaction is processed.
- Concurrency: Supports multiple users simultaneously interacting with the system.
- Dynamic Processing: Transactions can be processed individually without waiting for other jobs to finish.
- High Availability: Designed to operate 24/7 to handle user requests anytime.
Use Cases:
- Banking systems (e.g., ATMs, online banking).
- Ticket reservation systems (e.g., airline or train booking).
- Retail point-of-sale systems.
- Real-time inventory management.
Batch Vs Online Systems -
Batch | Online | |
---|---|---|
COB Execution | COBOL + Run JCL | COBOL + CICS + Transaction |
COB + DB2 Execution | COBOL + DB2 + Run JCL | COBOL + DB2 + CICS + Transaction |
COB + VSAM Execution | COBOL + VSAM + Run JCL | COBOL + VSAM + CICS + Transaction |
Program execution | JCL used to run the program to get the results. | Transaction or other programs are used to run the program to get the results. |
Results | Non-instantaneous results (takes some time to update the results. i.e. waits until job completion). | Instantaneous results (Results displays immediately) |
Data | Batch is preferable while dealing with the huge amount of data. | Online is less effective while dealing with the huge amount of data. |
Arithmetic operations | Batch is preferable while dealing with arithmetic operations. | Arithmetic operations are less effective in online. |
Concurrency | One program can execute at a time. | Multiple programs can execute parallelly. |
Interacting with program | Interaction with the program is through RUN JCL. | Interaction with the program is through screens or maps. |
User interaction | No user interaction during execution | Requires real-time user interaction |
Cost | Batch processing is cheaper. | Online processing is costlier. |
Execution Mode | Processes tasks in batches or groups. | Processes transactions individually in real time. |
Resource Usage | Optimized for off-peak times to maximize efficiency. | Resources are used continuously to meet demand. |