Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Integration Service

Architecture

  • Last UpdatedJul 27, 2026
  • 4 minute read

This section describes the architecture, design patterns, and internal structure of the SDK.

The SDK is organized in four layers:

Core Components

  1. DataApiClientFactory

    The primary entry point. Creates typed or generic client instances.

    public static class DataApiClientFactory

    {

    public static T CreateDataApiClient<T>(

    string host,

    AuthenticationType authType = AuthenticationType.NTLM,

    int waitingTimeInMinutesForLiveData = 60,

    string token = "",

    CancellationTokenSource hubCancellationToken = null

    ) where T : class;

    }

  2. BaseClient<TDataSource>

    Abstract base class for all typed clients. Provides common HTTP operations and is the Template Method pattern root.

  3. Typed Clients

    Concrete implementations for each datasource type:

    • EngineeringClient (implements IEngineeringClient)

    • ExcelClient (implements IExcelClient)

    • ERMClient (implements IERMClient)

    • ETAPClient (implements IETAPClient)

    • SimulationClient (implements ISimulationClient)

    • EngineeringDataAPIClient (implements IEngineeringDataAPIClient)

  4. DataApiClient (Generic)

    Implements IDataApiClient. Routes all method calls to the correct typed client at runtime based on the datasource name. Throws MethodNotApplicableException for unsupported operations.

  5. SignalRHubConnectionFactory

    Factory for creating the real-time pub/sub client (ISignalRPubSubClient). Manages SignalR HubConnection lifecycle.

  6. HubConnectionManager

    Manages the SignalR HubConnection. Supports both NTLM and Connect authentication for hub connections, automatic reconnection, and connection state tracking.

  7. HealthCheckClientFactory

    Creates IHealthCheckClient for service availability checks.

Client Hierarchy

Design Patterns

Factory Pattern

DataApiClientFactory encapsulates all construction logic, hiding:

  • HTTP client creation and configuration

  • Authentication token injection

  • HubConnectionManager initialization

  • Concrete class resolution via reflection

Template Method Pattern

BaseClient<TDataSource> defines the skeleton of HTTP request handling. Subclasses override datasource-specific endpoint segments. The base class provides:

  • URL construction

  • Request/response serialization

  • Error propagation

Strategy Pattern

AuthenticationType selects the HTTP handler strategy at construction time:

  • NTLM: HttpClientHandler with UseDefaultCredentials = true

  • Connect: HttpClient with Authorization: Bearer <token> header

Dependency Injection

DataApiClientFactory accepts optional IHttpClientFactory and IHubConnectionManager overrides, enabling test mocking and custom infrastructure.

Data Flow

Example: Fetching Data Sources

var sources = await client.GetDataSources(filter);

// SDK flow:

// 1. GetDataSources() called on EngineeringClient

// 2. BaseClient constructs URL: /api/v1/datasources?filter=...

// 3. HttpClient sends GET with NTLM or Bearer auth

// 4. JSON response deserialized to IEnumerable<DatasourceDto>

// 5. Returns to developer

Factory Pattern

Client Creation Process

Authentication Flow

NTLM Authentication

  1. CreateDataApiClient<T>(host, authType: NTLM)

  2. HttpClientHandler created with UseDefaultCredentials = true

  3. Windows domain credentials used automatically

  4. HTTP Negotiate/NTLM headers sent with each request

  5. DataAPI validates against domain controller

  6. Response returned if valid

    Connect Authentication

    1. Developer acquires token from AVEVA Connect service

    2. CreateDataApiClient<T>(host, authType: Connect, token: "…")

    3. HttpClient configured: Authorization: Bearer <token>

    4. Token sent with each request

    5. DataAPI validates token

    6. Response returned if valid

      SignalR Integration

      Hub Connection Lifecycle

      1. SignalRHubConnectionFactory.CreatePubSubClient(…) called

      2. HubConnectionManager.CreateHubConnectionAsync()

      3. HubConnection configured:

        • URL: https://{host}/api/hub

        • Auth: NTLM or Bearer token

        • Reconnect strategy: automatic with backoff

      4. Connection started and verified

      5. Subscribe / Publish operations use the live connection

      6. Automatic reconnection on network failure

      7. Connection disposed when client is disposed

        Message Flow

        Exception Hierarchy

        Configuration

        API Constants (ApiConstants class)

        • Named HttpClient Names:

          • DataAPINamedHttpClientWithNTLM

          • DataAPINamedHttpClientWithConnect

        • Default Timeout: 60 minutes for live data acknowledgement

        Customization Points

        • Timeout: waitingTimeInMinutesForLiveData factory parameter

        • Authentication: AuthenticationType enum

        • Hub cancellation: CancellationTokenSource hubCancellationToken factory parameter

        Extension Points

        The SDK is designed to be extended:

        • Custom Clients: Inherit from BaseClient<T> for new datasource types

        • Custom Factories: Implement the factory interfaces for specialized creation

        • Custom Authentication: Add new values to AuthenticationType enum

        • HttpClient Middleware: Configure via IHttpClientFactory override

        Thread Safety

        • HttpClient: Thread-safe; designed for reuse across requests

        • Typed Clients: Stateless and thread-safe

        • HubConnection: Thread-safe for subscribe/publish operations

        • Token Management: Caller responsibility to ensure token thread-safety

        Performance Considerations

        • HttpClient Reuse: Clients are designed for reuse; avoid creating per-request

        • Connection Pooling: HttpClientFactory handles pooling automatically

        • Async End-to-End: All I/O is async; do not use .Result or .Wait()

        • Hub Connections: Reuse the pub/sub client; do not recreate per message

        • Memory: Large result sets are returned as IEnumerable<T> for streaming

        Conclusion

        The SDK architecture is built on proven patterns (Factory, Template Method, Strategy) to provide a consistent, extensible interface to the AVEVA Integration Service Data API. The layered approach lets developers work at the right level of abstraction while hiding complex initialization and communication details.

        In This Topic
        Related Links