Saturday, September 17, 2016

group chat demo

Hi All,
For fun I've been working on a persistent group chat application similar to slack or hipchat in XPages.  The discussion app is leveraging some of the new features in  This discussion application will be deployed with the next release of along with the other sample apps.  Below is a not so imaginative persistent group chat using two different browsers (IE and Chrome).  Thanks for stopping by...


Tuesday, September 06, 2016 v3.0.0

Hi All,
Just pushed the latest release of  Available on openntf.  See below for more details:

-New Features include:
  • URI Listeners (replaced Rhino SocketEventListeners)
  • "Intervaled" Scripts to fire on a specific interval
  •  Support for the following scripting runtimes 
    • Groovy
    • JRuby (ruby)
    • Jython (python)
    • BeanShell (java like scripting)
    • Agents (LotusScript, Java)
    • Default JavaScripting engine 
  • Updated sample chat template that includes examples on how to register the different types of scripts
  • Moved all the test script code out of websocket.nsf and into a xocketstesting.nsf
  • xocketslogger template is part of the install (also demonstrates how to register scripts via command line via lotusscript agent)
  • Improved performance since all the scripts are now using the thread-pool configured on the server.


  •     Routing a message to a user on a specific page has been restored.  Was broken in prior release (e.g. /chat.nsf/chat.xsp/CN=admin admin/OU=...)
-Breaking Changes Introduced:

  •     Refactor any scripts that registered via addSocketEventListener methods to use the new methods for URI Listeners (see chat.nsf sample)
  •     A file extension must be used with the ssjs or file design elements (e.g. logger.ssjs, or 

-Scripting Runtime(s) Setup 
  • To install a scripting runtime that doesn't come with the default jvm, download the .zip file from the below, and drop the desired runtime into the Domino/jvm/lib/ext folder, then restart the domino server
  • Once installed run the command
    • tell http osgi xockets show-engines 

-Script Location in .nsf (see chat.ntf sample)
  • SSJS scripts must be placed in the script library design element with an extension of .ssjs
  • All other scripts must be created in file resources of the .nsf with the appropriate file extension
    • JRuby = .rb
    • Jython = .py
    • BeanShell = .bsh
    • Groovy = .gvy

-Code Samples:
  • All relevant code samples can be found in the latest chat.ntf template that is part of the downloaded .zip.  See the loadscripts library for an example on how to register one or more scripts  
  • Types of scripts:
    • URI Listeners only fire during the onMessage event if the target URI in the message is a match for the registered script
    •  Observers fire against all events all the time (e.g. onOpen, onClose, onMessage, onError).  A good use case is logging (see xocketslogger.nsf)
    • Intervaled scripts fire on specified interval (e.g. every 5 seconds).  See the chat application for samples. 

  • Currently this version only supports the creation of one big script file.  Support for multiple script files / modules is not available at this time, but may be added in a future release


  • For basic setup see with the download.  Also Csaba Kiss has put together a nice blog series on how to get up and running (pictures and everything :)
  • Any questions related to the solution should be posted here.  Any bugs, please post an issue up on the github project.