Skip to content

Latest commit

 

History

History
110 lines (67 loc) · 7.4 KB

concepts-and-architecture.md

File metadata and controls

110 lines (67 loc) · 7.4 KB

Concepts & Architecture

System architecture

Example of a Sofie setup with a Playout Gateway and a Spreadsheet Gateway

****Sofie Core is a web-server and communicates with the web GUI.
Gateways are applications that are connected to Sofie Core and exchanges data; such as rundown-data for ingest or the timeline for play-out.

The rundown-data is fed into Sofie Core via the Ingest Gateway (in this example it's a Spreadsheet Gateway, it could also be a MOS Gateway or some other ingest-type Gateway).
The rundown-data is then interpreted by the Blueprints and stored in the Core database.

The end user controls the show via the web-interface. A show is mainly driven by the user Take:ing the next Part in the Rundown.
Upon a Take, Sofie Core calculates what's going to be played, in the form of a new timeline and sends it to Playout Gateway.

Read more: Timeline

Blueprints

See also Dictionary: Blueprints

Blueprints are plug-ins that run in Sofie Core. They interpret the data coming in from the rundowns and transform them into a rich set of playable elements (Segments, Parts, AdLibs etc).

The blueprints are custom-made and changes depending on the show style, type of input data and the types of controlled devices. A generic blueprint based on spreadsheets is available here.

The blueprints are webpacked javascript bundles which is uploaded into Sofie via the GUI.

When Sofie Core calls upon a Blueprint, it returns an js-object containing methods callable by Sofie Core. These methods will be called by Sofie Core in different situations, depending on the method.
Documentation on these interfaces are available in the typings-library Blueprints integration.

System Blueprints

Handle things on the System level.
Documentation on the interface to be exposed by the Blueprint:
https://github.com/nrkno/tv-automation-sofie-blueprints-integration/blob/master/src/api.ts#L52

Studio Blueprints

Handle things on the Studio level, like "which showstyle to use for this rundown".
Documentation on the interface to be exposed by the Blueprint:
https://github.com/nrkno/tv-automation-sofie-blueprints-integration/blob/master/src/api.ts#L57

Showstyle Blueprints

Handle things on the Showstyle level, like generating Baseline, Segments, Parts, Pieces and Timelines in a rundown.
Documentation on the interface to be exposed by the Blueprint:
https://github.com/nrkno/tv-automation-sofie-blueprints-integration/blob/master/src/api.ts#L72

Timeline

What is the timeline?

The Timeline is a collection of timeline-objects, that together form a "target state", ie an intent on what is to be played and at what times.

The timeline-objects can be programmed to contain relative references to each other, so programming things like "play this thing right after this other thing" is as easy as {start: { #otherThing.end }}

The Playout Gateway picks up the timeline from Sofie Core and (using the timeline-state-resolver) controls the play-out devices to make sure that they actually play what is intended.

Example of 2 objects in a timeline: The #video object, destined to play at a certain time, and #gfx0, destined to start 15 seconds into the video.

Why a timeline?

The Sofie system is made to work with a modern web- and IT-based approach in mind. Therefore, the Sofie Core can be run either on-site, or in an off-site cloud.

Sofie Core can run in the cloud

One drawback of running in a cloud over the public internet is the sometimes unpredictable latency. The Timeline overcomes this by moving all the immediate control of the play-out devices to the Playout Gateway, which is intended to run on a local network, close to the hardware it controls.
This also gives the system a simple way of load-balancing - since the number of web-clients or load on Sofie Core won't affect the play-out.

Another benefit of basing the play-out on a timeline is that when programming the show (the blueprints), you only have to care about "what you want to happen", you don't have to care about cleaning up previously played things, or what was actually played out before. Those are things that are handled by the Playout Gateway automatically. This also allows the user to jump around in a rundown freely, without the risk of things going wrong on air.

How does it work?

{% hint style="success" %} Fun tip! The timeline in itself is a separate library available on github.

You can play around with the timeline in the browser using JSFiddle and the timeline-visualizer! {% endhint %}

The Timeline is stored by Sofie Core in a MongoDB collection. It is generated whenever a user does a TAKE, changes the Next-point or anything else that might affect the play-out.

Sofie Core generates the timeline using:

The Playout Gateway then picks up the new timeline, and pipes it into the timeline-state-resolver-library (TSR).

The TSR then...

  • Resolves the timeline, using the timeline-library
  • Calculates new target-states for each relevant point in time
  • Maps the target-state to each play-out device.
  • Compares the target-states for each device with the currently-tracked-state and..
  • ..generates commands to send to each device to account for the change.
  • The commands are then put on queue and sent to the devices at the correct time.

{% hint style="info" %} For more information about what play-out devices the TSR supports, and examples of the timeline-objects, see the README of TSR {% endhint %}

{% hint style="info" %} For more information about how to program timeline-objects, see the README of the timeline-library {% endhint %}