Both modes keep a communication channel open so that updates can be sent from the server to the client at any time, compared to PushMode.DISABLED
that only can send updates to the client in the response to a request that the client has opened as a reaction to user activity.
The difference lies in when this capability is actually used. With PushMode.AUTOMATIC
, updates are sent whenever the session is unlocked, i.e. after running pending ui.access()
tasks that have been scheduled from a background thread.
No update is sent if nothing has changed, but checking for this situation still has some overhead. There might also be situations when lots of fine-grained ui.access()
tasks are run in rapid succession, but it's not desirable to send them all as individual updates to the client.
The purpose of PushMode.MANUAL
is to give the application developer control over when changes are actually sent by explicitly calling ui.push()
. This makes it possible to better optimise resource consumption in in cases when the automatic mode would cause excessive pushing. This is quite rarely needed, but the possibility does still exist.