0% found this document useful (0 votes)
9 views16 pages

Bus Ticket System Deepyan

The document presents a report on a Cloud Simulation for a Bus Ticketing and Payment System developed by students under the guidance of Dr. Latha N R at BMS College of Engineering. It outlines the importance of cloud computing, the use of Docker and Kubernetes for application deployment, and various cloud hosting solutions such as AWS, Firebase, and Azure. The report details the system architecture, implementation, testing, and future scope of the project, emphasizing its scalability and improved customer experience.

Uploaded by

y6nktkqvrt
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)
9 views16 pages

Bus Ticket System Deepyan

The document presents a report on a Cloud Simulation for a Bus Ticketing and Payment System developed by students under the guidance of Dr. Latha N R at BMS College of Engineering. It outlines the importance of cloud computing, the use of Docker and Kubernetes for application deployment, and various cloud hosting solutions such as AWS, Firebase, and Azure. The report details the system architecture, implementation, testing, and future scope of the project, emphasizing its scalability and improved customer experience.

Uploaded by

y6nktkqvrt
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/ 16

VISVESVARAYA TECHNOLOGICAL UNIVERSITY, BELAGAVI 590018

Report on
“Bus Ticketing and Payment System”
By
Deepayan Das (1BM21CS049)
Anushka Jadhav (1BM21CS276)
Chanchal Bhati (1BM21CS042)

Under the Guidance of


Dr. Latha N R
Associate Professor
Department of CSE
BMS College of Engineering

Work carried out at

Department of Computer Science and Engineering


BMS College of Engineering
(Autonomous college under VTU)
P.O. Box No.: 1908, Bull Temple Road, Bangalore-560 019
2024-2025

BMS COLLEGE OF ENGINEERING

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

CERTIFICATE

This is to certify that the Cloud Computing assignment titled “Cloud Simulation
for Bus Ticketing and Payment System” has been carried out by Deepayan Das
(1BM21CS049), Anushka Jadhav(1BM21CS276), Chanchal Bhati
(1BM21CS042) during the academic year 2024-2025.

Signature of the guide


Dr. Latha N R
Associate Professor
Department of Computer Science and Engineering
BMS College of Engineering, Bangalore
BMS COLLEGE OF ENGINEERING

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

DECLARATIO
N

We , Deepayan Das (1BM21CS049) ,Anushka Jadhav (1BM21CS276), Chanchal


Bhati (1BM21CS042), students of 7th Semester, B.E, Department of Computer
Science and Engineering , BMS College of Engineering, Bangalore, hereby declare
that, this assignment work entitled "Cloud Simulation for Bus Ticketing and
Payment System” has been carried out by us under the guidance of Dr. Latha N
R, Associate Professor, Department of CSE, BMS College of Engineering,
Bangalore during the academic semester Sept 2024-Feb 2025. We also declare
that to the best of our knowledge and belief, the assignment reported here is not
from part of any other report by any other students.

Signature of the
Candidates
Deepayan Das (1BM21CS049)
Anushka Jadhav (1BM21CS276)
Chanchal Bhati (1BM21CS042)
1. Introduction
1.1 Cloud Computing Overview

Cloud computing refers to the delivery of computing services—such as servers,


