Forums are typically highly asynchronous; replies in a thread are posted by different participants at different times. It is not uncommon for participants to not be online at the same time, but unlike a typical chat, forums are designed for this type of interaction. However, when there is a lot of activity in a thread, participants cannot avoid refreshing the page regularly to be aware of new posts.
Live Updates in the Background
During the development of WoltLab Suite 5.5, we were considering how to improve interactivity in the daily use of the software. For some versions, notifications have already been polled from the server at periodic intervals, for example, to provide timely information about mentions or new replies in subscribed threads.
In addition to this existing functionality, we have developed a new push service that sends information about new posts or new notifications to the browser without any time delay. We have chosen a solution that does not require any data to be sent to third parties and designed with extremely low bandwidth usage and efficient in handling many users who are active at the same time.
New Posts in a Thread
Writing a reply to a thread can sometimes take a little longer, for example because you have a lot of information to contribute or you have to do some research yourself first. When you submit your reply, it may be that one or more new posts have been written by other users in the meantime.
The push service provides instant feedback that a new post has been written and allows it to be instantly reloaded in place.
Push of Notifications
Information about new posts is only one part of our strategy for live updates, with the notifications we complete the feature set in the first version. In addition to the pure number, the newest notification itself is also queried and, if activated, displayed as a desktop notification.
The first version of the push service provides solutions for typical use cases by requesting new posts and notifications. This limited feature set allows us to gain very specific experience and further optimize the push service to improve it before integrating additional features.
Key to future development is further increasing the interactivity of the software, for example with live updates of the thread list and similar content. Another building block is the opening of the interfaces for communication from PHP with the push service, so that this can also be used by third-party plugins. Especially plugins with a demand for up-to-dateness, for example a “Shoutbox”, benefit from a highly efficient push and thus reduce the server load significantly.
Functionality and Availability of the Push Service
The push service relies on a separate connection of the browser to the server as long as the tab is open in the browser. This connection remains in the background and is designed for maximum efficiency so as not to consume unnecessary data volume. The link is established directly between the browser and the server, the connection is encrypted and no data is transmitted to third parties.
In addition to the encryption of the data connection, cryptographic authentication is performed when the connection is established. This ensures that no data is transmitted to unauthorized third parties and that confidentiality is maintained. In addition, the push service only transmits general data about new content, the query of actual data, for example post content, is done regularly via a request from the browser - among other things, this ensures compatibility with existing plugins.
Maintaining a permanent connection requires certain technical prerequisites on the server. PHP, as typically found in web hosting offers, is completely unsuitable for such an undertaking; with PHP, requests are usually terminated automatically after a defined time limit. In general, typical web hosting plans are not designed for such a requirement profile and do not offer any leeway in this regard.
The Push service was conceptualized from the very beginning as a dedicated solution far from the myriad limitations of web hosting plans, in order to achieve the best possible result. Our cloud hosting provides the perfect environment for a customized solution that not only delivers maximum speed at peak times, but also doesn't force us to make any lazy compromises when implementing the push service. The push service has already been running in a test mode on our site for a few weeks and has delivered flawless results so far. With the availability of the final version of WoltLab Suite 5.5, this push service will be exclusively available to all our cloud hosting customers at no surcharge.