Children Display | ||||||
---|---|---|---|---|---|---|
|
Introduction to the Runtime
The Runtime Environment is the active stage where a Solution starts and operates. , executing real-time data acquisition, scripts, alarms, and all configured modules to deliver the application's functionality.
Parent Page: Solution Lifecycle (Reference)
Overview
Executing a Solution, or starting the Runtime, involves:
- Loading all functional modules for execution
- Acquiring and processing data and updating visual displays
- Performing all tasks based on the Solution's configuration
When the Runtime Environment loads the module's configuration
, settings
such as network addresses and database connections
can be applied according to the execution profile. Profiles enable the same solution configuration to interface with various databases and devices, accommodating different phases of the solution
lifecycle (Development, Validation,
Production).
On this page:
Table of Contents | ||||||
---|---|---|---|---|---|---|
|
Key Concepts
Term | Definition |
---|---|
Runtime | The |
Key Concepts and Terms
The purpose of the Runtime Environment is to actively operate configured solutions, executing real-time data acquisition, scripts, alarms, and all items from all modules. It represents the essential final phase of solution development, delivering the application's functionality.
Runtime
The term "Runtime" or "Runtime Environment" refers to theexecution environment when the solution is running, distinguishing it from the Configuration |
phase. |
Also denotes the software components and |
processes |
in execution |
Execution Profile |
Settings allowing customization of database connections and device network addresses |
for different environments |
Online Configuration |
Real-time modifications to a running solution without stopping |
execution |
Hot Updates/Hot Reload |
Subset of online configurations |
allowing offline solution changes without disrupting |
runtime |
Build and Publish |
Compilation of solution code and creation of read-only |
versions for regulated deployment |
Runtime Architecture
Understanding the Runtime EnvironmentReal-Time In-Memory Database
When the solution
is in executionexecutes, variables like Tags, Templates, and Assets are loaded into
the memory. These variables actmemory, acting as a central
point of reference, allowing other functional modules to request or publish values as they perform their functions. The computer process and executable responsible for maintaining the real-time database is TServer.exe. This applicationreference point for all functional modules.
???????????????????????????????????????????????
? TServer.exe Process ?
???????????????????????????????????????????????
? Real-Time Database ?
? • Tags, Templates, Assets ?
? • Current Values & Quality ?
? • Microsecond Updates ?
???????????????????????????????????????????????
? Module Connections ?
? • Devices → Tag Updates ?
? • Scripts → Processing ?
? • Clients → Data Access ?
???????????????????????????????????????????????
The computer process TServer.exe maintains the real-time database and can run as a Windows Service or be deployed to Linux and other supported operating systems.
Startup Procedure
→ For details on the startup procedure review the Runtime Startup (Reference) page.
→ For details on setting up the execution review the Solution Deployment page.
1. Launching TStartup.exe
- Loads the
- Solution
- Reads
- Solution Configuration
- Parses Command Line Parameters
- Activates
- Main Process TServer.exe
2.
Starting the Real-Time Database
TServer.exe starts by loading solution objects, tags, templates, and assets into
thememory. A communication service is established, allowing other modules to start and connect.
3. Modules Startup
The other modules, such asOther modules (Historian, Alarms, Devices, Scripts, Datasets,
andReports
, then) start
theirexecution by reading
thesolution configuration and establishing
aconnection with the main process.
4. Applying Execution Profiles
As the modules start, theyModules behave according to
the definitions in the Execution Profiles. For instance, in Development mode, a temporaryExecution Profile definitions. For example:
- Development: Temporary local SQLite database
- for alarm records
- Production: Alarm Database
- automatically mapped to
- SQL server
5.
Solution Designer Automatic Connection
The SolutionDesigner automatically connects to
therunning solution, enabling
users to monitor progressmonitoring,
makeadjustments, and
troubleshoot issues as needed using thetroubleshooting via Monitor and Diagnostics pages.
6. Opening Client-Side Displays
Operations displays
, using(HTML5
from any browseror
high-performance WPF graphics pages,WPF) can be opened from any remote computer connected to the server.
7. Applying Online Changes and Hot Updates
During execution, the systemSystem can apply
onlineconfiguration changes and
hotupdates without disrupting
the runtime environment. This capability allows users to adapt the solution to changing requirements whileruntime, maintaining high
systemavailability
.Configuring the Runtime Environment
When developing a software solution, maintaining stability and preventing interference between various stages and components is crucial. To ensure the configuration and development aspects do not negatively impact the solution's runtime environment, use "Configuration and Runtime Process Isolation."
The Configuration Process involves setting up parameters, profiles, and other settings that define how the solution should operate.
Isolating these processes allows developers to modify configurations and test new features without disrupting the running solution, defining how the solution should opportunity depending on the Execution Profile you are running.
Runtime Configurations
Runtime Startup
The Runtime Startup section allows you to Start and Stop the execution of the Solution, specify the Execution Profile you want to use, and customize all settings connected within that execution.
The settings defined here are also applied when the Startup is executed by the StartSolution command line, or starting the solution as a Windows Server. This section focuses on the various settings you have available and starting and stopping manually.
→ Read more about Runtime Startup (Reference).
Execution Profiles
Execution Profiles enable distinct configurations for a single project, facilitating a seamless and swift transition between devices and databases.
Development, Validation, and Production are the scenarios in which the solution must operate over its lifecycle. Occasionally, these scenarios may overlap, posing risks to the entire operational environment. In this version, we introduce an intuitive method to separate these stages, enhancing both security and reliability.
→ Read more about Runtime Execution Profiles (Reference).
Build and Publish
The software platform offers support to manage solution versions, allowing the creation of a read-only version and a published version. The Build feature compiles the solution's displays and scripts for final verification before deployment in production. It ensures complete verification of an application's scripts in preparation for production. The Publish command generates a read-only protected version of a solution ready for field deployment. This command produces a new Solution file (".
dbsln") with the chosen version number. The Published Solutions (".dbrun") mirror the current solution but are accessible only in read-only mode, offering a secure backup of published applications.→ Read more about Build and Publish.Runtime
DiagnosticsThis page provides a comprehensive guide on how to use diagnostic tools for project applications. These tools include the Property Watch, Trace Window, and Module Information, which offer insights into the status and operation of different modules within your application.
Property Watch is a tool designed to access and modify the system's tags and internal properties. With an Intellisense feature, it also provides a list of available objects related to a specific object type.
→ Read more about Runtime Diagnostics.
Server And Client Namespaces
There are a few runtime objects that provide information about running the solution.
Namespaces
Info Namespace
Main location for runtime status
The Info namespace is the main location for the runtime status. The main objects on the namespace are:
The Server namespace has informationInfo.Solution
:information
about
the
solution
-
thatInformation
isabout running solution Info.License
:information
about
-
theLicense
licenseinformation Info.Module
:- Module information and start/stop
command to Modulescommands Info.Trace()
: displays a- Display message on
theTraceWindow Info.TestMode
: shows- Shows if
thesolution
isrunning in Test Mode
Server Namespace
Information about the server computer running the solution.
The Client namespace has informationClient Namespace
Information about each client
compute that runs a graphical interface. See Namespaces for the complete programming reference on runtime objects.Working with the Runtime
Starting and Stopping the Solution Execution
To start the solution execution, you need to launch the application or server, depending on the solution type. It is essential to monitor the system for any errors or issues during startup, as they may prevent the application from running correctly.
To stop the solution execution, you can use the appropriate command or interface provided by the runtime environment or the application itself. Make sure to shut down the application to avoid data loss or corruption.
To start the solution in production mode:
- Go to Runtime / Startup.
- Click the Run Startup button
Applying Configuration Changes
Configuration changes can be applied to the runtime environment to modify the behavior of the application. These changes can include modifying settings, adding or removing modules, or adjusting resource allocation. To apply configuration changes, follow these steps:
- Identify the configuration file or settings for your application.
- Modify the configuration settings as needed.
Restart the application or reload the configuration to apply the changes, depending on the capabilities of the runtime environment.
computer running a graphical interface.
Configuration Components
Component | Purpose | Documentation |
---|---|---|
Runtime Startup | Start/stop execution, profile selection | Runtime Startup (Reference) |
Execution Profiles | Environment-specific configurations | Runtime Execution Profiles (Reference) |
Build and Publish | Compilation and deployment | Runtime Build and Publish (Reference) |
Runtime Diagnostics | Property Watch, Trace Window, Module Info | Runtime Diagnostics (Reference) |
System Monitor | Runtime status and metrics | Runtime System Monitor (Reference) |
Process Isolation
Configuration and Runtime Process Isolation ensures development doesn't impact production:
Process | Activities | Isolation Method |
---|---|---|
Configuration | Setting parameters, profiles | Separate environment |
Runtime | Active execution | Protected instance |
Development | Testing features | Different profile |
Working with Runtime
Starting Solution Execution
- Go to Runtime → Startup
- Select appropriate Execution Profile
- Click Run Startup button
- Monitor for errors during startup
Stopping Solution Execution
Use appropriate shutdown method to avoid data loss:
- Designer: Click Stop button
- Service: Stop Windows service
- Command line: Use shutdown command
Applying Configuration Changes
- Identify configuration file or settings
- Modify settings as needed
- Either:
- Restart application (offline changes)
- Use Online Configuration (hot updates)
Child Pages
Configuration Interface:
- Runtime Designer UI (Reference) - Designer runtime pages
- Runtime Startup
- Execution Profiles
- Build and Publish
- System Monitor
- Runtime Diagnostics
Architecture:
- Runtime Engine (Reference) - TServer components and architecture
Support:
- Runtime Troubleshooting (Reference) - Best practices and issue resolution
See Also
- Solution Lifecycle (Reference) - Parent section
- Solution Deployment (Guide) - Production deployment
- Namespaces API (Reference) - Complete programming reference
Best Practices and Troubleshooting
Best Practices for "Runtime Isolation"
- Use Separate Environments: Using separate environments for development, testing, and production allows working on solution configurations and features without affecting the runtime environment. Changes made during development are not reflected in the runtime environment until they have been tested and deployed.
- Use Containers: Technologies like Docker enable developers to create isolated containers for different parts of the solution. This approach ensures that modifications in one container do not impact the runtime environment in other containers.
- Use Version Control: Implementing version control helps manage solution configurations and code changes. This method allows developers to experiment with configurations, roll back to previous versions, and track changes without affecting the runtime environment.
- Use Access Control: Access control mechanisms restrict modifications to the runtime environment and configuration settings. This ensures that only authorized personnel can make changes, reducing the risk of accidental disruptions or unauthorized access.
Runtime issues can occur during the execution of the application, such as crashes, performance problems, or unexpected behavior.
Troubleshooting Runtime Issues
- Review the application logs for any error messages or warnings.
- Use debugging tools to inspect the state of the application at runtime.
- Monitor system resources, such as CPU, memory, and disk usage, to identify potential bottlenecks or resource constraints.
- Consult the documentation or support resources for known issues and solutions.
- Make sure you're using appropriate execution profiles for different stages of the development lifecycle.
- Apply configuration changes carefully, always testing before deploying to production.
- Document any custom configurations or modifications for future reference.
- Keep the runtime environment up to date with security patches and software updates.
Troubleshooting Common Issues
Performance bottlenecks: Slow solution execution can be caused by a variety of factors, such as inefficient code or inadequate hardware resources. To resolve this issue, optimize your code, allocate more resources, or employ parallel processing techniques.
Configuration errors: Incorrect settings in the solution configuration can lead to unexpected behavior or failure. Review your configuration files, verify the parameters, and ensure they adhere to the documentation.
Runtime environment mismatch: Incompatibilities between development and production environments may cause issues during runtime. To address this, ensure that all dependencies are consistent across environments and use containers or virtual machines for environment isolation.
Module conflicts: Conflicts between modules can lead to unexpected behavior or crashes. To resolve this, check for duplicate or outdated modules and ensure that your modules are compatible with each other.
Database connectivity issues: Problems connecting to the real-time database can be caused by network issues, incorrect credentials, or misconfigured database settings. Verify the database connection settings, ensure the database server is accessible, and check the credentials.
Client-side display errors: Issues with client-side displays can stem from incompatible browser versions, outdated JavaScript libraries, or improperly configured display settings. To fix this, ensure your solution supports the target browser versions, update your libraries, and double-check display settings.
Hot updates not applied: If hot updates are not being applied correctly, confirm that your solution is configured to accept online changes and verify the update mechanism is functioning as expected.
In this section:
Page Tree | ||||
---|---|---|---|---|
|