User Tools

Site Tools




31 Use Cases

Depending on the use-case at hand, any DQMH module can facilitate GenNet communication in one of two ways:

Transparent Use

This is the default use-case

Modifying a DQMH module to be Generic-Networking-enabled makes the 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 (forwarding requests via network) on one side and as server (receiving requests via network) on the other side.

What is "Generic-Networking-enabled"?

Overriding the default DQMH Message Queue class and making a number of modifications to the DQMH module:

  • A new MessageQueue class inherits from Delacor_Lib_QMH_Message Queue.lvclass
    • has a member variable “relay via network?”
    • has member variables for network configuration (ip addr, port, timeout)
  • All notifications for requests are of datatype variant
    • this allows for generic access to the notifier reference
    • actual datatype of event's notification is inside variant
  • Functions for relaying messages via network
    • During configuration, a GenNet-Client module is started dynamically
    • The calling module's message queue object is handed to the GenNet-Client Start
  • Functions for receiving networked messages
    • During configuration, a GenNet-Server module is started dynamically
    • The GenNet-Server module creates a Listener and opens a port for incoming messages
    • The calling module's message queue object is handed to the GenNet-Server Start

Manual Use

Adding the GenNet helper modules (GenNet-Server and GenNet-Client) manually to a common DQMH module provides an alternative way of using the GenNet functions with any given DQMH module. Naturally, this comes with additional work and less automatism.

Technically, this is done by manually adding the code for starting and stopping the helper modules and for calling the network communication functions.

code/dqmh/generic-networking/use-cases.txt · Last modified: 2020/08/28 13:38 by joerg.hampel