Hello,

Hoping someone can point me in the right direction as I've never done something 
like this before.

We have a multi-user environment running v16r5. Through various means, a user 
can call a method that updates company-specific financial data. The problem is 
that it can take 30+ seconds and the user is left waiting until this finishes. 
What we want to do is this:

- Return control to the user while the task runs in the background. We want the 
task to run on the server instead of on the client machine like it's currently 
doing.
- If this user or a different user runs the task again for the same company, we 
need to queue it up somehow and do this after the previous processing finishes. 
If this user or a different user runs the task for a different company, we 
could either do the server processing at the same time since there's no data 
conflict, or queue it up if there is a risk of trying to do too many things at 
once.

I've read the language manual and understand the syntax of semaphores, which is 
what I'm thinking I need to use (but am not completely sure). Beyond the syntax 
of commands, I don't know how to implement this. For example if I'm doing an 
"execute on server", is the semaphore going to be set on the client side before 
we call the server to run its method, or is it the server method that does the 
semaphore? Is this going to be a local semaphore or global? There are 
transactions involved in the actual processing...does this impact at all how I 
need to go about doing this?

Thanks for any tips!
Ben
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to