Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Understand the runtime engine architecture.

Reference  Solution Runtime

...

The Runtime Engine (

...

Reference): The core execution component managing real-time data processing, module coordination, and client services in production environments.

Table of Contents
maxLevel2
minLevel2
indent10px
excludeSteps
stylenone


Core Process - TServer.exe

TServer.exe is the computer process maintaining the real-time database. During execution, it:

  • Loads Tags, Templates, and Assets into memory
  • Acts as central reference point for all modules
  • Manages microsecond-level updates
  • Can run as Windows Service or on Linux/other OS

TServer Components

ComponentFunctionKey Features
Core EngineCentral coordinatorModule management, event routing, memory management
Tag ServicesReal-time databaseIn-memory storage, microsecond updates, quality management
Module HostModule executionDynamic loading, lifecycle management, isolation
Communication LayerNetwork servicesClient connections, protocol handlers, buffering
Security ContextAccess controlAuthentication, authorization, audit logging

Memory Architecture

...

Runtime Memory Space

Memory Structure:

  • Real-time Tag Database (In-Memory)
    • Current Values
    • Quality & Timestamps
    • Cached Metadata
  • Module Memory
    • Device Buffers
    • Alarm States
    • Script Context
    • Client Sessions
  • System Cache

    ...

      • Configuration
      • Security Tokens
      • Performance Metrics

    Memory Management

    AreaPurposeManagement
    Tag DatabaseCurrent values storageAutomatic optimization
    Module MemoryProcessing buffersPer-module allocation
    System CachePerformance dataLRU cache policy

    Process &

    ...

    Thread Model

    TServer Main Process

    Modules - Services Thread Pool:

    • TagProvider services
    • Alarm

    ...

    • processing
    • Historian

    ...

    • services
    • Datasets & SQL

    ...

    • services
    • Solution DB &

    ...

    • cached metadata

    Client Services

    ...

    Threads:

    • TCP Listener Thread
    • Client Handler Threads (1 per client)
    • Web Service Thread Pool

    System Threads:

    • Garbage Collection
    • Performance Monitoring
    • Diagnostics Logging

    Script Module Process

    Script Task Execution:

    ModeThreadingConfiguration
    Default

    ...

    One thread per taskStandard isolation
    Multi-thread

    ...

    • On thread, event driver execution
    Multiple threadsParallel execution
    ConfigurableMax threads settingResource control

    Script Expression Execution:

    • Single thread, event-driven execution
    • Optimized for rapid response

    Script Classes:

    • Client service threads
    • Instance per session

    ...


    Data Flow Architecture

    Real-Time Data Flow

    Flow Sequence:

    Field Devices → Device Module → Tag Database → Processing Modules → Clients
                                     Historian
                                     Database

    Data Flow

    ...

    Image Removed

    Event-Driven Architecture

    Stages:

    StageProcessingLatency
    AcquisitionDevice polling/events1-100ms
    Tag UpdateMemory write<1ms
    ProcessingAlarms/Scripts1-10ms
    DistributionClient notification10-50ms
    StorageHistorian/Database50-500ms

    Event-Driven Architecture

    Event Processing:

    Event TypePriorityHandler
    Tag ChangeHighDirect notification
    AlarmCriticalImmediate processing
    Script TriggerNormalQueued execution
    Client RequestVariableThread pool
    SystemLowBackground thread

    Module Execution

    Module Lifecycle

    PhaseActionsDuration
    InitializeLoad configuration100-500ms
    StartBegin processing10-100ms
    RunActive executionContinuous
    StopGraceful shutdown100-1000ms
    DisposeRelease resources10-100ms

    Module Isolation

    Each module runs with:

    • Dedicated memory space
    • Independent error handling
    • Configurable resource limits
    • Separate logging context

    Performance Characteristics

    Processing Capacity

    MetricTypicalMaximum
    Tag Updates/sec10,000100,000+
    Concurrent Clients50500+
    Script Executions/sec1,00010,000+
    Alarm Processing/sec5,00050,000+

    Resource Usage

    ComponentCPU UsageMemory
    Core Engine5-10%100-200 MB
    Tag Services10-20%Varies with count
    Modules20-40%50-500 MB each
    Client Services5-10% per client10-50 MB per client

    Optimization Settings

    Thread Pool Configuration

    SettingDefaultRangeImpact
    Min Threads42-16Startup performance
    Max Threads10010-1000Peak capacity
    Queue Size1000100-10000Buffer capacity

    Memory Settings

    ParameterDefaultRecommended
    Initial Heap256 MB512 MB for large systems
    Max Heap2 GB4-8 GB for enterprise
    Tag Cache100 MBScale with tag count

    Diagnostics & Monitoring

    Performance Counters

    Monitor these metrics:

    • CPU utilization by module
    • Memory consumption trends
    • Thread pool saturation
    • Queue depths
    • Response times

    Log Categories

    CategoryContentVerbosity
    SystemCore operationsError/Warning
    ModulesModule eventsInfo
    CommunicationClient trafficDebug
    PerformanceMetricsTrace

    High Availability

    Redundancy Support

    FeatureImplementationSwitchover Time
    Hot StandbySynchronized backup<1 second
    Data ReplicationReal-time syncContinuous
    Client RedirectAutomatic failover2-5 seconds

    State Synchronization

    Between primary and backup:

    • Tag values and quality
    • Alarm states
    • Client sessions
    • Module status



    In this section...

    Page Tree
    root@parent



     

    ...