Skip to the content.

RTB Task, Ron Raifer.

Given By Start.io

This assignment was given to me by Start.io, to test my capabilities.
I have been asked to implement a service which loads the given csv files and serves REST API requests.
During the implementation, I reviewed the given data and looked for the most relevant tools to accomplish the best results. It was a great opportunity to learn new technologies!.

Tech

RTB uses a number of open source projects to work properly:

Installation

This project requires Python v3.6+ to run.

Clone the project or download it directly:

git clone https://github.com/RonRaifer/RTB.git
cd RTB

Install the dependencies, using pip, via running the next command:

 pip install -r requirements.txt

Running the App

RTB Application works in two ways: running main.py, or via terminal using uvicorn. This section will guide you and explain how to run the app in each mode.

!Run\Debug main.py

how_to_debug

!Run Via Terminal

Via terminal (IDE/cmd), enter the following:

uvicorn main:app --reload 

Next, open your browser (or Insomnia), and navigate to:

http://127.0.0.1:8000

Then, navigate to the desired request, with the relevant arguments:

http://127.0.0.1:8000/keepalive
http://127.0.0.1:8000/userStats/?user_id=YOUR_USER_ID
http://127.0.0.1:8000/sessionId/?session_id=YOUR_SESSION_ID

Swagger

To access the interactive API documentation, make sure the app is running, and then navigate to:

http://127.0.0.1:8000/docs

how_to_docs

Further Improvements

Tests

Tech

Redis might be a good idea to use.

It is possible to keep the Pivots data in Redis. By that, the data is loaded into the Cache, and we can use it as a key value storage. This allows us to maintain the data in Real-Time, instead of loading the whole data each time (locally).

Contact Info

Mail me: ronraifer@gmail.com