Batch Work feature [core]

Note: The snapbackend process is fully functional. It generates sitemap.xml, sends emails, and verify whether an attachment is a virus... This feature is therefore complete although some plugin specific backends may not work or even not be implemented.

The system uses CRON to run batch processes. All batch processes run in the background, most certainly not on the main servers (i.e. the servers where users connect to use the website.)

For this reason, necessary batch work needs to be reported to backend servers.

Because some of the work can take a long time and a process may fail, we want to have a journal of all the work we need to do. Once a task was accomplished in full, it is removed from the batch journal. The journal keeps information about what needs to be done and where the process is at.

Example of batch work:

  • Rebuilding all the indexes of the system.
  • Rebuilding the permissions tables for fast access.
  • Rebuilding the cache of set of pages that have been modified.
  • Changing the URL alias of a set of pages.

Some processes may be re-added using a CRON script:

  • Regularly request an update of the RSS aggregators.
  • Check for plug-in and system updates.

All of these tasks can be run on any one server with Cassandra installed. In that respect, the process may fail because it has to wait for some data that the backend did not yet receive (does not yet have access to.)

Note that any work that can be accomplished by a batch should be sent to the batch system. Even when it looks small, each small task can add up with you have thousands of accesses every second.

See: Object Identity feature [core]

See: Signals & Functions feature (triggers, actions, rules)

Snap! Websites
An Open Source CMS System in C++

Contact Us Directly