Using v17 ...

I'm looking at ways to update our ancient record numbering system, and I
think I should be able to do it efficiently with CALL WORKER, but having a
bit of trouble getting my head around  it.

The record numbers are like invoice numbers: each must be unique, and we
don't want to have any gaps in the numbering sequence. So we need to keep
track of any record numbers that are created and then abandoned (eg if a
user creates a new record and then cancels it).
The old system works well but it uses semaphores and SET/GET PROCESS
VARIABLE and DELAY PROCESS. I isn't very efficient, especially when a large
number of records are being imported and each one needs a new record number.
Record numbers must be assigned synchronously - processing must not
continue until the new record number has been assigned. Also, this
frequently needs to be done in a context where there is no active form, so
CALL FORM won't work.

As I see it, we'll need to call a worker, which calls the worker that
assigns the record number.
The first worker has to wait until the second one has created the new
number.
Then the original method, that called the first worker, must wait until the
first worker  gets the new number. It seems that this won't be much better
than the old method.

Am I completely barking up the wrong tree? Is this not an appropriate use
for workers? Or have I misunderstood something?

Pat

-- 
*************************************************
CatBase - Top Dog in Data Publishing
tel: +44 (0) 207 118 7889
w: http://www.catbase.com
skype: pat.bensky
*************************************************
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to