You asked for a way to run multiple clients on the same computer AND simultaneously connect them to the same 4D Server. We not only heard you, we’re giving you even more with 4D v17 R5! Each connection now includes a separated cache folder containing the connection’s IP address, port, and a hash code. Thanks to this, you can now also connect several clients from the same machine to multiple servers on different machines. There’s no configuration necessary, just launch and watch it work!
Sometimes you (or your customers) need to quickly switch to a different task without closing an application, in other words: start a new instance. Now, you can simply duplicate the application and continue working simultaneously with another instance.
Cached resources for applications are now automatically stored in separate directories for each instance and connection:
- Windows: “…\AppData\Local\4D\{DBName}_{ServerIP}_{ServerPort}_{unique key}”
- macOS: “…/Library/Caches/4D/{DBName}_{ServerIP}_{ServerPort}_{unique key}”
To allow multiple instances to simultaneously connect to a single 4D Server, a “unique key” is automatically added to the cache.
Addition for Windows
For Windows machines, a new ClientWinSingleInstance key is available in the XML file used by the BUILD APPLICATION command. It can be used to specify whether or not multiple instances of a client application can be launched simultaneously.
The key is set to false in the example below, meaning that multiple instances of the client application can be launched.
<Preferences4D>
<BuildApp>
<CS>
<ClientWinSingleInstance> False </ClientWinSingleInstance>
</CS>
</BuildApp>
</Preferences4D>
If the key is set to true (or is omitted), only a single instance can be launched.
Check out the documentation for more information.