ID Linking Functionality #1118
Labels
component orchestrator
data hub
enhancement
New feature or request
ferryman
general
affects multiple services or domains
Wice
Core Member
Milestone
In order to support updating/upserting records through our system, a standard method of linking IDs is needed. It has been proposed and decided to provide this functionality with a call made by the Ferryman which will save IDs to the Data Hub and then add that mapping to future Flow Steps.
Description
After each step in which a recordUid is generated, it is transmitted to an external ID registry (implemented through the Data Hub). If appropriate, a oihUid is retrieved or generated, then returned, and injected into the message. This requires that the communication to the Data Hub is synchronous, with a response.
However, instead of having a dedicated step and component to handle this communication, it is directly included within the Ferryman. The Ferryman would be in some fashion notified/configured that ID linking is active for a certain step (e.g. through flow definition and interpreted by the orchestrator). Additionally, it would need some way to know the specific application ID of the current step.
If active, the Ferryman would then automatically attach the ID registry for the current object to the message in a reserved field. In future steps, the Ferryman would first look into this registry (if present), select the relevant recordUid for the current step’s application (if present), and inject it into the message itself before passing it into the connector. If a message with a recordUid is emitted by a connector, the Ferryman will post this new recordUid to the data hub and update the attached ID registry.
Passing along the registry is useful because each instance of the Ferryman only knows (and indeed only should know) about its current step. So if the Ferryman of Step 1 would not know which Application is served in Step 2, and would not be able to pick out the appropriate recordUid ahead of time. That means that picking out the current recordUid would need to happen inside Step 2 before it is passed into the connector. This requires either having the registry as part of the message right there, or fetching it from the Data Hub beforehand. Of these two options, the former would likely be quicker and require less overhead, as much as halving the average number of API calls necessary in a given flow.
Examples
There's a single flow with two connectors, fetching data from Application A and upserting it in application B. No further components are needed Thus, the overall flow simply looks like A -> B
First an object is created in A and inserted in B. Later that same object is updated in A and the update propagates to B.
Insert
123
123
together with the oihUidnewObject
that it receivednewObject
and recordUid123
to the Data Hub. The Data Hub looks up the oihUid in the registry, finds it, and adds the recordB: 123
to it.Update
abc
abc
and posts it to the Data Hub, which returns the entire ID registry for the associated oihUid.123
into the message123
to look up the correct object to updateNotes
The text was updated successfully, but these errors were encountered: