Best practices for Spark Variable update frequency?

If you want to reduce the sampling of the variable, you could only poll the variable on page load. Once the page is loaded, use Spark.publish() to post any changes of the variable and use SSE on the page to monitor those publishes. Just to be safe, you might want to poll the variable every 60 seconds or so (or less if you're extra paranoid).

@bko wrote an excellent tutorial on Spark.publish() and SSE:

3 Likes