tvkitchen / countertop

The entry point for developers who want to set up a TV Kitchen.
https://tv.kitchen
GNU Lesser General Public License v3.0
6 stars 2 forks source link

Allow for incomplete tributary maps #123

Closed slifty closed 3 years ago

slifty commented 3 years ago

Task

Description

The current countertop logic relies on a method called generateTributaryMaps in order to generate a new topology.

This method is documented as:

 * Create all sets of valid stream combinations that can sufficiently fulfill a set of inputs
 *
 * This will only create combinations of streams that pull from the same source.
 * This will not return incomplete tributary maps (i.e. tributary maps will have exactly one stream
 * per input).

The logic here is that if an appliance takes in two types of data, it will ONLY be added to a topology that provides both types of data (e.g. if an appliance took in images and captions, it would not be added to the countertop unless there is both a source of images and a source of captions).

In other words, it considered inputs to be required.

This is a limiting decision and I don't think there is any upside. Specifically, this means appliances cannot have optional inputs!

Unless I remember some Good Reason for this decision, I would like to modify this logic so that appliances are added to a topology even if the inputs are incomplete (we could say "at least one input type exists" but even then I am not sure what that limitation provides, and I could imagine a situation where a source appliance wants to take an optional input).