LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

best method of client/server programming

Hi all,

Has anyone tried to program a simple client/server with labview. I am
trying to find the best method of messaging between a server and multiple
clients in an attempt to remove server activities from my graphical user
interface. I have looked into using, queues, datasocket, notification and
global variables as possible methods of transferring messages.
At this stage, both the server and clients will be on the same PC, but this
may change in the future.

Are there any other methods to consider? If so, what are the compromises
(there always seems to be compromises) compared with the above options.

Any suggestions as to the best method, would be greatly appreciated.

cheers
John
0 Kudos
Message 1 of 4
(2,770 Views)
I should probably add that the problem that i am having is making the server
respond to the correct client (the one which initiated the server call).
with regards to queues, is there any way to tell which instance of a client
vi was responsible for sending the request to the server?


"sup" wrote in message
news:aZX%6.18881$e5.44098@newsfeeds.bigpond.com...
> Hi all,
>
> Has anyone tried to program a simple client/server with labview. I am
> trying to find the best method of messaging between a server and multiple
> clients in an attempt to remove server activities from my graphical user
> interface. I have looked into using, queues, datasocket, notification and
> global variables as possible methods of transferring messages.
> At this stage, both th
e server and clients will be on the same PC, but
this
> may change in the future.
>
> Are there any other methods to consider? If so, what are the compromises
> (there always seems to be compromises) compared with the above options.
>
> Any suggestions as to the best method, would be greatly appreciated.
>
> cheers
> John
>
>
>
>
>
0 Kudos
Message 2 of 4
(2,770 Views)
I would suggest making the client identification inherent to the queue elements themselves. I'm not sure what data structure you're queuing up, but a simple idea would be to make your queue elements consist of clusters flattened to strings, where the first element of every cluster is the hostname of the client who pushed that queue element in.

I'm sort of making the assumption here that you have the LabVIEW environment at your disposal when adding elements to the queue. If you don't, and you need something simpler, then the advice might be less helpful.

As for examples, I always fall back on "Date Server" and "Date Client" in the examples\comm\tcpex.llb library. That example uses LV 4-style queuing instead of the queue structures introduced in LabVIEW 5, b
ut it's a great place to start for client-server programming in LabVIEW.

Regards,
John Lum
National Instruments
0 Kudos
Message 4 of 4
(2,770 Views)
If you are going to run the client and the server in different machines i think the only sollution you mentioned is datasockets, but would add TCP/IP as a valid utility, i've used it and works well, looking into examples shped with LV and searching developer zone for examples about TCP/IP helped me to create a client/server structure quite easily.
Hope this helps
0 Kudos
Message 3 of 4
(2,770 Views)