Nodes and Carriage Mechanisms¶
The following piece should present the decisions behind the Node architecture and the carriage mechanism pluggability.
![@startuml
package "Processing Nodes" {
[Consumer Nodes]
[Synthesizer Nodes]
[Producer Nodes]
[Producer Nodes] -- IProducerNode
[Synthesizer Nodes] -- IProducerNode
[Synthesizer Nodes] -- IConsumerNode
[Consumer Nodes] -- IConsumerNode
IProducerNode -- INode
IConsumerNode -- INode
}
package "Carriage Mechanisms" {
[Producer Nodes] -> IProducerCarriage : emit_data
[Websocket] - IProducerCarriage
[Websocket] ..> HTTP :use
IConsumerCarriage - [Websocket]
[Websocket] -up-> INode : process_document
[Synthesizer Nodes] -> IProducerCarriage : emit_data
note bottom of [Websocket]
  Carriage mechanisms may
  or may not work
  both directions.
end note
}
note top of [Producer Nodes]
  Producers produce only
end note
note top of [Synthesizer Nodes]
  Synthesizers produce
  and consume as well.
end note
note top of [Consumer Nodes]
  Consumers consume only
end note
@enduml](_images/plantuml-392f12d57982440a8e16b9cff16a840bae35def4.png)
Processing node and Carriage mechanism components¶
Processing Nodes¶
The processing nodes are the key components of this package and facilitate several different use-cases laid out in the Node conformance section of the specification (EBU Tech3370). A node can be a producer or a consumer or both. This requirement is fulfilled by the class structure depicted below.

Processing node classes¶
Carriage mechanisms¶
The carriage mechanisms are divided into 2 distinct kinds: producer and consumer carriages (not to be confused with producer and consumer nodes).
Producer carriages serve the purpose of sending/serialising a document once a processing node has finished processing them and push them via their domain forward.
Consumers carriages on the other hand receive a (probably serialised) document from their own domain and their job is to make sure the document is picked up (possibly parsed and validated) and given to the consumer processing node that the carriage mechanism object is registered to.
The class hierarchy providing the necessary steps looks the following way:

Carriage mechanism classes¶