Previous
Next

To do a simple chat without routing the messages through an appserver procedure do the following;

  • On chat participant 1
    • Press the connect button
    • Press the subscribe button
  • On chat participant 2
    • Repeat steps for participant 1
  • Type in a message on participant 1 and press the send button
    • You will see that both participant 1 and 2 will receive the message
  • Type in a message on participant 2 and press the send button
    • You will see that both participant 1 and 2 will receive the message

You can group messages together in transactions as follows:

  • Press the "Begin Transaction" button
  • Type in amessage and press the "Send" button
    • Note that the message is not received by any of the subscribers
  • Type in another message and press the "Send" button
    • Note that again the message is not received by any of the subscribers
  • Press the "Commit" button
    • Now both messages will be received together by all subscribers

Upon the sending of a message by the publisher you can route the message to an appserver procedure that looks like a CGI wrapper. You can also route the message to this appserver procedure just before it is received by the subscriber. You can use this appserver procedure to persist the message and the message event (Send/Receive) in the databaxse. You can also use it to apply a transformation to the message. You can embed any number of attributes in the form of name/value pairs in the message. The appserver procedure will be able to access these attributes.

To route messages to an appserver procedure take the following steps:

  • Enter an attribute name and value and press the "Set" button next to it
  • Enter another attribute name and value and press the "Set" button next to it
  • Select the "On Send" toggle box and press the "Set" button next to it
  • Type in a message and press the "Send" button
    • Note that the message comes back with a transformation that ...
      • Inidcates the messages was transformed by the "Send" CGI wrapper
      • Lists the attributes that were embedded in the message
      • Lists the original message
  • Now uncheck the "On Send" check box, check the "On Receive" check box and press the "Set" button next to it
  • Type in a message and press the "Send" button
    • Note that the message comes back with a transformation that ...
      • Inidcates the messages was transformed by the "Receive" CGI wrapper
      • Lists the attributes that were embedded in the message
      • Lists the original message