Able to create expression in Globals ?
Hi,
I like to validate some use cases and have the following question. I am relatively new to IRIS. Perhaps someone can help:
1. I have a global m[x,y,z,f] distributed across multiple sharded instances
2. I know that i can set assign computed SQL expressions to class variables using Objectscript
3. Is there a possibility in Globals API to do the same ? Set f = x + y as a computed expression in the global m[x,y,z,f] ?
a. We would want to use the global API to change f programmatically using code
b. the change in the expression would be distributed across all sharded instances
c. f changes whenever x or y changes
I didn't find anything in the documentation.
Thank you
Frank
Hello!
Can you elaborate on your high-level use case:
Any particular reason you decided to use globals instead of tables/classes? Article on how globals/tables/classes interact.
In general your task can be solved in two mainstream and one additional way:
Additionally if you need to just check a condition (i.e. that f>0) you may not need an f value as by applying functional analysis, you can solve the issue analytically if f is a continuous function.
In addition to Eduard's response: sharding is a feature of our SQL / Objects layer. Raw globals are at a level below what we'd need for hooking in the workload distribution you're referring to.
Eduard, Benjamin. Thanks a lot, very helpful perspective.
To add, globals can also be distributed across several InterSystems IRIS instances via global mapping or ECP/Distributed Caching.
To add what Ed added see also Subscript Level Mapping of globals.