Service - Product Manager: Difference between revisions

From Izara Wiki
Jump to navigation Jump to search
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 9: Line 9:
https://bitbucket.org/izara-market-products/izara-market-products-product-manager/src/master/
https://bitbucket.org/izara-market-products/izara-market-products-product-manager/src/master/


= DynamoDB tables =
= Schemas =
 
==ObjectSchemas==
== [[Standard Config Table Per Service]] ==
=== product ===
 
=== Configuration tags ===
 
<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
{
{
configKey: "ProductGraphServiceName"
  "objectType": "product",
configTag: "ProductGraphServiceName"
  "canDelete": true,
configValue: xxx // eg: "ProductGraph"
  "belongTo": {
    "serviceTag": "UserAccount",
    "objectType": "user"
  },
  "addOnDataStructure": [],
  "storageResources": {
    "graph": {
      "storageType": "graph",
      "graphServerTag": "GraphHandler"
    }
  },
  "fieldNames": {
    "productId": {
      "type": "string",
      "randomOnCreate": true,
      "requiredOnCreate": false,
      "optionalOnCreate": false,
      "canUpdate": false,
      "validation": {
        "pattern": "^[a-zA-Z0-9_-]+$"
      },
      "storageResourceTags": [
        "graph"
      ]
    }
  },
  "compositeKeyDeliminator": "_",
  "identifiers": [
    {
      "type": "identifier",
      "fieldName": "productId"
    }
  ],
  "generatedBy": "userGenerated"
}
}
</syntaxhighlight>
</syntaxhighlight>


=== productRecord ===
<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
{
{
configKey: "ProductHandlerService"
  "objectType": "productRecord",
configTag: xxx // productHandlerServiceNameTag, eg: "ProductStandard", this is what is saved in each catalog record
  "canDelete": true,
configValue: {
  "belongTo": {
serviceName: xxx // eg: "ProductStandard", this is the actual deployed service name}
    "serviceTag": "UserAccount",
}
    "objectType": "user"
  },
  "storageResources": {
    "dynamoDB": {
      "storageType": "dynamoDB",
      "tableName": "ProductStandard",
      "serviceTag": "ProductManager"
    },
    "myGraph": {
      "storageType": "graph",
      "graphServerTag": "GraphHandler"
    }
  },
  "addOnDataStructure": [
    {
      "type": "propertyValue"
    }
  ],
  "fieldNames": {
    "productId": {
      "type": "string",
      "randomOnCreate": false,
      "requiredOnCreate": false,
      "optionalOnCreate": true,
      "canUpdate": false,
      "validation": {
        "pattern": "^[a-zA-Z0-9_-]+$"
      },
      "storageResourceTags": [
        "dynamoDB"
      ]
    },
    "productHandlerServiceNameTag": {
      "type": "string",
      "randomOnCreate": false,
      "requiredOnCreate": false,
      "optionalOnCreate": true,
      "canUpdate": false,
      "validation": {
        "pattern": "^[a-zA-Z0-9_-]+$"
      },
      "storageResourceTags": [
        "dynamoDB"
      ]
    }
  },
  "compositeKeyDeliminator": "_",
  "identifiers": [
    {
      "type": "partitionKey",
      "fieldName": "productId"
    }
  ],
  "generatedBy": "userGenerated"
}
}
</syntaxhighlight>
</syntaxhighlight>


== ProductRecord ==
== RelationshipSchemas ==
 
Records which Handler manages each product


=== isProduct ===
<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
{
{
productId
  "relationshipServiceTag": "ProductManager",
productHandlerServiceNameTag
  "fieldNames": {
    "originTimeStamp": {
      "type": "number",
      "requiredOnCreate": false,
      "canUpdate": true,
      "validation": {
 
      },
      "optionalOnCreate": false
    },
  },
  "storageResources": {
    "graph": {
      "storageType": "graph",
      "graphServerTag": "GraphHandler"
    }
  },
  "links": [
    {
      "storageResourceTags": [
        "graph"
      ],
      "from": {
        "objType": {
          "serviceTag": "VariantStandard",
          "objectType": "variantProductLink"
        },
        "linkType": "one",
        "requiredOnCreate": true,
        "handler": true
      },
      "to": {
        "objType": {
          "serviceTag": "ProductStandard",
          "objectType": "productStandard"
        },
        "linkType": "one",
        "handler": true,
        "requiredOnCreate": false
      },
      "canDelete": false
    }
  ],
  "canMove": false
}
}
</syntaxhighlight>
</syntaxhighlight>
* partition key: productId
* sort key: (none)


