Subscribe to our list to receive the latest updates on Node on Fire

Class: Streams


new Streams()

The Streams module.

Creates streams over web sockets connections and listens for changes in the datastore through PostgreSQL's LISTEN and NOTIFY mechanisms.

Important: this module creates triggers to notify any listeners for changes whenever a row gets inserted, updated or deleted. It uses the PostgreSQL's NOTIFY system. By default, this system has a payload limit of 8000 bytes. The payload is the changed row plus a few bytes of additional data combined and transformed to json. The triggers created by Node on Fire check if the payload is longer than 8000 bytes, and if so, do not notify any listeners of the change.

If you want to change this default behavior, or if you have changed the maximum size of the payload, you can change the trigger in your migrations manually. Please note: if you do NOTIFY with a payload larger than the maximum size it will raise an exception and stop the original SELECT, UPDATE or DELETE from happening.



This is a delegate method from the connection.


Starts the web socket server if this is the web process.

Name Type Description
argv Dictionary

The process starting arguments.

Do you have any questions or comments on this page? Start a discussion below.

comments powered by Disqus
Subscribe to our list to receive the latest updates on Node on Fire