Mike,
There are SO many ways to do these processes. VFP can launch other VFP COM objects and become multi-threaded. VFP has a project that Bill mentioned earlier and I have never touched ParallelFox C# has the ability to multi-thread and use a VFP COM object.
You're bottleneck is the API. Does the API also have a threshold that will block you for a time? As an example of what I mean, the one of APIs I have written code to connect with only allow 5 calls a second. Making a 6th call in the same second will block the access token for 60 seconds. It's nice enough to inform me of the wait period I need when it is blocked. Testing proofed that. I keep that in mind when researching new APIs to use.
One thing I discovered with VFP and using the Winsock COM object to make calls to an API. The HTTP port will remain open for a short time. Even closing the COM object doesn't release the port. So a number of calls and the ports stay open for a period. We had a customer change a Registry setting to reduce the time the port will stay open and it helped with an odd accessing an API. I will need to dig up the support history to know what that registry key is, and the actual error.
Tracy
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Ed Leafe Sent: Monday, August 03, 2020 8:38 AM To: profoxtech@leafe.com Subject: Re: Task: Process thousands of records through a regular process -- multiple EXE runs to cut down processing time??
On Aug 2, 2020, at 18:24, MB Software Solutions, LLC mbsoftwaresolutions@mbsoftwaresolutions.com wrote:
Thanks for the ideas. Honestly, it's the API that's the slow part of the whole mix. That's the vendor's programmers; out of my control.
How you call the API is under your control, though.
I don’t have the first idea how this would be done in VFP, but in general you get around a blocking task by using some async design. The most direct approach would be multiple threads, but some languages have a callback design. One of the reasons that the Go language became wildly popular over the past few years is that is async is a fundamental design in the language: https://medium.com/@gauravsingharoy/asynchronous-programming-with-go-546b96c....
-- Ed Leafe
[excessive quoting removed by server]