TEM Architecture

Tile Upload Buffer

Tile images and metadata must be stored during montaging, then uploaded after montaging is complete. If the montage is aborted, this data should then be discarded. Uploads should happen asynchronously such that the microscope can continue imaging when the internet connection is insufficient for real-time tile upload. An internet connection is still required for pyTEM to function.

The buffer service is responsible for the following tasks:

  1. Store tile metadata during montaging.
  2. After montaging:
    1. Upload each tile and its metadata to the aloha service.
    2. Check that aloha successfully processed the tile.
    3. Delete the tile (and intermediate files) from the SSD.
  3. If montaging is aborted: delete all tiles (and intermediate files).

Processed tiles and metadata should be received from the image processing pipeline via a multitude of topics listed above via the broker. Additionally, messages should be regularly published on the buffer.status topic about the state of the buffer.