Service - Product Manager

From Izara Wiki
Revision as of 06:46, 23 December 2025 by Jammy (talk | contribs)
Jump to navigation Jump to search

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
    },
    "relId": {
      "type": "string",
      "generatedField": true,
      "requiredOnCreate": false,
      "optionalOnCreate": false,
      "canUpdate": false,
      "validation": {

      }
    }
  },
  "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
}


DynamoDB tables

Standard Config Table Per Service

Configuration tags

{
	configKey: "ProductGraphServiceName"
	configTag: "ProductGraphServiceName"
	configValue: xxx // eg: "ProductGraph"
}
{
	configKey: "ProductHandlerService"
	configTag: xxx // productHandlerServiceNameTag, eg: "ProductStandard", this is what is saved in each catalog record
	configValue: {
		serviceName: xxx // eg: "ProductStandard", this is the actual deployed service name}
	}
}

ProductRecord

Records which Handler manages each product

{
	productId
	productHandlerServiceNameTag
}
  • partition key: productId
  • sort key: (none)

Working documents

Product Manager