wiki:PublicationsManagement

A publication is the final output of Calenco: the document (PDF, HTML, etc.) aimed at the final reader.

Publication Parameters

A publication is a resource in Calenco (see StorageModel) made of:

  • the input XML (and possibly its version or workflow state)
  • the toolchain (that must be specified notably with recent Maxime work) aka the output format (PDF, HTML, etc.)
  • the XSL (and possibly its version or workflow state)
  • the parameters for the XSL
  • where the result should be stored (inside calenco, a zip to download, on a FTP server, etc.)
  • a flag to indicate whether the publication should be automated (aka updated each time content is changed)

Different Behaviors

Calenco must provide 3 mechanisms for users to request publications:

  1. Temporary publication: I want a very specific output just now: I send all the above parameters each time I want a specific publication
  2. Permanent publication:
    1. Manual: store all the above parameters in a XYZ "publication" object that will be available for future reuse simply by telling Calenco: "Hey, send me an update of the publication XYZ".
    2. Automatic: if the automatic flag is set on those stored publications they will be automatically triggered too. This is possible the publication is linked to the source XML and XSL (they are treated as dependencies of the publication). And since Calenco knows all the dependencies (recursively) of those XML and XSL it is easy to know what publications are affected by a single image update on the repository: by climbing up the dependencies tree. This is done by querying the RDF triplets: "Tell me what objects are set as source of a link of type 'dependency', which target is this object".

This is the algorythm to implement to trigger automatic publications:

  • whenever a file is updated on the JCR it triggers a specific "climber" robot
  • the climber robot search for all modules that include the updated file, recursively, up to the publications
  • every such publication that is automatic is immediately rebuilt

Output

That will depend on the publication type:

  • for temporary publications,the publication itself. If the result is made of 1 file, the file is returned as it is(the PDF for example). Else if the result is made of multiple files, a zip file is returned.
    • that could result in a HTTP timeout if the compilation lasts a lot: that's a risk to take. If it takes too much, the server must reply with an error, before the client times out. That allows the client to ask the publication again, or to fall back to a permanent publication (that it can delete once it gets the result).
  • for permanent publications the URL where the publication status is available.
    • by retrieving that publication status the client can know whether the publication is in progress or published.

Processing

  • Publication requests are stored in a FIFO queue.
  • The compilation server processes the publications, possibly various at a time (as a configuration parameter) according to the server power.
  • The server is able to tell what publications are in progress, which ones are in the queue, at what level.

Technical Specifications

PublicationsTechSpecs