I am working on a Python application where I need to update multiple databases with historical stock data. Here’s a breakdown of the requirements:
I have 5 databases, each storing candlestick data for different time intervals:
1-minute candles
5-minute candles
15-minute candles
30-minute candles
Day candles
Each database contains 50 stocks/collections, and each collection has approximately 2000 documents (representing historical data for each stock).
I need to update all the databases in parallel to ensure the historical data is processed efficiently.
My goal is to leverage GPU (Nvidia) to speed up the process.
How can I efficiently update all 5 databases in parallel?
How can I utilize the GPU (Nvidia) in Python for this task, especially to offload the computations (data processing) to the GPU?
What libraries or techniques should I use to manage parallelism and GPU utilization for this type of workload?
I am currently using MongoDB for the databases. I am familiar with Python libraries like multiprocessing and threading for parallelism but not sure how to integrate GPU processing with these. I have an Nvidia GPU and am aware of libraries like PyCUDA and CuPy, but I am unsure how to use them for database updates.