4D v13.4

Dynamic synchronization in client-server mode

Home

 
4D v13.4
Dynamic synchronization in client-server mode

Dynamic synchronization in client-server mode  


 

 

The resources explorer facilitates collaborative development in a client/server environment. It can be used more particularly to handle synchronization in real time of the contents of the Resources folder on all the connected machines. 

The main steps for Resources synchronization are as follows:

  1. Update of the Resources folder on the server in case of modification on a client machine,
  2. Notification of all connected clients,
  3. Update in real time of connected client machines.

Note: For clients that are not connected, the synchronization of the Resources folder is automatically carried out upon connection.

This mode works as follows: any modification carried out locally in the Resources folder of a remote 4D via the resources explorer is automatically transferred to the server.

The client machines connected are informed that the contents of the Resources folder have been modified:

  • either automatically by the server, two minutes after the last modification made by a remote 4D (this delay helps to avoid inopportune notification in the case where numerous files are being copied).
  • or manually via the Notify clients command in the action menu of the resources explorer (see  Using the Resources explorer) on the client machine at the origin of the modification.
  • or by programming, via the  NOTIFY RESOURCES FOLDER MODIFICATION command. This command is useful when the contents of the Resources folder are modified on the server machine via a stored procedure.

On the client side, the way the notification of any modifications will be handled depends on the settings of each machine (see the next section).

Once it has been "notified" that the Resources folder has been modified on the server, each client machine can synchronize itself. This synchronization can either be automatic or manual, depending on the preferences specified globally for the database or individually for each client machine.

This configuration can be set globally via the Database Settings or individually per client machine and per session using the SET DATABASE PARAMETER command.

Setting the update mode is done using the Update “Resources” folder during a session option on the Client-server/Network options page of the Database Settings.

Three settings are provided:

  • Never: The local Resources folder is not updated during the session. The notification sent by the server is ignored. The local Resources folder may be updated manually using the Update Local Resources command.
  • Always: The synchronization of the local Resources folder is automatically carried out during the session whenever notification is sent by the server.
  • Ask: When the notification is sent by the server, a dialog box is displayed on the client machines, indicating the modification. The user can then accept or refuse the synchronization of the local Resources folder.

Note: If the configuration is carried out in the Preferences on the server, it will be applied to all the client machines. If it is carried out on a client machine, it will only apply to that machine.

 
PROPERTIES 

Product: 4D
Theme: Resources explorer