@sterfive/optimized-client

Unlock the Full Potential of Your OPC UA Applications

Executive Summary: Reliability & Efficiency for Industrial IoT

In the demanding world of Industrial IoT (IIoT), reliability and data throughput are non-negotiable. @sterfive/optimized-client is the professional-grade solution designed to ensure your Node-OPC UA applications perform flawlessly, regardless of the target server's limitations or network conditions.

For decision-makers and system architects, this module delivers:

  • Accelerated Time-to-Market: Eliminates weeks of complex development time spent handling server quirks, limits, and connection stability.
  • Guaranteed Data Integrity: Automatically manages large datasets and history reads, ensuring no data is lost due to packet size limits or timeouts.
  • Operational Stability: Prevents "request storms" and manages connection drops gracefully, protecting both your client application and the industrial assets it connects to.
  • Cost Efficiency: Reduces network bandwidth usage and server load through intelligent request optimization.

Proven Performance

Recent benchmarks detailed in Boosting OPCUA Client Performance demonstrate significant advantages:

  • Drastically Reduced Transaction Overhead: By merging multiple small requests into optimal batches, network chatter is minimized.
  • Maximized Throughput: Intelligent splitting of large requests ensures data flows at the maximum rate supported by the server, without triggering errors.
  • Zero "BadEncodingLimitsExceeded" Errors: The client automatically negotiates and respects the specific limits of every server it connects to.

Technical Overview

@sterfive/optimized-client is a professional-grade drop-in companion for the standard Node-OPCUA client session that supercharges Node-OPCUA performance and handles complexity for you. It automatically manages server constraints, optimizes data throughput, and ensures robust communication.

Key Features

  • Drop-in Companion: Works with the existing Node-OPCUA API. Minimal code changes required.
  • Automatic Server Limit Handling: Adapts transparently to MaxMessageSize, MaxNodesPerRead, MaxNodesPerWrite, etc., without manual configuration.
  • Smart Batching & Prioritization:
    • Automatically groups concurrent operations (Read, Write, Browse, Call) into efficient batches.
    • Prioritizes critical Control operations (Write, Call) over data polling (Read, Browse) to ensure responsiveness.
  • Optimized Monitored Item Creation: Automatically groups individual monitored item creation requests by subscription, significantly reducing startup time for large subscriptions.
  • Large Request Splitting: Seamless handling of large arrays or massive node lists that exceed server limits.
  • Robust Connection Management:
    • Automatic request pausing during temporary connection loss (customizable timeout).
    • Automatic retry of pending commands upon reconnection.
    • Prevents "request storms" when the server comes back online.
  • Advanced History Support: Includes historyReadFull for reliably fetching large historical datasets with automatic continuation point handling and retry logic.

Usage Examples

1. Easy Integration

Simply wrap your existing session with ClientSessionOptimized.

import { ClientSessionOptimized } from "@sterfive/node-opcua-optimized-client";

// ... inside your async function
const session = await client.createSession();
const optimizedSession = new ClientSessionOptimized(session);

// Now use optimizedSession exactly as you would use the standard session!

2. Automatic Batching

Send multiple requests without await and let the library combine them into a single efficient network transaction.

// These two writes will be sent to the server as a SINGLE WriteRequest
optimizedSession.write({ nodeId: "ns=1;s=Temperature", value: variant1 });
optimizedSession.write({ nodeId: "ns=1;s=Pressure", value: variant2 });

// Wait for all pending operations to complete
await optimizedSession.flush();

3. Handling Large Arrays

Write massive arrays without worrying about message size limits. The client handles the splitting for you.

const largeArray = new Float32Array(100000); // Huge array
// The client will automatically split this into multiple WriteRequests
await optimizedSession.write({
    nodeId: "ns=1;s=SignalWaveform",
    value: { dataType: DataType.Float, arrayType: VariantArrayType.Array, value: largeArray },
});

4. Reading Large History Data

Fetch extensive historical data seamlessly.

import { historyReadFull } from "@sterfive/node-opcua-optimized-client";

const results = await historyReadFull(session, {
    nodesToRead: [{ nodeId: "ns=1;s=MyHistorizedVariable" }],
    startTime: new Date(Date.now() - 24 * 60 * 60 * 1000), // Last 24 hours
    endTime: new Date(),
    returnBounds: true,
});

Installation

This is a professional package available via the sterfive private registry.

  1. Configure Access: Add the following to your .npmrc file:

    @sterfive:registry=http://gitlab.sterfive.fr:4873
    
  2. Login:

    npm login --registry=https://npm-registry.sterfive.fr
    # Username: <your_username>
    # Password: <your_license_key_or_password>
    # Email:    <your_email>
    
  3. Install:

    npm install @sterfive/opcua-optimized-client
    

Get It Now

Accelerate your development and ensure rock-solid performance for your industrial applications.

Contact sterfive for Licensing & Support or visit sterfive.com for more information.