Modelling temporal workflows for websockets and event streaming

Is there a best practice to follow when modelling temporal workflows to listen to websocket events ? My use case is to listen to websocket events and do some processing for specific event types.

When a WebSocket receives a request it maps it to a signal to a workflow. When workflow wants to push any data as a reply it does it from an activity.

thanks @maxim for the reply. Where should the logic to listen to web socket events actually live ?

  • Should this listener logic be a different workflow which signals the main workflow for processing events ?
  • Or should the listener be a separate process which listens and signals the main workflow to process the events ?
  • Or is there a recommended approach where the listener should live ?
1 Like

It should be a separate listener that signals the workflow.