Replies: 2 comments
-
UPDATE: No final decision yet, but tenatively it looks like this:
|
Beta Was this translation helpful? Give feedback.
-
UPDATE: Option 3 was implemented. The ksql appliance was updated to roll up types and subtypes in the ksql aggregate. This allowed our sink to not require a type/subtype lookup index, and lets us set the type/subtype name in the main index. The type and subtype indices are still built, and used by the frontend. This drives the forms, when users choose possible values. These indices are kept up to date with any changes in real time, so the user's choices will always be valid. |
Beta Was this translation helpful? Give feedback.
-
Background
We will soon add type and subtype to the list of fields we send and receive from seatool. When a user submits a new package, type and subtype will be transmitted. The user will select subtype and/or type from a drop down list on their form.
There's a relationship between authority, type, and subtype that we need to honor. In seatool, a given authority has a list of allowable types, which is a subset of all types. And for a given type, there is a list of allowed subtypes. These relationships are important to populating our frontend drop down menus. We will know the authority by the time the user reaches the form, but the type and sub type may not be known. So we need to present the user with type options for that authority, in a drop down. Then we need to present subtype options based on the type selection.
This discussion is about how we can best access the type and subtype information, including the relationships between them and authority.
A key design point to remember: the type and subtype information is held in separate seatool tables, with each type and subtype having a unique id. These tables and their ids aren't identical across dev/val/prod.
Considerations:
Options
Option 1
Make type and sub type tables, or the parts we care about, identical in all environments; keep current approach of static maps in our source
Option 2
Create a sinkTypes function that builds a type and a subtype index in opensearch. Have sinkSeatool only put the ID of the type and subtype in main. When a user opens a record in our system, an API call trades the type/subtype ids for names. Or, we modify getItem to include this info in its return, just like we do with changelog data. New submission drop downs are populated by an API call to the type/subtype index.
Option 3
Same as Option 2, but we modify ksql to include type/subtype data in the ksql event, so type and sub type name can be put into main.
Option 4
Modify sinkSeatool to trade type/subtype ids for names by directly calling seatool. Still have a type and sub type index for the frontend drop down population.
Option 5
Create a sinkTypes function that builds a type and a subtype index in opensearch. Have sinkSeatool call those indices to trade the type/subtype id for names. The type/subtype name is indexed to master. New submission drop downs are populated by an API call to the type/subtype index.
Note: this is the same as option 2, but we're trading id for name in sinkSeatool
This space is reserved for the output or decision from this discussion.
Option 3 was implemented.
The ksql appliance was updated to roll up types and subtypes in the ksql aggregate. This allowed our sink to not require a type/subtype lookup index, and lets us set the type/subtype name in the main index.
The type and subtype indices are still built, and used by the frontend. This drives the forms, when users choose possible values. These indices are kept up to date with any changes in real time, so the user's choices will always be valid.
Beta Was this translation helpful? Give feedback.
All reactions