Using Garnet Framework
Garnet Framework enables you to build dynamic knowledge graphs and digital twins through the NGSI-LD standard, while providing serverless capabilities for data storage and integration with AWS services. This section will guide you through using the core capabilities of Garnet Framework.
If you are not familiar with the NGSI-LD specification, you can still follow this section but for a better understanding, we recommend reading the section Understanding NGSI-LD.
Core Capabilities
The NGSI-LD API serves as your primary interface for managing context information. Through this standardized API, you can create digital twins of your real-world objects, manage their properties, and establish relationships between them. The Context Broker maintains this evolving knowledge graph, where entities and their interconnections represent the current state of your physical systems.
The temporal capabilities of the Context Broker allow you to access historical values of entity attributes over time. When attributes include temporal properties, such as observedAt, the system automatically preserves their history, enabling time-series analysis and temporal queries.
The Garnet Datalake automatically captures and stores your context information in a structured way in Amazon S3, enabling advanced analytics and long-term storage. This integration lets you analyze historical data, track changes over time, and leverage AWS analytics services like Amazon Athena to derive deeper insights from your data without additional ETL processes.
For efficient data ingestion, Garnet provides a managed SQS queue that makes it easier to connect data producers with the Context Broker, especially when using AWS Lambda functions for data transformation. The queue automatically batches operations for efficient processing, ensuring reliable and scalable data ingestion.
The AWS IoT Core Integration provides seamless synchronization between your IoT devices and your knowledge graph. The system automatically tracks device connectivity status and group memberships, representing IoT devices as entities in the knowledge graph. This integration allows you to maintain consistency between device states and their digital representations while enabling real-time data processing.
Verifying Your Deployment
Before diving into specific features, let's verify your Garnet deployment is working correctly. If you've deployed Garnet as described in the Deploy Garnet section, you should have your Garnet endpoint available in the CloudFormation outputs.
Send a request to your Garnet endpoint:
curl <GarnetEndpoint>/
You should receive a response that includes comprehensive information about your deployment:
{
"garnet_version": "1.4.1",
"garnet_architecture": "distributed",
"context_broker": "Scorpio",
"garnet_private_endpoint": "https://example.execute-api.us-east-1.amazonaws.com/privatesub/",
"garnet_ingestion_sqs_url": "https://sqs.us-east-1.amazonaws.com/123456789012/garnet-ingestion-queue-us-east-1",
"garnet_ingestion_sqs_arn": "arn:aws:sqs:us-east-1:123456789012:garnet-ingestion-queue-us-east-1",
"context_broker_info": {
"garnet-broker-entity-manager": {
"data": {
"build": {
"artifact": "entity-manager",
"version": "5.0.91-GARNET-SNAPSHOT",
"time": "2025-05-21T19:14:55.925515+01:00",
"quarkusVersion": "3.14.1"
}
}
},
// Additional microservice information...
}
}
This response provides key information about your deployment:
- garnet_version: The version of Garnet Framework you're running
- garnet_architecture: Whether you're using the distributed or concentrated architecture
- garnet_private_endpoint: Endpoint for secure subscription notifications
- garnet_ingestion_sqs_url and garnet_ingestion_sqs_arn: Information for the SQS queue used for data ingestion
- context_broker_info: Detailed information about each microservice in the Scorpio Context Broker implementation, including version information
For deployments using the distributed architecture (as shown above), you'll see information for each of the specialized microservices, including the entity manager, query manager, subscription manager, and others. For concentrated architecture deployments, you'll see information for the single all-in-one Scorpio instance.
Next Steps
Now that you've verified your deployment, you can explore the different capabilities of Garnet Framework:
- Using the NGSI-LD API - Learn how to create entities, establish relationships, and query your knowledge graph
- Using the SQS Queue for Data Ingestion - Efficiently ingest data into your knowledge graph using the provided SQS queue
- Using the Garnet Datalake - Access historical data and perform analytics on your context information
- AWS IoT Synchronization - Integrate AWS IoT Core with your knowledge graph
Choose the section that aligns with your immediate needs to continue your journey with Garnet Framework.