Process Model
The process model used by Microsoft® SQL Server™ is a single process with multiple threads. When processing a BACKUP or RESTORE command, there is one thread for each virtual device.
On the client side, several process models are possible. This illustration shows the simplest model, which is one process, with one thread per virtual device.
Notice that the <x> in the preceding illustration denotes that server or client is intended. For example, IServerVirtualDeviceSet2 is used by the server process while IClientVirtualDeviceSet2 is used by the client process. The I<x>VirtualDeviceSet interface can be used by any thread in the process. The I<x>VirtualDevice interface is intended to be used by a single thread to control one of the virtual devices in the virtual device set.
Some users might require a multiple-process architecture. For that case, a special method is provided to open the virtual device set in the secondary client: IClientVirtualDeviceSet2::OpenInSecondary. In this model, rather than threads in the client process handling each virtual device, secondary processes are employed. The primary process is responsible for creating the virtual device set, configuring it, and communicating with the secondary processes. The secondary processes gain access to the virtual device set by employing the OpenInSecondary method. The secondary processes can then use OpenDevice to access the virtual devices as if they were threads in the primary process. Applications choosing this model are responsible for detecting abnormal termination of the secondary clients. The VDI will only detect the abnormal termination of the SQL Server process or the primary client. The following drawing illustrates the multiple process model, with one thread for each virtual device.