Skip to content

Archive Trac dn messaging

madscatt edited this page Jun 20, 2026 · 1 revision

Dn Messaging

Legacy Trac archive page imported from dn_messaging. Source: https://genapp.rocks/wiki/wiki/dn_messaging. Review age, links, and examples before treating as current.

messaging in genapp

  • currently only available in html5/php zmqwsmsg.png
  • the idea is a running module can send intermediate JSON output during execution to provide progress and preliminary results updates
  • user information about how it works is here
    • genapp provides some "extra fields" in the input json to support messaging
    • "_udphost" : the host ip address of the udp message server
    • "_udpport" : the port of the udp message server
    • "_uuid" : a unique id assigned to each submitted job
    • the host and ports are defined in appconfig:messaging
    • e.g.
  ,"messaging" : {
                  "wsport"     : 37777
                  ,"wssport"   : 443
                  ,"zmqhostip" : "127.0.0.1"
                  ,"zmqport"   : 37778
                  ,"udphostip" : "127.0.0.1"
                  ,"udpport"   : 37779
                  ,"tcphostip" : "127.0.0.1"
                  ,"tcpport"   : 37780
                 }
  • here we have a tcphost and port which are not currently used

  • leveraged technologies

    • ratchet provides websockets requires zeromq
    • zeromq provides zmq sockets which are used by ratchet
  • servers

    • websocket server
    • supports pub-sub on ws to topic of "_uuid"
    • listens on zmq socket for messages and broadcasts to topic ws subscribers
    • logs last messages into mongodb for reattachment
    • udp server
    • listens for udp messages and retransmits them to zmq server

plan for qt4/qt5/java

  • i am thinking that we may be able to directly interface with zeromq, so i would start there

    • rewrite udp server in target language (it should be very easy, a simple server)
    • write a replacement for msg-wsserver.php without ratchet, but using only zeromq (which supports pub-sub) directly in target language
    • listen on zmq socket and forward messages to the user interface
    • we should keep track of job uuid's and only forward if job uuid matches the one currently shown on user interface
  • new plan

    • start udp server with application start
    • when submitting jobs create uuid, add uuid host & port info (from appconfig.json) to input json
    • monitor udp messages during module execution and display on user interface if uuid matches

Clone this wiki locally