LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Possible transfer executable code (plugin) over tcp in client/server architecture?

I'm aware of various LabVIEW plugin-style frameworks/architectures. I'm curious if it is possible to accomplish the following scenario.

 

Server: This application sits on the main work cell PC. It talks to various device drivers that are running on PC's connected to the actual devices that are accessible within the work cell. 

 

Clients: These "drivers" receive commands from the server to perform specialized tasks on "widgets" that are brought to their station. The devices/clients are quite varied, with vastly different parameters to perform vastly different operations on the "widget".

 

Let's say we buy some new device to add to the work cell. Is there a way to have the experience be something like, install driver/client on the directly attached device PC. On first run, the client looks for a server on the network, establishes a connection, transfers the necessary pieces to the server (VIs, controls, packed library, I don't know), and have the server make this new device available for use (basically it would utilize the transferred "stuff" to know what sort of parameters/controls to send to the client, and also for the operator at server station so that they can specify these parameters when designing a work sequence for a widget)? I know it's certainly possible if everything is merely text based, but I'd really like to have a more simple/functional plugin architecture, where the operator at the server can use actual LabVIEW controls and plugin logic to tell the server what to send to the clients.

 

I'm struggling for a better way to describe all this, hopefully it makes sense as is.

 

I'm curious whether this is basically/simply even possible with LabVIEW (I think it is), and then what sort of frameworks/architectures/examples I need to research and look at.

Thanks in advance. 

0 Kudos
Message 1 of 2
(626 Views)

Possible? I expect yes.

Complicated? Possibly, depending on what you want to do.

 

Some assumptions:

  1. Both the server and client are executable files.
  2. Your plugins will be implemented as packed libraries or some other form of VIs with compiled code included.
  3. Each plugin will need to include the client side code (how to actually do X), the server side code (configuration UI, handling results, etc.) and the protocol for connecting the two sides.
  4. Probably something else I didn't think of.

For something like this, I expect you will need to establish a standard protocol for checking which functionality the client wants and whether the server supports it, and if it doesn't, move it to the server (maybe by copying to a shared folder with write permissions or using something like FTP or reading the binary data of the file and passing it over a TCP connection to be written on the other side). Then, have the server load the new file and inform the client that it does support the functionality.

 

You would also need a standard way for the server to interact with different sections of the plugin (such as showing the relevant UI sections). I don't know of any specific frameworks to point you to off the top of my head, but there are certainly examples of working with actors over TCP (for example, the actor framework has the network endpoint, messenger library should have some examples built in. I believe DQMH also has some templates for this).

 

You would probably want to start with a basic proof of concept to see how it works.

 

Incidentally, I'm not sure that the design you suggest is actually a good one. It might be preferable to have all of the code only in the server and just have the client ask the server "do you support X?".


___________________
Try to take over the world!
0 Kudos
Message 2 of 2
(569 Views)