Now JMP can seamlessly connect with Python, and JSL and Python can call each other.
I have a task:
1. **Receive and extract data (py):** Every minute, use Python code to receive data from an API every 3 seconds. Extract structured data from the received data in real-time and store it in a memory array A. Immediately extract the data into another memory array B. Then, immediately clear memory array A to prepare for the next batch of data (this processing time is sufficient and will not cause blocking). At the end of the minute, use Python code to create a new JMP table (let's call it Table A) and write the structured data from memory array B into this JMP table. Finally, clear memory array B.
2. **Concatenate and stock selection (JSL):** Use JSL to append the data from the newly created JMP Table A to an existing JMP Table B. Perform stock selection calculations using technical indicators in JSL on the combined Table B. Then, close JMP Table A.
This process repeats continuously.
Which of the following two approaches is better for this situation, with a focus on stable operation and reduced system resource consumption?
A. Within a single, overarching Python script, continuously run the data receiving/extraction (py) and the concatenation/stock selection (JSL) portions, using timers.
B. Within a single, overarching JSL script, continuously run the data receiving/extraction (py) and the concatenation/stock selection (JSL) portions, using timers.
Thanks!