38209 ParallelFox

Parallel Processing Library for Visual FoxPro

38236

Project Manager: Joel Leach

ParallelFox is a parallel processing library for Visual FoxPro 9.0.

Although parallel processing and multi-threading have been possible in VFP for quite some time (particularly in web servers), the goal of this project is the same as parallel processing libraries that have been popping up for other development platforms. That is, to make parallel processing easier and more approachable, without all of the headaches typically associated with multi-threaded programming. This has become more important as multi-core desktop and server machines have become widespread.

38362 Get ParallelFox 1.2
Released 1/12/2012

Documentation and Installation

ParallelFox includes complete documentation (ParallelFox.chm). The Help file is designed to be used in conjunction with the training videos below. Use the Help file as a quick reference or short overview of topics. Watch the training videos for more in-depth discussions, examples, and techniques.

ParallelFox also takes advantage of Doug Hennig's Favorites for IntelliSense, which Doug also used in the MY project for Sedna. This greatly simplifies the ParallelFox interfaces and provides extra details while you are coding.

DO INSTALL to register ParallelFox.exe and install the IntelliSense scripts. See the "Installation" topic in the Help file for details.

Training Videos

These videos were recorded at a fairly high resolution. If the Flash version does not fit in your browser window, give the WMV version a try.

Introduction Flash WMV
Errata: In this video, I said that CPU speeds topped out a 3-4 "Megahertz", which was about the speed of my first computer, a PCjr. I should have said "Gigahertz". It's only a thousand-fold difference. :)

Running Code in Parallel Flash WMV

Worker Events
Part 1 Flash WMV
Part 2 Flash WMV

Last edited Jan 12, 2012 at 10:28 PM by joelleach, version 16

Comments

sebae Aug 26, 2013 at 10:08 PM 
Brilliant tool. Thanks so much!

mk_common Jul 8, 2013 at 5:04 PM 
Excellent!

amatus Jun 13, 2012 at 1:39 PM 
Let me first commend the ProJect team and Joel in particular for this important contribution to the lives of Foxers like me. Long processes are now completed in a flash. I am still experimenting in a development environment and have come across not instruction for distributing through an .exe or Installshield. In closing, I have found that passing a 'Custom' object with all the Properties that you want to the workers removes the need for passing a maximum of 21 parameters to the workers.

dCipher Feb 15, 2012 at 2:31 PM 
I only recently looked into this project and discovered that it does something similar to a project I did last year. I used the ShellExecute function in a main process to manage multiple VFP apps running in parallel to speed up a process of downloading data from 200 sites across Canada. The time went from 6 hours down to 90minutes. In my case I found I got good results using 10 worker processes on a dual core machine. However I never thought of using COM objects to do this so I like Joel's implementation much better than my own. Thanks.

ctselebis Oct 18, 2011 at 4:46 PM 
Just wanted to thank you for this wonderful Library.
We used it for our morning reports that usually took more than 3hrs and slashed it to less than 1hr.
It runs on a 4 CPU server and takes full advantage of all the CPUs...
Thanks again!

joelleach Aug 13, 2011 at 5:43 PM 
RGunther,
VisualFoxpro.Application is only used in debug mode during development. When deployed, ParallelFox.exe is used (it needs to be registered), which uses the runtime DLLs. See Deployment in the Help file for more details.

RGunther Aug 11, 2011 at 5:39 AM 
I notice the worker threads are created by using the VisualFoxpro.Application object model. Presumably this means the full Visual Foxpro developer software needs to be installed rather than just the runtime DLLs where ever an application using ParallelFox is deployed. Is this correct ?

Domin71 Jul 11, 2011 at 9:37 AM 
In call_after.prg if in Parallel.StartWorkers(FullPath("Call_After.prg"),,.t.) replace .t. by .f. this causes an error 'Class difinition Parallelfox.WorkerMgr is not found'

joelleach Feb 17, 2011 at 6:44 PM 
Hi Everyone,
Sorry if I missed some of your questions. I don't receive notification when comments are posted here, but I do when you post a message in the discussion forum. Please post any questions there and I will get back to you sooner. I also prefer forum messages over emails, so others can benefit from the discussion. Thanks!

EmersonReed Feb 10, 2011 at 1:06 PM 
Hi Joel.
Firstly, I would like to say that you're doing a great job with ParallelFox.
Actually, I'm using ParallelFox in an app that read data from DBF tables and copy them to a PostgreSQL database.
Using ParallelFox, I've made my app run faster than a C# app that does the same thing.
So, keep up the good work folk!
Said that, I would like to know if you could create a little sample showing how to handle errors using ParallelFox.
Doesn't need to be a video, a sample prg or a blog post would be great.
Thanks a lot!

pepere_jack Feb 7, 2011 at 9:18 PM 
Hi. I tried the ParalleleFox exemple but I have a single core with hyper threading. The examples runs with 10 seconds more with ParalleleFox than without. Is it supposed to be this way? I thought that HyperThreading would not be as fast than multiple core but should be better than single core with no HyperThreading. Thanks.

tjtudor Nov 15, 2010 at 6:57 PM 
Thanks! it look great practical application abound with this.

anjos3bc Oct 22, 2010 at 11:19 PM 
i got the windows 7 and "do install" send the message ParallelFox was NOT registered

joelleach Oct 20, 2010 at 5:56 PM 
EddieC, DO INSTALL to register ParallelFox on your development machine. See that last sentence in the Deployment section above.

EddieC Oct 18, 2010 at 6:38 PM 
I got the program to work fine in debug mode but when I try to run in non-debug mode I get OLE error code 0x80040154: Class not registered. In dcomconfig I verified parallelfox.workermgr is registered. So I am do not know what needs to be registered. I feel that a demo or white paper on deployment including building the projects would be useful.
Thanks for your work creating this for the VFP community.

df4x4 Aug 31, 2010 at 1:21 PM 
Ottimo e abbondante, fantastico per la gestione di applicativi per calcoli batch su grossi volumi di dati

Andrzej Aug 11, 2010 at 12:24 AM 
looks very promising :)

edyshor Jul 30, 2010 at 7:50 PM 
nothing yet ?! :(