<style> .text-span-6 { background-image: linear-gradient(99deg, rgba(170, 163, 239, .5), rgba(125, 203, 207, .5)); border-radius: 50px; padding-left: 15px; padding-right: 15px; } #title-text { display: none; } .panelgradient { background-image: linear-gradient(180deg, #d5def0, whitesmoke); border-radius: 8px; flex-direction: column; justify-content: center; align-items: center; padding: 4rem; display: flex; position: relative; } </style> <div class ="panelgradient"> <h1 style="text-align: center;">Runtime<br>(Solution Execution)</h1> </div> |
The Runtime Environment is the active stage where a Solution starts and operates.
Executing a Solution, or starting the Runtime, involves:
When the Runtime Environment loads the module's configuration. Some 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 life cycle, such as Development, Validation, or Production.
On this page:
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 the execution environment when the solution is running, distinguishing it from the Configuration (or Engineering, or Development) phase. "Runtime" also denotes the software components and computer processes that are in execution when the solution is started.
Execution Profile
An Execution Profile consists of settings that allow customization of database connections and device network addresses. This enables the management of different environments.
Online Configuration
This feature allows real-time modifications to a running solution without stopping its execution. Users can adapt the solution to changing requirements, enhancing flexibility and responsiveness.
Hot Updates / Hot Reload
Hot Updates are a subset of online configurations that allow the application of offline solution changes without disrupting the runtime environment. They maintain solution stability and prevent downtime, ensuring the solution remains up-to-date with the latest changes.
Build and Publish
The Build process involves compiling the solution code. The Publish process creates a read-only version of the solution for distribution in regulated sites.
When the solution is in execution, variables like Tags, Templates, and Assets are loaded into the memory. These variables act 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 application can run as a Windows Service or be deployed to Linux and other supported operating systems.
→ For details on the startup procedure review the Runtime Startup page.
→ For details on setting up the execution review the Solution Deployment page.
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.
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.
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.
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.
This 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.
There are a few runtime objects that provide information about running the solution.
The Info namespace is the main location for the runtime status. The main objects on the namespace are:
Info.Solution: information about the solution that is running Info.License: information about the license Info.Module: information and start/stop command to Modules Info.Trace(): displays a message on the TraceWindow Info.TestMode: shows if the solution is running in Test Mode
The Server namespace has information about the server computer. The Client namespace has information about each client compute that runs a graphical interface. See Namespaces for the complete programming reference on runtime objects.
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:
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:
Restart the application or reload the configuration to apply the changes, depending on the capabilities of the runtime environment.
Best Practices for "Runtime Isolation"
Runtime issues can occur during the execution of the application, such as crashes, performance problems, or unexpected behavior.
Troubleshooting Runtime Issues
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.
Build and publish failures: Errors during build and publish processes may be due to incorrect settings, code issues, or dependency problems. Review the build and publish configuration, fix any code issues, and ensure all dependencies are resolved.
In this section: