Tuesday, September 06, 2016

xockets.io v3.0.0

Hi All,
Just pushed the latest release of xockets.io.  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.

-Fix:

  •     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 logger.py) 

-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. 

 -Limitations:
  • 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

-Downloads:

-Documentation:
  • For basic setup see xockets.io.setup.pdf 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.




No comments: