Add comprehensive Resilient Query Engine for Historians, and the SMB AKRI connector#1256
Add comprehensive Resilient Query Engine for Historians, and the SMB AKRI connector#1256uriel-kluk wants to merge 1 commit intoAzure:mainfrom
Conversation
Includes unit, concurrency, edge case, integration, and registration tests for RqrEngine in ResilientQueryRunner.Tests. Covers query lifecycle, scheduling, failure handling, concurrency limits, retry logic, and thread safety. All tests use MIT license headers and provide robust coverage for correctness and reliability.
There was a problem hiding this comment.
Pull request overview
This pull request introduces a comprehensive Resilient Query Engine for Historians along with an SMB connector implementation for Azure IoT Operations. The PR adds substantial new infrastructure for building historian connectors with resilient time-windowed querying capabilities.
Changes:
- Adds ResilientQueryRunner library with query scheduling, watermark tracking, and retry logic
- Implements historian connector core framework bridging RQR with Azure IoT Operations SDK
- Adds authentication framework supporting Basic, OAuth, and Certificate authentication
- Implements SMB connector with Parse and Copy task types
- Provides comprehensive test coverage with unit, integration, and edge case tests
Reviewed changes
Copilot reviewed 84 out of 84 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| dotnet/test/ResilientQueryRunner.Tests/RqrEngineReregistrationTests.cs | Unit tests for query registration/reregistration functionality |
| dotnet/test/ResilientQueryRunner.Tests/ResilientQueryRunner.Tests.csproj | Test project configuration |
| dotnet/test/Akri.Connector.SMB.Tests/*.cs | Comprehensive SMB connector tests |
| dotnet/src/ResilientQueryRunner/*.cs | Core RQR engine implementation |
| dotnet/src/Akri.HistorianConnector.Core/*.cs | Historian connector framework |
| dotnet/src/Akri.ConnectorFramework.Authentication/*.cs | Authentication handlers |
| dotnet/samples/Connectors/Akri.Connector.SMB/* | SMB connector implementation and configuration |
|
Is the intention to actually ship this connector? And is there some reason that you want this connector to live in this SDK repo rather than in its own repo? For context, we maintain a separate repo for our first party connectors and that repo has a lot more infrastructure for publishing connectors. |
|
It seems you are looking to publish a few new Nuget packages in our src folder here as well. Most of them seem very specific to your connector though, so I don't follow why you would want to check this into this repo. This repo is for the core AIO SDK packages (packages with features that are applicable for all connectors) so these changes feel like they belong in a different repo. |
|
Hi @timtay-microsoft,
We met with the product team and agreed that publishing a single connector with production‑level quality gates is the right direction for both Mesh and Microsoft.
Our intent is for the underlying libraries to be reusable across other polling‑based connectors such as OSI PI, Wonderware, SFTP, and others.
Your PollingTelemetry example was a key inspiration. We’ve simply consolidated the shared logic into the RQR engine so all connectors can benefit from a common pattern.
We recognize that an 84‑file PR can be overwhelming, and I’m more than happy to help walk through the changes and support adoption.
If you still feel this work does not belong in the SDK, feel free to close the PR.
We have additional connectors coming, and establishing a common, community‑supported pattern will reduce tech debt and improve our ability to deliver AIO projects successfully.
It’s ultimately your call, but to reiterate:
We are fully committed and ready to help you adopt this work.
…---
Resilient Query Runner (RQR) Engine — Requirements Specification
1. Scope
The Resilient Query Runner (RQR) Engine is a reusable scheduling and execution engine used by host applications (e.g., Akri connectors) to deterministically plan, schedule, execute, and persist windowed queries against historian-like systems.
The engine is responsible for:
Scheduling query executions (cron and ad-hoc)
Range planning for time- or index-based queries
Execution dispatch with concurrency and ordering guarantees
Watermark persistence and recovery across restarts
Catch-up processing for missed or delayed data
Retry orchestration without cross-query blocking
Emission of instrumentation and health signals (metrics, logs, traces)
The engine is not responsible for:
Historian authorization, token refresh, or connection lifecycle
Query syntax, protocol, or transport
Mapping or serialization of query results
Transporting data to cloud or downstream systems
Hosting application endpoints (e.g., HTTP servers or probes)
The engine produces normalized resultsets and relies on the host application to acknowledge successful downstream handling before committing progress.
Best,
Uri
________________________________
From: Tim Taylor ***@***.***>
Sent: Thursday, February 26, 2026 1:12:22 PM
To: Azure/iot-operations-sdks ***@***.***>
Cc: Uriel Kluk ***@***.***>; Author ***@***.***>
Subject: EXT: Re: [Azure/iot-operations-sdks] Add comprehensive Resilient Query Engine for Historians, and the SMB AKRI connector (PR #1256)
[https://avatars.githubusercontent.com/u/28789848?s=20&v=4]timtay-microsoft left a comment (Azure/iot-operations-sdks#1256)<#1256 (comment)>
It seems you are looking to publish a few new Nuget packages in our src folder here as well. Most of them seem very specific to your connector though, so I don't follow why you would want to check this into this repo.
This repo is for the core AIO SDK packages (packages that are applicable for all connectors) so these changes feel like they belong in a different repo.
—
Reply to this email directly, view it on GitHub<#1256 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AJ2NCA2LURKKNXFQF3NI6W34N5ARNAVCNFSM6AAAAACWACNE3GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTSNRYGY2TGNJRGU>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
This pull request adds a new SMB connector project (
Akri.Connector.SMB) to the solution, including its configuration validation, error handling, health checks, Docker build setup, and solution integration. The changes introduce core infrastructure for connecting to and managing SMB shares as historian data sources, with robust validation and operational health monitoring.New SMB connector infrastructure:
Akri.Connector.SMBwith references to authentication and historian connector core libraries, and configured NuGet dependencies for SMB protocol, health checks, and file system globbing. (dotnet/samples/Connectors/Akri.Connector.SMB/Akri.Connector.SMB.csproj)ConfigurationValidator.csto enforce connector settings, including task type, leader election, and destination path requirements. (dotnet/samples/Connectors/Akri.Connector.SMB/Configuration/ConfigurationValidator.cs)SmbErrorHandler.cs, supporting retry logic and detailed error categorization. (dotnet/samples/Connectors/Akri.Connector.SMB/ErrorHandling/SmbErrorHandler.cs)Operational health monitoring:
dotnet/samples/Connectors/Akri.Connector.SMB/Health/HealthChecks.cs)Build and solution integration:
dotnet/samples/Connectors/Akri.Connector.SMB/Dockerfile)dotnet/Azure.Iot.Operations.sln) [1] [2] [3]Includes unit, concurrency, edge case, integration, and registration tests for RqrEngine in ResilientQueryRunner.Tests. Covers query lifecycle, scheduling, failure handling, concurrency limits, retry logic, and thread safety. All tests use MIT license headers and provide robust coverage for correctness and reliability.