Overview of high-level interfaces
Background
In observability systems built on UModel, accessing observable data requires upper layers to understand UModel concepts such as DataSet, Storage, and Filter. This creates several challenges:
-
Complex storage lookups: You must address various storage lookup problems, such as Filter routing and field mapping.
-
Awareness of underlying implementations: You must be aware of underlying details, such as how a MetricSet is implemented by MetricStore and LogSet.
-
Complex query construction: Multiple interactions are required, such as retrieving metadata before querying data.
-
Repetitive development: Each scenario requires the implementation of similar query logic.
Design goals
The UModel high-level interfaces provide a unified, simplified data access layer with the following core goals:
1. Simplified queries
-
Abstract away underlying complexity: Users do not need to understand implementation details, such as storage specifics and field mapping.
-
Unified query syntax: Provides a consistent Structured Process Language (SPL) query interface to reduce the learning curve.
-
Automated processing: Underlying operations such as routing, mapping, and filtering are handled automatically.
2. Unified interfaces
-
Standardized access: Provides a standard way to access all data types.
-
Simplified integration: Simplifies integration with MCP, AIOps Agent, and other systems.
-
Unified SPL: The UModel high-level interfaces use SPL syntax. You can use SPL for further analysis after a query.
3. High-level abstractions
-
Object-oriented semantics: Provides an entity-based, abstract way to access data.
-
Intelligent method calls: Supports retrieving object interfaces at runtime and calling them, similar to Java reflection.
Architecture design
Overall architecture
The UModel Platform as a Service (PaaS) interfaces use a layered architecture to provide unified data access through a service-based deployment.
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Client │ │ AIOps Agent │ │ UI │
│ (SPL Query) │ │(Intelligent Analysis)│ │ (Visualization) │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│ │ │
└───────────────────────┼───────────────────────┘
│
┌─────────────────┐
│ UModel PaaS API │
│(Transform Service)│
└─────────────────┘
│
┌───────────────────────┼───────────────────────┐
│ │ │
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Data Layer API │ │Object Layer API │ │Metadata Layer API│
│ (Table Mode) │ │ (Object Mode) │ │ (Meta Query) │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│ │ │
└───────────────────────┼───────────────────────┘
│
┌─────────────────┐
│ EntityStore │
│(Underlying Storage)│
└─────────────────┘
Two-phase query mode
The PaaS interfaces use a two-phase query mode that decouples specialized filtering from general computation.
Phase 1: Table mode (data layer)
-
Direct data access: Directly access a dataset and return an SPL query.
-
Specialized filtering: Define additional parameters based on dataset capabilities, such as Step, aggregation, Labels, and Metrics for a MetricSet.
-
Row and column filtering: Specify the required rows and columns.
-
Scenarios: Use this mode when you need full control over the query logic and do not require entity relationship abstractions.
Phase 2: Object mode (object layer)
-
Abstract entity access: Access related data through an entity (EntitySet).
-
Automatic field mapping: Automatically handles field mapping and filter conditions.
-
Relational data queries: Supports data access based on entity relationships.
-
Scenarios: Use this mode when you need entity-based abstractions to automatically handle complex relational queries.
Interface overview
Data layer (Phase 1 Table mode)
The data layer provides direct access to the following dataset types:
|
Dataset Type |
SPL Syntax |
Description |
|
MetricSet |
|
Queries metric data. Supports Prometheus Query Language (PromQL) and SPL modes. |
|
LogSet |
|
Queries log data. Supports full-text index and filtering. |
|
TraceSet |
|
Queries Tracing Analysis data. |
|
EventSet |
|
Queries event data. |
|
ProfileSet |
|
Queries performance profiling data. |
Object layer (Phase 2 Object mode)
The object layer provides object-oriented access to entities.
.entity_set with(domain='domain_name', name='entity_name', [parameters])
| entity-call method_name(parameters...)
Core method categories:
|
Method Category |
Example Method |
Description |
|
Built-in Management |
|
Lists methods and inspects configurations. |
|
Data Access |
|
Retrieves entity-related data, such as metrics and logs. |
|
Relationship Access |
|
Retrieves relationship data between entities. |
|
Entity Management |
|
Lists entities and queries neighboring entities. |