sofie-core icon indicating copy to clipboard operation
sofie-core copied to clipboard

RFC: Server-side notifications

Open olzzon opened this issue 9 months ago • 2 comments

About me

This RFC is opened on behalf of BBC

Use case

Using the AB playback feature with 3 playout channels in the pool. In the AB pool, the channel A is currently playing out a video. Channel B has the next video queued. Channel C is playing out another video (due to an adlib).

Now, the user disables the channel B, because of a hardware fault.

The AB pool is now not able to fulfill its purpose, and needs a way to notify the user of this right away (ie not have to wait for the next Take and fail then) at the moment only messaging to logging is possible.

Proposal

I propose to have a Mongo collection that can be used to store notifications.

Then Clients can Subscribe to their relevant notifications from all over the system and display them in their GUIs.

Also an “audience” concept is introduced, this way it’s possible to target messages. So it’s possible to control what client’s receives what messages. This can be handy e.g. when using the rest API.

I’d propose we have a workshop to outline the details of this, so that we have a common understanding for my eventual implementation of this.

Sketch implementation:

// Johan thinks that there are 2 importants things to consider
// 1. A Client should be able to narrow what to listen for
//    audience, which rundown/playlist/studio/system
// 2. Be able to pipe/convert in the exisitng notification center

enum NotificationAudience
  'everyone' 
  'logging'
  'producer' 
  'audio' 
  'prompter' 
  .....  
}
// Stored into the DB
export interface NotificationObj extends TrackedNote {
	_id: string
	/** Defines who the notification is intended for */
    audience?: NotificationAudience[] // A nice-to-have idea
	
	type: NoteSeverity // eg WARNING , ERRROR, INFO 
	message: ITranslatableMessage
	
	origin?: {
		name: string
	}
	timestamp?: Date // TBD
	autoTimeout?: Date // TBD	
}

export interface TrackedNote { // This already exists in Sofie Core
	rank: number
	origin: {
		name: string
		segmentName?: string
		rundownId?: RundownId
		segmentId?: SegmentId
		partId?: PartId
		pieceId?: PieceId
	}
}

Process

The Sofie Team will evaluate this RFC and open up a discussion about it, usually within a week.

  • [x] RFC created
  • [x] Sofie Team has evaluated the RFC
  • [x] A workshop has been planned
  • [x] RFC has been discussed in a workshop
  • [x] A conclusion has been reached, see comments in thread

olzzon avatar May 21 '24 12:05 olzzon