Jump to content

Decoupling message based systems that communicate across a network


Recommended Posts

I did discuss the different options with Allen Smith at NI Week and the conclusion was for command pattern across a network, the abstraction (or interface) design was the cleanest or at least easiest to understand.

Uh, my demo is command pattern over TCP.  I needed to create two new classes and four simple VIs, and if you are willing to use standard Variant/Object messages for data then you only need one class and two VIs.  One of those VIs (configuring the command with any meta info) is optional, so that leaves a single Command.lvclass:Do.vi as the only required.  

 

Surely this is simpler than any abstraction design, no?

Link to comment

Here's an improved example.  The server is now a single VI, while the client registers two command-pattern envelopes, one for published "data" and one for the servers "shutdown" notification.  Each command requires one class with one method.  

 

Command Pattern Uncoupling Example2.zip

Edited by drjdpowell
  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.