Skip to content

Data streaming: write journals #11

Open

Description

@rerpha

Acceptance criteria

  • Python or rust process implemented as a standalone python package (e.g. see packaging for ibex_bluesky_core/genie/lewis for how to do this) or rust project
    • e.g. named kafka_dae_journals, to sit alongside kafka_dae_control and kafka_dae_diagnostics
  • Listens to a kafka stream for run stop messages
  • Update a journal.xml file with metadata from the run when a wrdn is published - this then needs to read the file and pull out the journal metadata.
  • Format of written journal.xml should match existing journal.xml as closely as possible.
  • Create a follow up ticket to test against Journal Viewer (currently some missing data)

Notes

  • Some metadata won't currently be available from kafka. Create new ticket(s) for these cases. For this ticket, write the data which is currently available from kafka run start/stop messages and corresponds to a field in the journal.xml. Create follow up ticket(s) for data not currently available.

Discussed Planning 08/01/2026 14:30

Activity

  1. converted this from a draft issue on Nov 26, 2025
  2. changed the title [-]How do we write journals[/-] [+]Data streaming: write journals[/+] on Jan 7, 2026
  3. moved this from research/needs discussion to Ready in Data streaming for HRPD-X & SANDALS-IIon Jan 7, 2026
  4. moved this to Backlog in PI_2026_01on Jan 12, 2026
  5. Tom-Willemsen commented on Jan 18, 2026

    @Tom-Willemsen
    Member

    Journal contains some entries like total events, total proton charge, good frames, raw frames that need to be accumulated from the main _events stream (not just runInfo pl72/6s4t). Which means that this process would need some awareness of e.g. vetoes so that it can distinguish good and raw frames, etc - and would also need to subscribe to the high-rate _events stream.

    A better option may be for this process to trigger from a wrdn message, where the wrdn's metadata would contain these sorts of accumulated quantities (or potentially everything that needs to be written to the journal?). This means:

    • Journal entries always correspond exactly 1-1 with filewriter files, and a journal entry is not created until the file is fully written
    • The good/raw frames, proton charge etc recorded in .nxs is identical to journal (since the same process calculated both - so in the case of dropped frames etc they will remain consistent)
    • kafka_journal_writer doesn't need to subscribe to the high-rate _events stream, only low-rate metadata topics, which reduces network load and makes this process less performance-sensitive.
  6. added this to the March 2027 milestone on Mar 6, 2026
  7. moved this from Ready to research/needs discussion in Data streaming for HRPD-X & SANDALS-IIon Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions