Skip to content

refactor the WebSocket server for LSE #47

Description

@xiaoyachong

We plan to move the WebSocket listener and the Tiled image publisher from LSE to arroyoXPS. I have a few questions:

  1. Instead of keeping both the WebSocket server and listener in arroyoXPS, should we remove them and replace them with a ZMQ server that sends RawFrameEvent directly to LSE?
frame_event = RawFrameEvent(
            image=SerializableNumpyArrayModel(array=shot_mean),
            frame_number=self.frame_counter,
            tiled_url=tiled_url,
        )

My concern is that this may break the arroyoXPS frontend, since the frontend app may still expect WebSocket messages.

  1. For the Tiled publisher, would it make more sense to add it in timepix_splash instead of arroyoXPS? Adding the Tiled publisher to arroyoXPS instead of timepix_splash may introduce two potential issues:
  • This would cause sending large images, potentially tens of MB (depending on bin size), from timepix_splash to arroyoXPS.

  • There may be a synchronization issue. For example, if timepix_spash starts before arroyoXPS, it may send images before arroyoXPS is ready. This could cause indexing issues when reading from Tiled. If timepix_spash has already sent 10 images by the time arroyoXPS starts, the 11th frame might be written to Tiled as the first image, while the reader may request ?slice=10:11, which would fail. One possible workaround is to write to Tiled only after a start message is received from splash_timepix.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions