GetServerChanges 

(RPC Manager Library)

Description:              Launched by RPC Manager on a service server to obtain the service's synchronization data (i.e. called by RPC Manager during startup synchronization on a server to get the package of RPCs that create a synchronizable state on the client which is in step with the server).

Returns:                See comments

Usage:                       Steady State

Format:                      \RPCManager\GetServerChanges(RevisionInfo, PackStreamRef, Client)

Parameters:             RevisionInfo     { ?? }  { required }  { no default }

                                              The revision information from the GetClientRevision call made on the synchronizing client.

                                    PackStreamRef     { pointer }  { required }  { no default }

                                              A pointer to a variable to obtain changes.

                                    ClientName     { text }  { required }  { no default }

                                              The name of the client.

Comments:               GetServerChanges() should never be written as a subroutine, as it will run on the RPCManager thread, thereby suspending external machine communication during synchronization. If your GetServerChanges() takes any appreciable time, this will lead to a reduction in RPC throughput during RPC service synchronization, which may have undesirable effects. If GetServerChanges() is instead written as a launched module that slays itself when complete, the RPC thread will continue to service other RPC requests while you are building your synchronization data package. Further, if GetServerChanges() is written as a subroutine, the RPC thread can be suspended while running your GetServerChanges() script, allowing your service thread to get a time slice and modify the service data that you are attempting to sample. This may cause two PCs running the same service to end up with mismatching data. You must write GetServerChanges() as a launched module and call \RPCManager\SetDivert() as soon as you have finished sampling the synchronizable data for your service. If there is any possibility that another execution thread in your application can modify the data that GetServerChanges() is sampling during building of the synchronization package, you must protect the acquisition of the synchronization package with a CriticalSection().

Example:

For more information on GetServerChanges() including sample code, please refer to Adding Server-only Synchronization.