storage, databases, networking, software, and analytics—over the Internet ("the
cloud"). It allows users and businesses to access these services on-demand
without the need for owning or maintaining physical hardware.

• Importance of Cloud in Modern Applications

Cloud computing enables rapid development, scalability, and reliability, making


it an ideal solution for systems that require real-time data processing and high
availability, such as a bus ticketing system.

• Types of Cloud Services

IaaS (Infrastructure as a Service) : Provides virtualized computing resources like


virtual machines and storage.

PaaS (Platform as a Service) : Offers platforms for developing and hosting


applications, such as AWS Elastic Beanstalk.

SaaS (Software as a Service) : Cloud-hosted software applications available to


users.

1.2 Problem Statement

Manual ticketing systems often result in delays, errors, and customer


dissatisfaction. Lack of automation and scalability can lead to inefficiencies during
peak times.
• Need for a Cloud-Based Bus Ticketing System

A cloud-based solution offers real-time updates, scalable infrastructure, and


improved customer experience through online booking and payment.

2. Docker and Kubernetes


2.1 Docker Overview

Docker is an open-source platform that automates the deployment, scaling,


and management of applications within containers. Containers are lightweight,
portable, and provide an isolated environment for applications.

• Benefits of Docker
- Consistent environments across different stages of development.

- Easy deployment of microservices.

- Better resource utilization.

2.2 Docker in Bus Ticketing System

Each component of the bus ticketing system (front-end, back-end, database,


etc.) can be containerized using Docker for easier deployment and management.

Example Docker Commands

```bash

docker build -t bus-ticketing-app .

docker run -d -p 8080:8080 bus-ticketing-app

```

2.3 Kubernetes Overview


Kubernetes is an open-source container orchestration platform that automates
the deployment, scaling, and management of containerized applications. It
ensures that the application is always running and scales based on traffic
demands.

• Key Features of Kubernetes


Auto-scaling : Scales applications automatically based on demand.

Load balancing : Distributes network traffic across containers to ensure high


availability.

2.4 Kubernetes in Bus Ticketing System

Kubernetes helps manage multiple Docker containers running the bus ticketing
system, ensuring high availability during traffic spikes.

Example Kubernetes Configuration

```yaml

apiVersion: apps/v1

kind: Deployment

metadata:

name: bus-ticketing-deployment

spec:

replicas: 3

selector:

matchLabels:

app: bus-ticketing
template:

metadata:

labels:

app: bus-ticketing

spec:

containers:

- name: bus-ticketing

image: bus-ticketing-app:v1

ports:

- containerPort: 8080

```

3. Cloud Solutions for Application Hosting


3.1 AWS Hosting

AWS provides a wide range of cloud services such as compute (EC2), storage
(S3), and database (RDS) to host and manage the bus ticketing system.

• AWS Components for Bus Ticketing System


EC2 : Virtual machines to host Docker containers running the app.

S3 : Storage for static files (images, PDFs).

RDS : Managed relational database for storing ticketing and transaction data.

3.2 Firebase Hosting


Firebase is a platform developed by Google that provides backend services like
real-time databases, authentication, and hosting, making it ideal for a bus
ticketing system.

• Firebase Real-Time Database


Firebase enables synchronization of ticketing data in real-time, allowing users
to book tickets and make payments simultaneously without delays.

3.3 Azure Hosting

Microsoft Azure offers cloud services such as Azure Kubernetes Service (AKS)
for managing containers and Azure Functions for serverless computing.

• Azure Components for the Ticketing System


AKS : Container orchestration to manage the bus ticketing app.

Azure Blob Storage : Storing static files.

Azure SQL Database : Storing transaction data.

4. Tools Used
4.1 Front-End Design

• ReactJS
ReactJS is a JavaScript library for building user interfaces. It's chosen for its
component-based architecture, making the front-end scalable and maintainable.

• ReactJS Example Code for Ticket Booking Form


```jsx
import React, { useState } from 'react';

const TicketBookingForm = () =>

{ const [seat, setSeat] =

useState(''); const [bus, setBus] =

useState('');

const handleSubmit = (event) => {

event.preventDefault();

// Logic for booking ticket

};

return (

<form onSubmit={handleSubmit}>

<select value={bus} onChange={(e) => setBus(e.target.value)}>

<option value="bus1">Bus 1</option>

<option value="bus2">Bus 2</option>

</select>

<select value={seat} onChange={(e) => setSeat(e.target.value)}>

<option value="1">Seat 1</option>

<option value="2">Seat 2</option>

</select>

<button type="submit">Book Ticket</button>


</form>

);

};

export default TicketBookingForm;

```

4.2 Back-End Development

• Node.js
Node.js is used to create a server that handles requests for booking tickets,
processing payments, and updating databases.

• MongoDB/MySQL
- MongoDB is used for unstructured data like user profiles and booking history.

- MySQL (or AWS RDS) is used for structured data like transactions and booking
details.

4.3 Payment Gateway Integration

• Razorpay/Stripe
Payment gateways are integrated to handle transactions securely, including
card payments, digital wallets, and net banking.
5. Detailed Design

5.1 System Architecture

• High-Level Architecture
A high-level architecture diagram that shows how different components like
the front-end, back-end, database, and payment gateway interact with each
other.

• Data Flow Diagram


Diagram showing the flow of data from the user interface to the backend,
including ticket booking and payment processing.

5.2 Application Modules

• Ticket Booking Module


This module allows users to book available tickets by selecting a bus, seat, and
payment method.

• Payment Module
Handles payment gateway integration, securely processing transactions.

• Admin Module
Admins can manage buses, view ticket bookings, and generate reports on sales
and revenue.
6. Implementation Details

6.1 Code Implementation

• Ticket Booking API (Node.js Example)


```js

app.post('/book-ticket', (req, res) => {

const { userId, busId, seatNumber } = req.body;

Ticket.create({ userId, busId, seatNumber }, (err, ticket) => {

if (err) {

return res.status(500).json({ error: 'Failed to book ticket' });

res.status(200).json(ticket);

});

});

```

- **6.1.2 Payment Gateway Integration (Razorpay Example)**

```js
app.post('/payment', (req, res) => {

const { amount } = req.body;

razorpay.orders.create({ amount, currency: 'INR', receipt: 'order123' },


function(err, order) {

if (err) {

return res.status(500).json({ error: err });

res.status(200).json({ order });

});

});

```

6.2 Deployment Process

Docker and Kubernetes Deployment

Docker Command for Image Build :

```bash

docker build -t bus-ticketing-app .

```

- Kubernetes Deployment:

```yaml

apiVersion: apps/v1
kind: Deployment

metadata:

name: bus-ticketing-deployment

spec:

replicas: 3

selector:

matchLabels:

app: bus-ticketing

```

6.3 Testing

Unit Testing

Unit tests are written using Jest for ReactJS components and Mocha/Chai for
Node.js APIs.

7. Results

7.1 Screenshots

• Ticket Booking Interface

Screenshot of the booking page showing available buses, seat selection,


and payment button.

• Payment Confirmation

Screenshot of the successful payment screen after completing the


transaction.

• Database Entries

Screenshot of database entries after booking tickets and successful


transactions.

7.2 Performance Metrics

• Load Testing Results

Example results from Apache JMeter showing response times and


throughput during peak load testing

8. Conclusion
8.1 Summary of Achievements

- The system offers real-time ticketing and payment processing, significantly


reducing fraud and enhancing customer experience.

- The application is fully scalable, thanks to Docker and Kubernetes.

8.2 Future Scope

- Integration with AI models for dynamic pricing.

- Mobile application development for Android and iOS.

- Support for multiple languages and currencies.

9. References
1. Docker Documentation

[https://docs.docker.com/](https://docs.docker.com/)
2. Kubernetes Documentation

[https://kubernetes.io/docs/](https://kubernetes.io/docs/)

3. AWS Documentation

[https://aws.amazon.com/documentation/](https://aws.amazon.com/documenta
tion/)

4. Firebase Documentation

[https://firebase.google.com/docs](https://firebase.google.com/docs)

5. JMeter Documentation

[https://jmeter.apache.org/](https://jmeter.apache.org/)

You might also like