In version 5 we will be introducing a new supporting data service - shared memory. From a technical standpoint, the shared memory is centralized key-value storage that is physically located in the same repository where data connectors are stored.
If you’re not familiar with the concept of key-value storage, you can think of it as a Windows registry where values are stored by a certain path (key).
At this point, there are 4 operations that can be done with the shared memory:
The operations are performed using the new “Shared memory” action. It has 4 respective commands:
Remember (store) a value by associating it with a key. For instance:
Key is “Date of the last update”
Value is “2021-07-13”.
A key can be composite, for instance, “Database\Customers\Date of the last update”. Composite keys are separated with a backslash.
Retrieve the value associated with a key.
Erase a key and its value from the shared memory.
List all keys that start with a given substring, and their associated values.
The shared memory can be convenient in many cases:
- Store temporary values - E.g. store the last loaded date when doing incremental loads.
- Pass values between workflows and users - Similarly to the shared connectors, the shared memory can be accessed from different Desktops. Once a value is remembered, it can be accessed by all Desktops and Server spaces that use the same repository
- Environment configuration - The shared memory can be used to store configuration settings that are different in PROD and TEST environments.
- Workflow variable - While project parameters are constant and don’t change during a workflow run, the shared memory values can be set, removed, and changed in a single workflow
- Lightweight data store - Sometimes, using a relational database to store and share just a few values looks like overkill. The shared memory can be more appropriate for such cases.
- Access restriction - the same access restrictions as for data connectors apply
- Concurrency - the shared memory supports simultaneous operations from different computers
- EasyMorph data types - values are remembered and recalled in exactly the same data types as in EasyMorph - number, text, boolean, empty value. Errors can’t be remembered by design.
- Big values - you can store large text objects, such as JSON in the store
- Encryption - all stored data is encrypted