https://github.com/khadkarajesh/service-discovery
Telecom Service Discovery by Location of user
https://github.com/khadkarajesh/service-discovery
bigdata flask geocoding multithreading restful-api reverse-geocoding
Last synced: 5 months ago
JSON representation
Telecom Service Discovery by Location of user
- Host: GitHub
- URL: https://github.com/khadkarajesh/service-discovery
- Owner: khadkarajesh
- Created: 2022-03-26T09:34:09.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-03-28T15:46:44.000Z (over 3 years ago)
- Last Synced: 2025-01-13T10:33:29.681Z (6 months ago)
- Topics: bigdata, flask, geocoding, multithreading, restful-api, reverse-geocoding
- Language: Python
- Homepage:
- Size: 3.83 MB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
## Table of Contents
1. [Architecture Diagram](#architecture-diagram)
2. [How to Run Application](#run-application)
3. [Run Test Cases](#run-test-cases)
4. [Background Job](#background-job)
5. [Monitor Background Task](#monitor-background-task)
6. [API](#service-discovery)### Architecture Diagram
### How to Run Application
1. [Install Requirements](#install-requirements)
2. [Setup Redis](#setup-redis)
3. [Run Application](#run-application)#### Install Requirements
```shell
pip install -r requirements.txt
```#### Setup Redis
1. Install Redis in Mac
```shell
brew install redis
```
2. Start Redis Service
```shell
brew services start redis
```
3. Start Redis Service
```shell
redis-server
```
4. Redis Worker
Start redis worker from project directory as:
```shell
rq worker --with-scheduler
```#### Run Application
```shell
python app.py
```
### Run Test Cases
Navigate to the project directory and execute command
```shell
pytest
```### Monitor Background Task
[Redis Dashboard](http://127.0.0.1:5000/rq)### Service Discovery
#### Find Available Network
```
Request
-------------------------------
Method: GET
URL: /discover?q=Vitry-sur-SeineResponse, 200
-------------------------------
{
"SFR": {
"2G": false,
"3G": true,
"4G": true
},
"Orange": {
"2G": true,
"3G": true,
"4G": true
},
"Free mobile": {
"2G": false,
"3G": true,
"4G": true
},
"Bouygues Telecom": {
"2G": true,
"3G": false,
"4G": false
}
}
```### Background Job
This background jobs extracts data and generates necessary files to discover the available networks on respective location.
Redis worker must run before starting this job.```
Request
-------------------------------
Method: GET
URL: /extractResponse, 200
-------------------------------
{
"message": "job initiated to fetch city for networks"
}
```### Issues
Couldn't get the address detail for 30% of the lambert coordinates from api ```https://api-adresse.data.gouv.fr/search``` as it sends empty response. Hence, we can see only ~40k record in ```networks_with_city.txt ```