Skip to main content

Getting Started

Welcome to the Garnet Framework! This guide will help you quickly understand how to start building living digital twins and smart, context-aware solutions with Garnet.

Why Choose Garnet?

Garnet Framework empowers you to build dynamic digital twins that provide a living, real-time representation of your physical systems and processes. By leveraging the NGSI-LD open standard and FIWARE technology, Garnet transforms disparate data streams into a unified, contextual knowledge graph that evolves continuously with your operations.

This enables smart applications and AI systems to understand and respond to your operational context in real-time, making it ideal for building intelligent solutions across industries.

Getting Started with Garnet Framework

Architecture

Garnet Framework 2.0

Garnet Framework 2.0 may introduce a new architecture as part of the context broker rebuild. The architecture below describes the current 1.x release.

Garnet Framework is built around the open-source NGSI-LD Context Broker, specifically using the NEC Scorpio Broker implementation, and leverages AWS serverless services for automatic scaling, high availability, and cost optimization. The architecture emphasizes operational efficiency through serverless components, native AWS messaging services, and automated data lake integration, enabling you to focus on building smart applications rather than managing infrastructure.

Garnet Architecture Overview

NGSI-LD Context Broker

The Context Broker implements the NGSI-LD specification, enabling a dynamic knowledge graph approach to managing context information. Through its standardized REST API (NGSI-LD API), it provides a unified interface for modeling, storing, and analyzing data about processes and systems. The NGSI-LD API enables applications to create, update, and query entities while maintaining their semantic relationships and context.

Garnet uses a customized version of the NEC Scorpio implementation of the NGSI-LD Context Broker (available on GitHub). Our customized implementation is published in the Amazon ECR Public Gallery. By default, it's deployed as a single container (concentrated architecture) for simplicity, but can be scaled to a distributed architecture with eight specialized microservices:

  • Entity Manager for creating and updating entities through single or batch operations
  • Query Manager for processing entity queries and retrievals
  • History Entity Manager for handling temporal (time series) entities
  • History Query Manager for querying temporal entities and historical data
  • Subscription Manager for managing NGSI-LD subscriptions, enabling real-time monitoring and notifications when specific conditions are met
  • At Context Server for managing JSON-LD contexts for semantic interoperability
  • Registry Manager and Registry Subscriptions Manager for federation capabilities through NGSI-LD registrations

These microservices communicate through Amazon SNS and Amazon SQS, replacing the original Apache Kafka implementation in Scorpio. To support Scorpio's PostgreSQL database requirements, we use Amazon Aurora Serverless v2 to provide an on-demand, auto-scaling PostgreSQL-compatible database solution.

Our customized version includes additional features such as direct integration with Amazon S3 through Amazon Kinesis Data Firehose, enabling automatic creation of a data lake that captures the evolution of your knowledge graph for historical analysis.

Data Ingestion

The Amazon SQS queue makes it easier to securely ingest data to Garnet Framework from data producers, particularly when using AWS Lambda for transforming source data into NGSI-LD format.

The queue automatically batches operations for efficient ingestion, making it easier for data producers to integrate with Garnet while ensuring reliable and scalable data processing.

API Gateway and Load Balancing

Garnet Framework uses Amazon API Gateway HTTP API as the entry point for all external NGSI-LD API requests. Behind the API Gateway, an Application Load Balancer distributes incoming requests across Context Broker instances.

AWS IoT Integration

Garnet Framework integrates with AWS IoT Core by subscribing to AWS IoT Core events for device monitoring. The system tracks device connectivity status and group management changes, automatically representing IoT devices as entities of type AwsIotThing in the Context Broker.

This integration enables you to seamlessly incorporate IoT device information into your knowledge graph, maintaining a unified view of device states and relationships within your smart solutions.

For deployment instructions, proceed to our Deploy Garnet guide. For a deeper understanding of the ingestion and IoT integration architectures and advanced configurations, check our Dive Deep section (Coming Soon).