4D Blog

Home Product Multiple servers, one shared local resources

Multiple servers, one shared local resources

October 27, 2020

Product

There may be times when you might need users to connect to many instances of the same merged server application. When this happens, the merged client application downloads as many local resources as the server connections. But if your server’s Resources folder is huge, this can be quite a drain on time, volume, and network! Fortunately, 4D v18 R5 has a solution for this scenario!

Connecting your remote application to several servers, as described in the above picture, results in obtaining this local Resources folder in the system:

blank

Rather than using the server’s time-consuming Resources folder, you have the ability to share the same local Resources folder between all these strictly identical servers.

Legacy REMOTE applications

A new buildApp key is at your disposal to share the local Resources folder:

<BuildApp>
  <CS>
    <ClientServerSystemFolderName>myApp</ClientServerSystemFolderName>

When connecting to a server, the server information is replaced by the string you set when building the application. We’ve kept the final key to allow you to use as many remote applications as you want on the same computer. The local Resources folder now looks like this:

blankYou can always connect to the server using the built-in login dialog. In this case, the cache folder that is used is no longer the one composed of your custom information (application name, IP, and port), but the one set when the application was built.

REMOTE running CUSTOM connection DIALOG

In this blog post, we learned how to use a connection database instead of the legacy 4D connection dialog in your merged remote applications. The behavior is based on using a custom 4DLink file with the OPEN DATABASE command.

You can define the local resources root name using the new key cache_folder_name in the 4DLink file.

Using the same example as in the previously mentioned blog post, here’s the code snippet from a server selection dialog where Form.selectedServer contains the 4D Server information:

If (Form.selectedServer#Null)
 C_TEXT($xml)
 C_OBJECT($link)
 $xml:="<?xml version=\"1.0\" encoding=\"UTF-8\"?><database_shortcut is_remote=\"true\" server_database_name=\"FA_RemoteConnexionServ\" server_path=\""+Form.selectedServer.IP+":"+Form.selectedServer.portID+"\" cache_folder_name=\""+Form.selectedServer.customCacheFolder+"\"/>"
 $link:=Folder(fk user preferences folder).file("server.4dlink")
 $link.setText($xml)
 OPEN DATABASE($link.platformPath)
End if

Keep in mind

If you modify your server application package, the automatic local resources update will be performed for each different package. But as long as all your server application packages are strictly identical, the local resources are downloaded only when needed: at the first server connection!

Discuss

Tags Deployment, v18 R5, v19

Latest related posts

  • January 22, 2026

    Transform Static Documents into Actionable Knowledge with AIKit

  • January 22, 2026

    Deploy Fluent UI effortlessly in your 4D applications

  • January 21, 2026

    Searching Across Host Projects and Components in 4D

Avatar
Damien Fuzeau
- Product Owner - Damien Fuzeau joined the 4D Product team in February 2019. As a Product Owner, he is responsible for writing user stories and translating them into functional specifications. His role also involves ensuring that the delivered feature implementations meet customer needs. Damien holds a degree in Software Engineering from the University of Nantes. He spent over 23 years at his previous company, first as a developer (discovering 4D in 1997), and later as Engineering Manager and Software Architect. The company was an OEM partner of 4D and deployed enterprise software based on 4D for thousands of users across hundreds of servers. Damien is therefore well-versed in 4D development and deployment in multilingual environments.
  • Deutsch
  • Français
  • English
  • Português
  • Čeština
  • Español
  • Italiano
  • 日本語

Categories

Browse categories

  • AI
  • 4D View Pro
  • 4D Write Pro
  • 4D for Mobile
  • Email
  • Development Mode
  • 4D Language
  • ORDA
  • User Interface / GUI
  • Qodly Studio
  • Server
  • Maintenance
  • Deployment
  • 4D Tutorials
  • Generic
  • 4D Summit sessions and other online videos

Tags

4D-Analyzer 4D AIKit 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 20 R10 21 21 R2 Administration AI Artificial Intelligence Build application Class Client/Server Code editor Collections Compatibility settings Formula Listbox Logs Mail Network Objects OpenAI ORDA PDF Pictures Preemptive Programming REST Scalability Security Session Source control Speed Spreadsheet Tutorial UI User Experience vscode Web Word processor

Tags

4D-Analyzer 4D AIKit 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 20 R10 21 21 R2 Administration AI Artificial Intelligence Build application Class Client/Server Code editor Collections Compatibility settings Formula Listbox Logs Mail Network Objects OpenAI ORDA PDF Pictures Preemptive Programming REST Scalability Security Session Source control Speed Spreadsheet Tutorial UI User Experience vscode Web Word processor
Subscribe to 4D Newsletter

© 2026 4D SAS - All rights reserved
Terms & Conditions | Legal Notices | Data Policy | Cookie Policy | Contact us | Write for us


Subscribe to 4D Newsletter

* Your privacy is very important to us. Please click here to view our Policy

Contact us

Got a question, suggestion or just want to get in touch with the 4D bloggers? Drop us a line!

* Your privacy is very important to us. Please click here to view our Policy