KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Interprocess Variables are Deprecated
PRODUCT: 4D | VERSION: 19 R5 | PLATFORM: Mac & Win
Published On: May 2, 2022

Interprocess Variables have been marked as Deprecated as of 4Dv19R5. Moving forward it is best to avoid adding new Interprocess Variables and try to replace existing ones with the suggested Shard Objects, Shared Collections, or Storage. Until the feature is actually Removed, Deprecated features are still functional, so there is no rush to replace them.

Interprocess Variables are not preemptive ready, as there is not a mechinism in place to prevent conflicts when two processes are trying to update the variable simultaneously.

With the suggested replacement options, the use of the Use...End use structure adds in the protection by letting the session know that the shared item is being written to. The second process trying to access the item will see that it is being used and will wait until it is available to then write to it.

The replacement of Interprocess Variables should not be too difficult, only time consuming based on the number of Interprocess Variables. A simple strategy using Shared Objects, would be to create a single shared object for static/"constants" Interprocess variables and have a property for each Interprocess variable. This is a common use of Interprocess Variables, where they are defined once on startup as a "constant" and used throughout various parts of the code.

Commented by Guy Algot on May 16, 2022 at 9:44 PM
https://discuss.4d.com/t/preemptive-interprocess-var-storage-shared/23355
Commented by Guy Algot on May 16, 2022 at 9:38 PM
https://kb.4d.com/assetid=77806