Architecture - johnnyw-aws/aws-iot-twinmaker-samples GitHub Wiki

This documentation discusses the overall structure of the AWS IoT TwinMaker CookieFactory Sample application developed on AWS IoT AppKit 1(https://github.com/awslabs/iot-app-kit)

Architecture / Data Flows

cfv2_architecture

High-level summary

Overall, there are 3 major elements to CookieFactoryV2:

Among these 3 elements there are 5 main interaction flows:

  1. The Web application is configured 1(https://github.com/aws-samples/aws-iot-twinmaker-samples/blob/main/src/workspaces/cookiefactoryv2/CookieFactoryDemo/src/config/cognito.template.ts) to receive credentials through Cognito. The sample Cognito user created in this application can be found here: 2(https://github.com/aws-samples/aws-iot-twinmaker-samples/blob/main/src/workspaces/cookiefactoryv2/cdk/lib/cookiefactory_v2_stack.ts#L416) 3(https://github.com/aws-samples/aws-iot-twinmaker-samples/blob/main/src/workspaces/cookiefactoryv2/CookieFactoryDemo/src/config/users.template.ts)
  2. The Web application uses the Authenticated IAM role 1(https://github.com/aws-samples/aws-iot-twinmaker-samples/blob/main/src/workspaces/cookiefactoryv2/cdk/lib/CognitoAuthRole.ts#L18) associated with Cognito to access AWS application resources for TwinMaker. The AWS IoT TwinMaker resources are created 2(https://github.com/aws-samples/aws-iot-twinmaker-samples/blob/main/src/workspaces/cookiefactoryv2/cdk/lib/cookiefactory_v2_stack.ts#L567) and accessed via the workspace set up as a pre-requisite to the demo
  3. The 3D scene visualization accesses 3D models in the workspace S3 bucket as defined by the 3D scene json 1(https://github.com/aws-samples/aws-iot-twinmaker-samples/blob/main/src/workspaces/cookiefactoryv2/tmdt_project/CookieFactory.json). Similar to the dashboard visualization, the 3D scene visualization accesses telemetry data via TwinMaker's GetPropertyValueHistory API 2(https://docs.aws.amazon.com/iot-twinmaker/latest/apireference/API_GetPropertyValueHistory.html) to process mesh shading rules and render values. See section below for details
  4. The graph visualization of the equipment/process relationships accesses the AWS IoT TwinMaker Knowledge Graph through TwinMaker's ExecuteQuery API 1(https://docs.aws.amazon.com/iot-twinmaker/latest/guide/tm-knowledge-graph.html) 2(https://docs.aws.amazon.com/iot-twinmaker/latest/apireference/API_ExecuteQuery.html). Entity relationship data is modeled through TwinMaker's entity and component model 3(https://github.com/aws-samples/aws-iot-twinmaker-samples/blob/main/src/workspaces/cookiefactoryv2/tmdt_project/entities.json) 4(https://github.com/aws-samples/aws-iot-twinmaker-samples/tree/main/src/workspaces/cookiefactoryv2/tmdt_project). See section below for details
  5. The dashboard visualization of Equipment telemetry data accesses entity data through TwinMaker's GetPropertyValueHistory API 1(https://docs.aws.amazon.com/iot-twinmaker/latest/apireference/API_GetPropertyValueHistory.html). Telemetry asset data is modeled through TwinMaker's entity and component model 2(https://github.com/aws-samples/aws-iot-twinmaker-samples/blob/main/src/workspaces/cookiefactoryv2/tmdt_project/entities.json#L2673) 3(https://github.com/aws-samples/aws-iot-twinmaker-samples/blob/main/src/workspaces/cookiefactoryv2/tmdt_project/com.example.cookiefactory.cookieline.json#L12) 4(https://github.com/aws-samples/aws-iot-twinmaker-samples/blob/main/src/workspaces/cookiefactoryv2/cdk/lib/cookiefactory_v2_stack.ts#L574) 5(https://github.com/aws-samples/aws-iot-twinmaker-samples/blob/main/src/workspaces/cookiefactoryv2/cdk/lib/cookiefactory_v2_stack.ts#L544) 6(https://github.com/aws-samples/aws-iot-twinmaker-samples/blob/main/src/workspaces/cookiefactoryv2/cdk/synthetic_replay_connector/synthetic_udq_reader.py) to enable this data connectivity. See section below for details

AWS IoT TwinMaker Interaction flow details

See the following sub-pages for additional details