Skip to content

Commit 9ff8027

Browse files
authored
Merge pull request #21 from algosup/PR-branch
[Pull Request] Technical Specifications
2 parents 39ecf2b + 269e565 commit 9ff8027

File tree

11 files changed

+464
-109
lines changed

11 files changed

+464
-109
lines changed

documents/FunctionalSpecifications.md

Lines changed: 59 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -8,38 +8,43 @@
88

99
![-](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/rainbow.png)
1010

11-
1211
<details>
1312
<summary>📖 Table of content</summary>
1413

15-
16-
- [I. Overview](#i-overview)
17-
- [A. Project summary](#a-project-summary)
18-
- [B. Out of Scope](#b-out-of-scope)
19-
- [C. Personas](#c-personas)
20-
- [D. Use case](#d-use-case)
21-
- [II. Functional requirements](#ii-functional-requirements)
22-
- [A. Node and Path Management](#a-node-and-path-management)
23-
- [B. Fastest Path Calculation](#b-fastest-path-calculation)
24-
- [C. REST API Specification](#c-rest-api-specification)
25-
- [III. Non-Functional Requirements](#iii-non-functional-requirements)
26-
- [A. Programming Language](#a-programming-language)
27-
- [B. Performance](#b-performance)
28-
- [C. Scalability](#c-scalability)
29-
- [D. API Accessibility](#d-api-accessibility)
30-
- [E. Data Format Compatibility](#e-data-format-compatibility)
31-
- [F. Reliability](#f-reliability)
32-
- [IV. Feature of the API](#iv-feature-of-the-api)
33-
- [V. Future improvement](#v-future-improvement)
34-
- [1. Advanced Pathfinding Features](#1-advanced-pathfinding-features)
35-
- [2. Scalability and Performance Enhancements](#2-scalability-and-performance-enhancements)
36-
- [VI. Glossary](#vi-glossary)
14+
- [Functional Specifications](#functional-specifications)
15+
- [I. Overview](#i-overview)
16+
- [A. Project summary](#a-project-summary)
17+
- [B. Out of scope](#b-out-of-scope)
18+
- [C. Personas](#c-personas)
19+
- [D. Use case](#d-use-case)
20+
- [1st use case](#1st-use-case)
21+
- [2nd use case](#2nd-use-case)
22+
- [3rd use case](#3rd-use-case)
23+
- [II. Functional requirements](#ii-functional-requirements)
24+
- [A. Node and Path Management](#a-node-and-path-management)
25+
- [B. Fastest Path Calculation](#b-fastest-path-calculation)
26+
- [C. REST API Specification](#c-rest-api-specification)
27+
- [III. Non-Functional Requirements](#iii-non-functional-requirements)
28+
- [A. Programming Language](#a-programming-language)
29+
- [B. Performance](#b-performance)
30+
- [C. Scalability](#c-scalability)
31+
- [D. REST API Accessibility](#d-rest-api-accessibility)
32+
- [E. Data Format Compatibility](#e-data-format-compatibility)
33+
- [F. Reliability](#f-reliability)
34+
- [IV. Feature of the API](#iv-feature-of-the-api)
35+
- [V. Future improvement](#v-future-improvement)
36+
- [1. Advanced Pathfinding Features](#1-advanced-pathfinding-features)
37+
- [Dynamic Weights:](#dynamic-weights)
38+
- [Multi-Criteria Optimization:](#multi-criteria-optimization)
39+
- [2. Scalability and Performance Enhancements](#2-scalability-and-performance-enhancements)
40+
- [Distributed Computation:](#distributed-computation)
41+
- [Pre-processing and Caching:](#pre-processing-and-caching)
42+
- [Glossary](#glossary)
3743

3844
</details>
3945

4046
![-](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/rainbow.png)
4147

42-
4348
# I. Overview
4449

4550
## A. Project summary
@@ -52,60 +57,73 @@ SmashThePath aims to determine the time between two nodes and find the fastest w
5257
|-|-|
5358
|The project aims to teach us a simple and useful way to manage travel with our API[^restapi] . It is not intended to be very large or commercially viable by the final deadline. |To complete this project, we need to create an API that meets our requirements. An overly complicated interface could be difficult for new users to handle.
5459

55-
5660
## C. Personas
61+
5762
This project will not include personas, for the simple reason that the people who will use it, must understand how it works and be able to code a software to use SmashThePath effectively.
5863

5964
## D. Use case
6065

6166
### 1st use case
62-
![schema](image/Schema.png)
67+
68+
![schema](images/schema1.png)
6369

6470
### 2nd use case
65-
![schema2](image/schema2.png)
71+
72+
![schema2](images/schema2.png)
6673

6774
### 3rd use case
68-
![schema3](image/schema3.png)
75+
76+
![schema3](images/schema3.png)
6977

7078
# II. Functional requirements
79+
7180
## A. Node and Path Management
81+
7282
The system shall allow defining nodes (landmarks) and their connections with specified travel times.
7383
It shall support reading node and connection data[^data] from a file (e.g., USA-roads.csv).
7484

7585
## B. Fastest Path Calculation
86+
7687
The system will calculate the fastest path and total travel time between two nodes based on the given data.
7788
It provide an ordered list of landmarks in the path.
7889

7990
## C. REST API Specification
91+
8092
Expose a GET[^get] endpoint that accepts:
8193
Input: Source and destination node IDs.
8294
Output:
8395
Travel time.
8496
Ordered list of landmarks in the path.
8597
Response formats: JSON and XML[^jsonxml] .
8698

87-
8899
# III. Non-Functional Requirements
89100

90101
## A. Programming Language
102+
91103
The software must be implemented in C++ to ensure optimal performance and efficient memory handling.
92104

93105
## B. Performance
106+
94107
To prioritize speed over precision, our solution can use heuristics, provided the returned path's duration does not exceed the shortest possible path by more than 10%.
95108

96109
## C. Scalability
110+
97111
The software must efficiently handle large datasets (e.g., 24 million nodes in USA-roads.csv).
98112

99113
## D. REST API Accessibility
114+
100115
The REST API must run on an HTTP server accessible via localhost or public network and support concurrent requests.
101116

102117
## E. Data Format Compatibility
118+
103119
The system shall ensure compatibility with CSV files and handle potential errors like missing or malformed data.
104120

105121
## F. Reliability
122+
106123
The system must ensure accurate results for pathfinding, even under high load or large datasets.
107124

108125
# IV. Feature of the API
126+
109127
The travel time between the node A and the node B.
110128

111129
You can also use other coding language to use the SmashThePath (XML/JSON).
@@ -114,26 +132,35 @@ You have the time to find the path.
114132

115133
You have the number of node.
116134

117-
![Path](image/Path.png)
135+
![Path](images/responseJSON.png)
118136

119137
# V. Future improvement
138+
120139
## 1. Advanced Pathfinding Features
140+
121141
### Dynamic Weights:
142+
122143
Incorporate real-time data such as traffic conditions, weather, or road closures to dynamically adjust travel times.
144+
123145
### Multi-Criteria Optimization:
146+
124147
Allow users to optimize paths based on multiple criteria, such as shortest distance, fastest time, or cost.
125148

126149
## 2. Scalability and Performance Enhancements
150+
127151
### Distributed Computation:
152+
128153
Implement distributed graph processing using frameworks like Apache Giraph or GraphX to handle extremely large datasets.
154+
129155
### Pre-processing and Caching:
156+
130157
Pre-process and cache the shortest paths for commonly requested queries to reduce response times.
131158

132-
# VI. Glossary
159+
# Glossary
133160

134161
[^data]: Facts and statistics collected together for reference or analysis. [Source](https://dictionary.cambridge.org/dictionary/english/data)
135162

136-
[^restapi]: An application programming interface (API) that follows the design principles of the REST architectural style. [Source](https://www.redhat.com/en/topics/api/what-is-a-rest-api)
163+
[^restapi]: An application programming interface (API) that follows the design principles of the REST architectural style. [Source](https://www.redhat.com/en/topics/api/what-is-a-rest-api)
137164

138165
[^cpp]: An object-oriented programming (OOP) language that is viewed by many as the best language for creating large-scale applications. [Source](https://en.wikipedia.org/wiki/C%2B%2B)
139166

0 commit comments

Comments
 (0)