Skip to content

Commit 7cab66d

Browse files
authored
readme updated.
1 parent f5c074f commit 7cab66d

File tree

1 file changed

+81
-4
lines changed

1 file changed

+81
-4
lines changed

README.md

+81-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,84 @@
1-
# Uber-Low-Level-Design
1+
# Uber Low Level System De# C++
2+
This project, **Uber Low-Level System De# Cpp**, aims to simulate a simplified version of the ride-hailing service Uber using modern C++ features.
23

3-
Class Diagram
4-
<br>
4+
The **primary objective** behind this project is to deepen the understanding of low-level system de# C++, encompassing Object-Oriented Programming (OOP) principles, threading concepts, and modern C++ features such as Smart Pointers and the Standard Template Library (STL).
55

6+
In this design, we have focused on creating a robust and maintainable codebase by incorporating two key design patterns: **Singleton** and **Strategy**. The Singleton pattern is employed to ensure that there is only one instance of crucial manager classes such as ``DriverMgr``, ``RiderMgr``, ``TripMgr``, and ``StrategyMgr``. This guarantees centralized management of drivers, riders, trips, and strategies, ensuring thread-safe access and preventing resource conflicts. The Strategy pattern is leveraged to encapsulate algorithms for # and driver matching. By defining a family of algorithms and making them interchangeable, the system can dynamically change its behavior without altering the client code. Classes such as ``Default#Strategy``, ``RatingBased#Strategy``, and ``LeastTimeBasedMatchingStrategy`` demonstrate the use of this pattern, providing flexibility and scalability to the system.
7+
8+
## Features
9+
- **Singleton Pattern**: Ensures a single instance of crucial manager classes such as `DriverMgr`, `RiderMgr`, `TripMgr`, and `StrategyMgr` for centralized management.
10+
- **Strategy Pattern**: Encapsulates algorithms for # and driver matching, providing flexibility and scalability.
11+
- **Modern C++17 Features**: Utilizes smart pointers (though introduced in C++11), STL containers, and thread-safe operations to build an efficient and maintainable system.
12+
13+
## Prerequisites
14+
- **C++17 Compiler**: Ensure you have a C++17 compatible compiler installed (e.g., g++, clang++).
15+
- **CMake**: Ensure you have CMake installed on your system.
16+
17+
## Steps to Run the Project
18+
19+
1. **Clone the Repository**
20+
```sh
21+
git clone https://github.com/piyush26c/Uber-Low-Level-Design.git
22+
cd Uber-Low-Level-Design
23+
```
24+
25+
2. **Create a Build Directory**
26+
```sh
27+
mkdir build
28+
cd build
29+
```
30+
31+
3. **Generate the Build System using CMake**
32+
```sh
33+
cmake ..
34+
```
35+
36+
4. **Build the Project**
37+
```sh
38+
make
39+
```
40+
41+
5. **Run the Executable**
42+
```sh
43+
./UberSystem
44+
```
45+
46+
47+
## Project Structure
48+
49+
```sh
50+
├── CMakeLists.txt
51+
├── common.hpp
52+
├── default#Strategy.hpp
53+
├── driver.hpp
54+
├── driverMatchingStrategy.hpp
55+
├── driverMgr.cpp
56+
├── driverMgr.hpp
57+
├── leastTimeBasedMatchingStrategy.hpp
58+
├── location.hpp
59+
├── main.cpp
60+
├── #Strategy.hpp
61+
├── ratingBased#Strategy.hpp
62+
├── rider.hpp
63+
├── riderMgr.cpp
64+
├── riderMgr.hpp
65+
├── strategyMgr.cpp
66+
├── strategyMgr.hpp
67+
├── trip.hpp
68+
├── tripMetaData.hpp
69+
├── tripMgr.cpp
70+
├── tripMgr.hpp
71+
```
72+
## Class UML Diagram
73+
74+
*Note: Click on image below to render it with better view.*
75+
76+
![Click here for UML Class diagram](https://www.planttext.com/api/plantuml/svg/l5ZPRjiu57ttLn1zAEI1dGy80gEUs6qC94vWootcoM0asYQW3I9TJ96cFpOFyqdzXN8NnSLnLxzOvDqFxxsyqjV__dz3A6pfiIm60rnHrEvWXi13YpDSxTUqXHJjFu6d0H2_9_X8s5v6dq46Y-nOC3BdHKbMLuG2Se0johSDRQ_I5ZTtYC8Pf73o6ZJsUdW9ylhuM22fzekjrp6T30VFWq5MG4B03EtWiQ0HvtwNGs6hmg-8G-FF4pSC7S8AKhRxDoGe_yDXn2sBK4uu5WodovLPYp-YzWxIxF12ofISHx8diOYyW2n6AJhn5OTTi5Fd5a52KrmY4M7CsL_gO0_zq_Q5fo-uo4yX7AUESKDneIDvObLDSVOCMd6kQSsOsN-ocgQBvJlGoEFctejzHmYJ6xm_I1vVvB6k2uuigeubK5HfThEShjUBTylvJ2plb_FjEf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UfmTCWEnWx0621hQ2lCDi-7h5uYhhwkBGDAyks7js3hWEgQX0Ey5e3RI_GfsPwNz4qnlsn3zLVWC00F__0m00)
77+
## Badges
78+
79+
![C++](https://img.shields.io/badge/c++-%2300599C.svg?style=for-the-badge&logo=c%2B%2B&logoColor=white)
80+
![ViewCount](https://views.whatilearened.today/views/github/piyush26c/Uber-Low-Level-Design.svg) ![GitHub](https://img.shields.io/github/last-commit/piyush26c/Uber-Low-Level-Design)
81+
## Authors
82+
83+
- [Piyush Rajendra Chaudhari](https://github.com/piyush26c)
684

7-
![Click here for UML Class diagram](https://www.planttext.com/api/plantuml/svg/l5ZPRjiu57ttLn1zAEI1dGy80gEUs6qC94vWootcoM0asYQW3I9TJ96cFpOFyqdzXN8NnSLnLxzOvDqFxxsyqjV__dz3A6pfiIm60rnHrEvWXi13YpDSxTUqXHJjFu6d0H2_9_X8s5v6dq46Y-nOC3BdHKbMLuG2Se0johSDRQ_I5ZTtYC8Pf73o6ZJsUdW9ylhuM22fzekjrp6T30VFWq5MG4B03EtWiQ0HvtwNGs6hmg-8G-FF4pSC7S8AKhRxDoGe_yDXn2sBK4uu5WodovLPYp-YzWxIxF12ofISHx8diOYyW2n6AJhn5OTTi5Fd5a52KrmY4M7CsL_gO0_zq_Q5fo-uo4yX7AUESKDneIDvObLDSVOCMd6kQSsOsN-ocgQBvJlGoEFctejzHmYJ6xm_I1vVvB6k2uuigeubK5HfThEShjUBTylvJ2plb_FjEfskn2BzS2yMQxcwMStdrlhj_MPbBnVlDLKRIbUB1xwLRjPXQxCL4rfjxvVRz6Q-_J3znzwThlY_PEHwK_NyCDsirUFrT7azlxrLg_bonfww_Aap5dvTQNnbcG5MfvWUSzJVhAkzjQj54qLkRfNG29WTBJ4CfOwMjzBPJa7bqjZAGoqo0QJDsE84GqweOL1dsU8SjVAqU_kvo3wBq7CZ2QflriA14GXJPyBw29WSwqmhAFQ8Mfi9Ip_9QwWpookNJ1ooDcDlXY3lnMLVG4BE02vA1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