09-07-2019 02:57 AM
I'm sort of confused on WHEN each of these three is employed BEST?
Currently i'm heavily relying on Notifiers to shuffle data around - but im just doing it cause im used to.
Is there a concise guide around where each technique fits best (In terms of Performance and Best Practice)?
I'm specifically refering to
as i use these more or less the same but have no idea where there optimum field of application is.
09-07-2019 06:46 AM
Not really. But I'll put in my 2c.
1. Global Variables are very fast, but work best if there are less than 2 writers. 0 writers would be a fancy constant that can be used in multiple places.
2. Notifiers are typically used as a lossy message protocol to many locations. You will have to worry about timeouts and other timing situations (time will be different if a message is received).
3. Streaming Channel, as far as I am aware, is meant for a 1-to-1 communication. If you are comparing to a Glabal Variable, the closer equivalent would be the Tag Channel.
09-07-2019 07:38 AM
@Philipp_Elhaus wrote:
I'm sort of confused on WHEN each of these three is employed BEST?
Currently i'm heavily relying on Notifiers to shuffle data around - but im just doing it cause im used to.
Is there a concise guide around where each technique fits best (In terms of Performance and Best Practice)?
I'm specifically refering to
- Global Variables
- Notifiers
- One-Element Stream Channel Writers
as i use these more or less the same but have no idea where there optimum field of application is.
I believe that answering that question is important.
Could you show some examples? The use case is a factor in determining which method is "Best" and, there IS no current guideline document.
09-07-2019 09:12 PM
@Philipp_Elhaus wrote:
I'm specifically refering to
- Global Variables
- Notifiers
- One-Element Stream Channel Writers
You are mixing Apples and Oranges. Global Variables and Notifiers are both Many-to-Many methods of Asynchronous Communication (you can have Many "writers" putting data in, and many "readers" taking data out). The Channel Wire that best corresponds to the Notifier is not the One-Element Stream (a One-to-One method), but the Tag Channel. I think of it as a "Notifier, Evolved".
I would say that which one you use depends (a lot) on the specifics of the task and the nature of the communication, including the nature of the communication network (one-to-one, one-to-many, many-to-one, many-to-many), whether communcation is within a VI or between VIs, "need for speed", "need for clarity", and personal preferences.
Myself, I prefer Tag Channels for many-to-many (though I've also used Messenger Channels in this situation).
Bob Schor