Service - Variant Manager: Difference between revisions
Jump to navigation
Jump to search
(Created page with "= Overview = Each product is handled by a Service - Variant (handlers) service. The Variant Manager service handles shared orchestration of Variant Handler services. =...") |
No edit summary |
||
(4 intermediate revisions by the same user not shown) | |||
Line 17: | Line 17: | ||
<syntaxhighlight lang="JavaScript"> | <syntaxhighlight lang="JavaScript"> | ||
{ | { | ||
configKey: " | configKey: "ProductGraphServiceName" | ||
configTag: " | configTag: "ProductGraphServiceName" | ||
configValue: xxx // eg: " | configValue: xxx // eg: "ProductGraph" | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 25: | Line 25: | ||
<syntaxhighlight lang="JavaScript"> | <syntaxhighlight lang="JavaScript"> | ||
{ | { | ||
configKey: " | configKey: "VariantHandlerService" | ||
configTag: xxx // | configTag: xxx // variantHandlerServiceNameTag, eg: "VariantStandard", this is what is saved in each catalog record | ||
configValue: { | configValue: { | ||
serviceName: xxx // eg: "VariantStandard", this is the actual deployed service name} | serviceName: xxx // eg: "VariantStandard", this is the actual deployed service name} | ||
Line 32: | Line 32: | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<syntaxhighlight lang="JavaScript"> | |||
{ | |||
configKey: "TranslateIdsType" | |||
configTag: xxx // eg SellOffer > Product would be sellOffer_product | |||
configValue: { | |||
ttl: 64000 // number of seconds TranslateIdsCache records live for | |||
} | |||
} | |||
</syntaxhighlight> | |||
== VariantRecord == | |||
Records which Handler manages each variant | |||
<syntaxhighlight lang="JavaScript"> | |||
{ | |||
variantId | |||
variantHandlerServiceNameTag | |||
} | |||
</syntaxhighlight> | |||
* partition key: variantId | |||
* sort key: (none) | |||
== TranslateIdsCache == | |||
Stores a record for any unique translateId process | |||
<syntaxhighlight lang="JavaScript"> | |||
{ | |||
cacheId // fromType + "_" + fromDataId + "_" + toType | |||
toDataId | |||
expireTime | |||
} | |||
</syntaxhighlight> | |||
* partition key: cacheId | |||
* sort key: toDataId | |||
* expireTime is set as an automatic DynamoDB TTL attibute | |||
= Working documents = | = Working documents = |
Latest revision as of 12:39, 4 February 2022
Overview
Each product is handled by a Service - Variant (handlers) service.
The Variant Manager service handles shared orchestration of Variant Handler services.
Repository
https://bitbucket.org/izara-market-products/izara-market-products-variant-manager/src/master/
DynamoDB tables
Standard Config Table Per Service
Configuration tags
{
configKey: "ProductGraphServiceName"
configTag: "ProductGraphServiceName"
configValue: xxx // eg: "ProductGraph"
}
{
configKey: "VariantHandlerService"
configTag: xxx // variantHandlerServiceNameTag, eg: "VariantStandard", this is what is saved in each catalog record
configValue: {
serviceName: xxx // eg: "VariantStandard", this is the actual deployed service name}
}
}
{
configKey: "TranslateIdsType"
configTag: xxx // eg SellOffer > Product would be sellOffer_product
configValue: {
ttl: 64000 // number of seconds TranslateIdsCache records live for
}
}
VariantRecord
Records which Handler manages each variant
{
variantId
variantHandlerServiceNameTag
}
- partition key: variantId
- sort key: (none)
TranslateIdsCache
Stores a record for any unique translateId process
{
cacheId // fromType + "_" + fromDataId + "_" + toType
toDataId
expireTime
}
- partition key: cacheId
- sort key: toDataId
- expireTime is set as an automatic DynamoDB TTL attibute