KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Remote vs. Local
PRODUCT: 4D | VERSION: 12 | PLATFORM: Mac & Win
Published On: June 17, 2011

4D documentation uses the terms "remote" and "local" in two different contexts:

  • Single-user vs. Client-Server databases
  • Replication

It is important to understand that, for each context, the definitions of remote and local are different.

Single-User vs. Client-Server

In this context the terms refer to the software "4D"; i.e. the 4D application. They mean the following:
  • Local: when 4D is in "local mode" it means that it has a database open and is not connected to a server. This corresponds to the previous "4th Dimension" application. This is often called "Single-User" mode as well.
  • Remote: when 4D is in "remote mode" it means that it is connected to a 4D Server. This corresponds to the previous "4D Client" application.

Replication

For replication the terms local and remote are actually defined in two contexts:
  • Code Context
  • Software Context

Code Context

In 4D code, the local database is always the application making the SQL call. The remote database is the database that is receiving the SQL call. This is not necessarily as simple as it sounds. If the SQL call executes on a 4D Server for example, using the Execute On Server command or method property, the “local” database is that 4D Server.

Just remember that wherever the SQL call executes is the local database and wherever the 4D SQL Server receives the call is the remote database in all cases. It is not a question of 4D software but, rather, a question of where the code executes.

Software Context

With the previous definition in mind, it is important to note there are some restrictions on which 4D license can be used for replication in deployment. In terms of software, the possibilities are:
  • 4D Local Mode (including merged applications a la 4D Unlimited Desktop)
  • 4D Remote Mode
  • 4D Server

The remote database must always use a 4D Server license. The 4D Server license is what provides the ability for the database to act as a SQL server and thus support replication calls.

The local database has a few more options in terms of software and licensing. First, any piece of 4D software can act as a local database (remember the local database is where the SQL call originates). There are some licensing restrictions however: without a “SQL Pass-through” license (e.g. 4D SQL Desktop) unlimited reads are allowed but writes can only be done twice within 24 hours.

For REPLICATE this means any 4D software can be used, since REPLICATE is only read access. For SYNCHRONIZE, it is important to understand that synchronization would only be possible twice a day without a full SQL Pass-through license.

Be sure to contact 4D Sales in order to analyze the most cost-effective way to support replication.