This uses the "chore" middleware. It's a Python2 based web service which connects to one or more XMPP servers, and directs contents to users with accounts on those servers.
It can push notifications using long polling and HTML5 notifications. It can also use Google's Firebase push messaging. It can also use the ping/pong protocol supplied by the "chore" middleware. A client for Ubuntu Touch phones is available, and provides very efficient data and battery usage.
In addition to XMPP, the server can also communicate with Flowroute's RESTful API's to send and receive SMS messaging. If all you have is a terminal, it can also provide a simple messaging client to a telnet connection.