A new option in CopiaFacts version 8.3 provides enhanced, lock-free handling of FS files, initially principally to improve throughput at heavily-loaded multiple-node sites.
![]() | Before enabling any of the features described below, please contact Copia support to discuss an implementation plan. |
There are four parts to this feature:
•Elimination of ACTIVE lock files by locking the FS file itself, and moving it out of the TOSEND folder while it is being processed. This avoids the need to write, check and delete small ACTIVE lock files, and at the same time removes the work-in-progress FS file so that it is not at risk of being found just to be discarded by other nodes. The file is processed in a folder FAXFACTS\CALLBACK\WORK\nodename and when finished the updated FS file is moved to SENT, FAIL, PREPROC or back to a TOSEND folder for retry.
•Assigning a free CopiaFacts channel to an FS file task earlier, so that the work of performing pre-checks on the FS is handled in the channel thread, not in the thread that is searching for work. This work includes transmit-time checking for do-not-send, and phone-mask processing.
•When a CopiaFacts node is configured for specific type(s) of outbound work across all channels, and the node only handles queues which contain such work type(s), then a stack of free channels can be maintained. This avoids the need to scan all channels in the node to find one with the correct configuration to handle a specific FS file. It also makes it more efficient to monitor the free channels and to pause the scanning for work when all channels are busy.
•Integration of the interface to read FS file images from messages in an MSMQ queue.
Elimination of ACTIVE lock files
This option is selected by specifying a $environment variable named ACTIVE_WORK with a non-empty value. This option applies to all nodes, and all COPIAFACTS instances must be shut down while it is changed.
Instead of writing a lock file in the ACTIVE folder while an FS file is being processed, the FS file itself is locked and moved to a WORK\nodename folder while being processed, and moved back to a TOSEND folder, or to PREPROC, SENT or FAIL at the end of processing.
Any required changes to the FS file during processing are written to the file in the WORK\nodename folder, and the file is moved to the appropriate folder (or deleted, when $delete_option so specifies) only when processing is complete. The CLEARACTIVE process will move files out from the node's WORK folder if the COPIAFACTS engine terminates abnormally, if possible, or when the node is restarted.
![]() | The safe moving of FS files depends on the availability of a standard Windows NTFS filesystem on the fileserver on which the COPIA share resides. If you use a non-Windows network file server please consult Copia support before using this feature. |
Pre-check in the channel thread
This option is automatically selected when the ACTIVE_WORK environment variable (above) is set. It results in faster startup when a job is first launched, and reduced inter-call delay.
Constraints on channel configuration and queue content
For larger systems where specialist nodes can be set up for different tasks (eg fax-only nodes, email-only nodes), a further enhancement can be specified by using a $environment command to specify a WORK_TYPES variable. With this option, which should preferably only be set in the presence of ACTIVE_WORK, the COPIAFACTS engine maintains a stack of free channels. As soon as there are channels free and a new item is found to be processed, a free channel can immediately be allocated, avoiding the overhead of testing all channels to find a free channel which is configured to match and is ready to handle the work item.
Work types currently supported are: outbound fax, e-mail, voice and maintenance (workerbox). In this case:
•every outbound channel in the node must handle only the specified work types
•every outbound channel in the node must at all times handle any of the specified work types
•every FS file in the TOSEND queues configured for the node must contain work of the specified type or one of the specified types
•no $fax_send_channel ($fax_send_line) commands should be used to specify a restricted channel range
•no $phone_mask commands should be used which specify a restricted channel range.
Failure to maintain these constraints is likely to cause degraded performance and could result in some FS files never being processed.
If you have to configure a node for both inbound and outbound fax, channels can not be dual-purpose for inbound and outbound. If you configure a channel in this way and the node is constrained by WORK_TYPES, the channel will never be selected for outbound traffic.
FS File MSMQ integration
The FS MSMQ interface has been integrated with the methods used in version 8.x to handle CopiaFacts command files in CF9CMDFILE.DLL. A node can now be configured to consume an e-mail or SMS FS queue into which jobs can be launched using the existing Job Administration launch options.
Since the use of FS MSMQ does not require ACTIVE lock files, this option can co-exist with the ACTIVE_WORK option, although the WORK folders will not be used for items originating from MSMQ messages. In addition MSMQ launch can be used in conjunction with WORK_TYPES, and channels will (as now) continuously pull work from the queue until it empties, without the need to search for a free channel for each one.
Applications other then the COPIAFACTS engine
When the use of ACTIVE lock files has been disabled as described above, the processing in some other CopiaFacts programs is modified. For example in JOBADMIN, JOBMON, STATUS and CFCP / CFMSG the scan for active FS files will include the WORK folders, as does the 'FS counts' display in COPIAFACTS itself.
Implementation
Implementation of these features on an existing production system needs to be a planned process. Please consult Copia support for assistance before attempting to implement them on an existing system.