Search…
Resource Assignment

Algorithms

Algorithms are encapsulated within docker container. They can be created seperately in an arbitrary programming language. To include them in Rembrandt they need to be registered to the platform in the Algorithms tab by providing:
    1.
    The algorithm name.
    2.
    All incoming resource types.
    3.
    The outcoming result resource type.
    4.
    The Docker container location.
Registered algorithms can be used later to create recipes. The Docker image is later startet during recipe execution and passed a unique folder path where all input resources are stored in text files. For this reason it is important to include a function in the algorithm which processes the passed path and reads the optimization inputs. Additionally, the optimized output resource needs to be written to the same folder to be registered by Rembrandt.
Algorithms can not be modified to ensure that all recipes maintain their functionality, specifically in regards to ingoing and outgoing resource types. For the same reason an algorithm can only be deleted if it is not included in a recipe.

Transformers

Transformers are used to modify the list of resource instances. The modification can either be that each instance is altered (map), filtering for e.g. certain attribute values, or reducing the set to a new object. When creating the transformer multiple inputs are required:
    1.
    A name for the Transformer.
    2.
    The resource type the transformer is operating at.
    3.
    The transformer function (map, filter or reduce)
    4.
    the javascript source code as function body.
The provided source code is wrapped into the selected function type and executed during recipe execution. That is why it is important to not contain syntax error, hence we recommend testing the code before using the transformator.
By using instance.attribute.[attributeName] access (read or write) to the specific attribute is possible.
The source code for a transformer to filter for all persons that are older than 18 years based on their year of birth could look like this:
1
var date = new Date();
2
var currentYear = date.getFullYear();
3
var currentAge = instance.attributes.yearOfBirth - currentYear;
4
instance.attributes.age = currentAge;
5
return (instance.attributes.age > 18);
Copied!
The transformer overview displays all existing transformers while clicking on one leadts to the detail view of the selected transformer. It is possible to modify the source code by clicking the corresponding button in the detail view. Likewise transformers can be deleted.

Recipes

Rembrandt offers a recipe creation view, where you can drag and drop ingredients to create a recipe. All known resource types, transformers and algorithms are displayed on the left and clicking on one of them creates the building block in the recipe area in the middle. Connecting blocks can be done by dragging one close to the others input or output ports, but will only work, if the respective types fit. For example the resource type Car will not connect to a port that expects the Driver resource type.
Recipes can be inspected in their detail page to see which ingredients are included. Furthermore they can be deleted and it is possible to manually start the recipe execution there.
Last modified 2yr ago