DQMH Consortium Toolkits Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Generic network modules by joerg

Solved!
Go to solution

Hello,guys,
Recently,I am working on a distributed system which I used generic networks modules  by Joerg Hampel. The code is beauty I have to say.

1. I am using these Generic network modules to do a distributed system,both are running on windows PCs.

I have 1 server responsible to listen the Status msg(1hz) from multiple clients ,but only allowed to listen the stream Acquisition Data(10hz)from one specific client in the same time . And the server also need configure the Test info to different client.Please see attached Flow Chart picture.

The Acquisition Data and Status msg send via TCP by clients,The Test info send via UDP by sever,all clients will received the Test info,but I only need one specific client received. Is any inappropriate about my flow?

 

2. After I test my code with 24hrs, I found the memory comes very high(400m) in the client end. Is there any incorrect with my code?

 

Your comments would be highly appreciated!

Message 1 of 3
(2,581 Views)
Solution
Accepted by topic author 阿斯顿

Hey 阿斯顿, glad to hear that our Generic Networking modules are useful to you! We have a lot of work on our hands at the moment and little time left for the forums, but I'll try and give my thoughts here:

 

In general, the Generic Networking enabled modules make most sense when you want to use  a module's API in one application and have its code executed in another application. I.e., use the same module (identical source code) in both applications and configure it as client on one side and as server on the other side. See the GenNet-Proxy module of the example project.

 

If you only want to make use of the generic networking helper modules (GenNet-Server and GenNet-Client), you can also start and use them with an out-of-the-box DQMH module. See the RemoteControl module of the GenNet example project. 

 

Make sure to look at the little documentation that's already available, too.

 

Regarding 1., what you have right now seems to be working for you, good! I think I would go with a TCP connection for sending test data to the selected client instead of UDP. When the client connects to the server, the server knows the address of the client. It could then open a second connection, as a client, to a server module running on the client. The "Status" could be implemented as broadcasts, as the client probably doesn't care if anybody actually receives it?

 

As to question 2, we have not run into any memory problems so far.

 

sketchsketch




DSH Pragmatic Software Development Workshops (Fab, Steve, Brian and me)
Release Automation Tools for LabVIEW (CI/CD integration with LabVIEW)
HSE Discord Server (Discuss our free and commercial tools and services)
DQMH® (The Future of Team-Based LabVIEW Development)


Message 2 of 3
(2,416 Views)

Joerg,

Thanks for you prompt comments! I took several days to digest your information.

 


@joerg.hampel  已写:

In general, the Generic Networking enabled modules make most sense when you want to use  a module's API in one application and have its code executed in another application. I.e., use the same module (identical source code) in both applications and configure it as client on one side and as server on the other side. See the GenNet-Proxy module of the example project.

 

If you only want to make use of the generic networking helper modules (GenNet-Server and GenNet-Client), you can also start and use them with an out-of-the-box DQMH module. See the RemoteControl module of the GenNet example project

Yes! The code would be more reusable if  able to use same module in two applications. In my project, I need figure two different user interface for server end and clients end, I think it is also ok if only use generic networking helper modules separately.

 


@joerg.hampel  已写:

Regarding 1., what you have right now seems to be working for you, good! I think I would go with a TCP connection for sending test data to the selected client instead of UDP. When the client connects to the server, the server knows the address of the client. It could then open a second connection, as a client, to a server module running on the client. The "Status" could be implemented as broadcasts, as the client probably doesn't care if anybody actually receives it?

 

Thanks for your time to post the sketch, it makes me more clear about this GenNet Module. Here is my sketch,the server end will send test info or start/stop test via TCP(with a GenNet-client). And the clients will send test status via UDP broadcast, the test data will also be send via UDP broadcast no matter the server need or not.  

 

c407623f5c5500f9e47aa3eaad5e1e4.jpg

Thanks for you proposals !

Message 3 of 3
(2,352 Views)