Metronome’s MAM processing and validation API library.

Processing and Initialization

Below I’ll describe the API functions to perform archive processing or storage initialization contained into the MAM library (mam/mam.lib.lua), firstly by giving a preamble on how Metronome handles archives. The server never operates on the database directly but instead loads and caches the user archive in memory saving it as an object in the user’s bare session (sharing it for all online resources) and performs operation on that, re-stashing the archive on defined windows. While this may have a definite impact on scaling, it’s for sure beneficial performance wise since it avoids hitting disk or the database too often and is the best course of action for the current server backend architecture.

This is a list of public functions and their parameters:

Validation

Validation before processing of a stanza is done via the validate_query API function available from the MAM validation library (mam/validate.lib.lua):