IPC CMTP Clarifications

Hello,

I have a few questions about the IPC CMTP:

  1. For chat.Join, if we can only use the username and password as arguments, how will we specify the port number to connect to? Are we assuming this will be fixed (and thus hardcoded?)

  2. For .chat.SendMsg, are the messages sent from one client to another meant to be run as code? Or are we simply sending the messages as text to print?

  3. I feel the code for the different server scripts authentication.q, logging.q, etc. are best defined using the .z event handlers – but defining the .z event handlers in each script will overwrite them to the most recently run script. For example, .z.pw can be defined in authentication.q to authenticate users against a user table, but .z.pw can also serve in logging.q to record attempted connections in accessLog. However, redefining .z.pw in logging.q will make void the definition in authentication.q.
    Instead of having multiple scripts, can we write one script, so that each .z event handler can be defined once with all required functionality? Or if multiple scripts are still desired, have one script for each handler?

 

Kind regards,

Michael

  1. You can use projections to layer in functionality (+ trap at @

 

q)@[{o:get .z.po;show".z.po already set - using projection to add extra feature";.z.po:{show y;x y}[o]};.z.po;{show".z.po was not set. Setting";.z.po:{show x}}] “.z.po was not set. Setting” q).z.po {show x} q)@[{o:get .z.po;show".z.po already set - using projection to add extra feature";.z.po:{show y;x y}[o]};.z.po;{show".z.po was not set. Setting";.z.po:{show x}}] “.z.po already set - using projection to add extra feature” q).z.po {show y;x y}[{show x}]

 

Can this be elaborated on slightly?

Sorry, could you explain from scratch what is happening in this code?