= Working documents =
= Working documents =

Latest revision as of 08:28, 13 January 2026

Overview

Each product is handled by a Service - Product (handlers) service.

The Product Manager service handles shared orchestration of the Product Handler services.

Repository

https://bitbucket.org/izara-market-products/izara-market-products-product-manager/src/master/

Schemas

ObjectSchemas

product

{
  "objectType": "product",
  "canDelete": true,
  "belongTo": {
    "serviceTag": "UserAccount",
    "objectType": "user"
  },
  "addOnDataStructure": [],
  "storageResources": {
    "graph": {
      "storageType": "graph",
      "graphServerTag": "GraphHandler"
    }
  },
  "fieldNames": {
    "productId": {
      "type": "string",
      "randomOnCreate": true,
      "requiredOnCreate": false,
      "optionalOnCreate": false,
      "canUpdate": false,
      "validation": {
        "pattern": "^[a-zA-Z0-9_-]+$"
      },
      "storageResourceTags": [
        "graph"
      ]
    }
  },
  "compositeKeyDeliminator": "_",
  "identifiers": [
    {
      "type": "identifier",
      "fieldName": "productId"
    }
  ],
  "generatedBy": "userGenerated"
}

productRecord

{
  "objectType": "productRecord",
  "canDelete": true,
  "belongTo": {
    "serviceTag": "UserAccount",
    "objectType": "user"
  },
  "storageResources": {
    "dynamoDB": {
      "storageType": "dynamoDB",
      "tableName": "ProductStandard",
      "serviceTag": "ProductManager"
    },
    "myGraph": {
      "storageType": "graph",
      "graphServerTag": "GraphHandler"
    }
  },
  "addOnDataStructure": [
    {
      "type": "propertyValue"
    }
  ],
  "fieldNames": {
    "productId": {
      "type": "string",
      "randomOnCreate": false,
      "requiredOnCreate": false,
      "optionalOnCreate": true,
      "canUpdate": false,
      "validation": {
        "pattern": "^[a-zA-Z0-9_-]+$"
      },
      "storageResourceTags": [
        "dynamoDB"
      ]
    },
    "productHandlerServiceNameTag": {
      "type": "string",
      "randomOnCreate": false,
      "requiredOnCreate": false,
      "optionalOnCreate": true,
      "canUpdate": false,
      "validation": {
        "pattern": "^[a-zA-Z0-9_-]+$"
      },
      "storageResourceTags": [
        "dynamoDB"
      ]
    }
  },
  "compositeKeyDeliminator": "_",
  "identifiers": [
    {
      "type": "partitionKey",
      "fieldName": "productId"
    }
  ],
  "generatedBy": "userGenerated"
}

RelationshipSchemas

isProduct

{
  "relationshipServiceTag": "ProductManager",
  "fieldNames": {
    "originTimeStamp": {
      "type": "number",
      "requiredOnCreate": false,
      "canUpdate": true,
      "validation": {

      },
      "optionalOnCreate": false
    },
  },
  "storageResources": {
    "graph": {
      "storageType": "graph",
      "graphServerTag": "GraphHandler"
    }
  },
  "links": [
    {
      "storageResourceTags": [
        "graph"
      ],
      "from": {
        "objType": {
          "serviceTag": "VariantStandard",
          "objectType": "variantProductLink"
        },
        "linkType": "one",
        "requiredOnCreate": true,
        "handler": true
      },
      "to": {
        "objType": {
          "serviceTag": "ProductStandard",
          "objectType": "productStandard"
        },
        "linkType": "one",
        "handler": true,
        "requiredOnCreate": false
      },
      "canDelete": false
    }
  ],
  "canMove": false
}

Working documents

Product Manager