Versions Compared

Key

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


HTML
<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>




Introduction to the Runtime

Image Added

The Runtime Environment is

Introduction to Solution Execution and Runtime

Solution Execution and Runtime designate the active stage where a Solution starts and operates. This involves the utilization of functional Modules, data acquisition and processing, updating visual displays, and carrying out other tasks in accordance with the solution's specified configuration. 

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 modules' configuration. Some settings, such as network addresses and database connections, can be applied according to the execution profile. Profiles The runtime environment consists of all the Modules loaded and operating according to the solution configurations. This setup is directed by Execution Profiles, which guide the solution's connections and actions. These 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.

A distinct feature of this runtime framework is its Online Configuration, which supports real-time adjustments to an actively running solution without causing any disruption to its execution. Additionally, Hot Updates facilitate the seamless integration of offline solution changes, ensuring flexibility and adaptability in the continuing runtime environment.Image Added

On this page:

Table of Contents
maxLevel3
minLevel2
stylenone


Purpose and

Key Concepts and Terms

The purpose of the Runtime and Solution Execution Environment is to actively operate the configured Solutionssolutions, execute executing real-time data - acquisition, scripts, alarms, and all Solution configured items from all Modulesmodules. It is an represents the essential and final phase of the Solution solution development, effectively delivering its the application's functionality. 

Runtime

The term "Runtime, " or Runtime environment, refer "Runtime Environment" refers to the execution environment operates. It is used to do a differentiation when the solution is running, distinguishing it from the Configuration (or Engineering, or Development) phase. The term "Runtime is " also use to refer denotes the software components and computer processes that are in execution when the solution is started. 

Execution Profile

An execution profile is a set of configurable Execution Profile consists of settings that allows allow customization during runtime of Database Connections, Device Network addresses,  facilitating of database connections and device network addresses. This enables the management of different environment. It allows to setup the connections used during the Development, Validation and Production phases, to their settings, still having only solution configuration file.environments.

Online Configuration

This feature enables allows real-time modifications to be made to a running solution without stopping its execution. It allows users to Users can adapt the solution to changing requirements, improving enhancing flexibility and responsiveness.

Hot Updates / Hot Reload

Hot updates Updates are a subset of online configuration, permitting configurations that allow the application of offline solution changes without disrupting the runtime environment. They are essential for maintaining maintain solution stability and avoiding prevent downtime while , ensuring the solution stays remains up-to-date with the latest changes.

Build and Publish

The build and publish Build process involves compiling the solution code and creating . The Publish process creates a read-only version of the solution , which can be distributed to end-users. This step is critical in ensuring the solution is ready for deployment and accessible to the intended audiencefor distribution in regulated sites.


Understanding the

solution Execution

Runtime Environment

Real-

time in

Time In-

memory

Memory Database

When the solution is in execution, the realtime-variables for the application, i.e. variables like Tags, Templates, and Assets , are loaded into memory, and it acts as the memory. These variables act as a central point of reference, to allowing other functional modules can to request values from those variables, or publish values , as they perform its functiontheir functions.   The computer process and executable responsible to hold for maintaining the Realreal-time database is the TServer.Exeexe. That This application can run as a Windows Service , or it can be deployed to Linux and other  supported supported operating systems.

Startup Procedure

The are various ways to start the execution of a Solution. You can start it manually by going to the Runtime→Startup page. The various other ways to setup its execution are detailed in the chapter Deploying the Application.

Independently on how the Solution executed is started, the Startup executes the following steps:

For details on the startup procedure review the Runtime Startup page.

For details on setting up the execution review the Solution Deployment page.

  1. Launching TStartup.exe
    • Loads the Solutions
    • Reads the Solution Configuration
    • Parses Command Line Parameters
    • Activates the Main Process TServer.exe.
  2. Starting the Real-Time Database
    • TServer.exe starts by loading solution

1. The TStartup.exe application is launched

This utility is a solution loader, it will read the Solution Configuration for Startup, accordingly the Execution Profile selected, parse \ command line parameters, and active the main process TServer.exe

2. Starting the Real-Time DatabaseThe TServer.EXE starts

The TServer.EXE starts, loading  solution
    • objects, tags, templates, and assets
,
    • into the memory
, and a
    • . A communication service is
stablished
    • established, allowing other modules to start and connect
for that
    • .
 
3.
  1. Modules Startup
    • The other modules
defined to start
    • ,
like
    • such as Historian, Alarms, Devices, Scripts, Datasets, and Reports, then start their execution
,
    • by reading the solution configuration and
establish
    • establishing a connection with the main process.
 
4.
  1. Applying Execution Profiles
are applied
When
    • As the modules
are starts
    • start, they
will
    • behave according to the definitions
on
    • in the Execution Profiles. For instance,
you can estou that
    • in Development mode,
you use
    • a temporary local SQLite database might be used for
your
    • alarm records,
and on the
    • while in Production mode, the Alarm Database is automatically mapped to a SQL server.
 
5.
  1. Solution Designer Automatic Connection
    • The Solution
designer
    • Designer automatically connects to the running solution,
allowing
    • enabling users to monitor progress, make adjustments, and troubleshoot issues as needed using the Monitor and Diagnostics pages.
 
6.
  1. Opening Client-Side Displays
The
    • Operations
display
    • displays, using HTML5 from any
type of Browser,
    • browser or high-performance WPF graphics pages, can be opened from any remote computer connected
with
    • to the server.
 
7.
  1. Applying Online Changes and Hot Updates
 During
    • During execution, the system can apply online configuration changes and hot updates without disrupting the runtime environment. This capability
enables
    • allows users to adapt the solution to changing requirements
and maintain
    • while maintaining high system availability.

Configuring the Runtime Environment

When developing

Configuration and Runtime Process Isolation

In a software development solution, it is essential to maintain maintaining stability and prevent preventing interference between various stages and components of the solution. Configuration and runtime process isolation is a technique used to achieve this goal, ensuring that is crucial. To ensure the configuration and development aspects of the solution do not negatively impact the solution's runtime environment, use "Configuration and Runtime Process Isolation."

The configuration process Configuration Process involves setting up parameters, profiles, and other solution settings , which that define how the solution should operate. On the other hand, the runtime process focuses on executing the solution and maintaining optimal performance. By isolating these processes, developers can

Isolating these processes allows developers to modify configurations and test new features without disrupting the running solution.

This isolation is achieved through several means:

  1. Separate Environments: By using separate environments for development, testing, and production, it is possible to work on solution configurations and features without affecting the runtime environment. Any changes made during development are not reflected in the runtime environment until they are thoroughly tested and deployed.

  2. Containerization: Containerization technologies, such as Docker, allow developers to create isolated containers for different parts of the solution. This approach ensures that modifications made in one container do not impact the runtime environment or other containers.

  3. 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.

  4. Access Control: By implementing access control mechanisms, it is possible to restrict modifications to the runtime environment and configuration settings. This approach ensures that only authorized personnel can make changes, reducing the risk of accidental disruptions or unauthorized access.

By employing configuration and runtime process isolation, solutions can maintain stability, enhance security, and minimize disruptions during the development and execution phases. This practice allows for continuous improvements, troubleshooting, and adjustments without compromising the solution's overall performance.

Runtime Execution Configuration

Runtime Startup 

This User Interface allows to you to Startup and Stop the execution of the solution and to customize the Runtime Settings, specifying which modules will execute, the communication ports, redundancy and other related items. 

You can learn more about the Runtime Startup User Interface  at Runtime Startup.

, 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 Solution Deployment.

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 Execution Profiles

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 Diagnostics

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


Server And Client Namespaces

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.


Working with the Runtime

Anchor#ExecutionProfiles#ExecutionProfilesExecution Profiles

Development and testing profiles are used to manage different environments within a solution. These profiles enable developers to work on new features, bug fixes, or improvements while keeping the production environment stable. By configuring separate profiles for development and testing, teams can maintain code quality and avoid deploying untested changes to the live environment. This separation also facilitates the debugging process and helps to identify issues that may arise during development. You can learn more about each of the profiles at Execution Profiles.

Diagnostics

Diagnostics on runtime execution are essential for monitoring a solution's performance, identifying potential issues, and ensuring overall stability. By implementing logging, performance metrics, and error reporting, developers can gain valuable insights into the execution process. These insights can be used to troubleshoot problems, optimize performance, and maintain system health. Effective diagnostic tools are crucial for maintaining a reliable and high-performing solution. For more information on Diagnostics, see Runtime Diagnostics.

Build and Publish

Publishing read-only versions of a solution is crucial for maintaining a stable production environment while allowing developers to work on new features and bug fixes. The process involves preparing the solution for publication, creating a snapshot or branch, building and testing the solution, packaging the build, marking it as read-only, and deploying it to the production environment. 

This approach reduces the risk of unintentional changes, simplifies rollback processes, and separates development and production environments. Adhering to best practices like regular release scheduling, using version control, thorough testing, documentation, and clear communication ensures a smooth and efficient publishing process for read-only versions. To learn more, visit Build and Publish.

Working with the Runtime

Working with the runtime is a key aspect of software development, as it involves managing the execution of a program while it's running. This includes starting and stopping the execution, switching execution profiles, and applying configuration changes. This comprehensive guide provides an overview of best practices and techniques for efficiently 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 's 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 gracefully shut down the application to avoid data loss or corruption.

To start the solution is in production mode:

  1. Go to
 
  1. Runtime → Startup.
  2. Click the
 
  1. Run Startup
 
  1. 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:

  1. Identify the configuration file or settings for your application.
  2. 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.


Best Practices and Troubleshooting

Best Practices for "Runtime Isolation"

  1. 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.
  2. 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.
  3. 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.
  4. 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

  1. Review the application logs for any error messages or warnings.
  2. Use debugging tools to inspect the state of the application at runtime.
  3. Monitor system resources, such as CPU, memory, and disk usage, to identify potential bottlenecks or resource constraints.
  4. Consult the documentation or support resources for known issues and solutions.
  5. Make sure you're using appropriate execution profiles for different stages of the development lifecycle.
  6. Apply configuration changes carefully, always testing before deploying to production.
  7. Document any custom configurations or modifications for future reference.
  8. Keep the runtime environment up to date with security patches and software updates.

Troubleshooting Common Issues

and Solutions

  • 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.

Troubleshooting and Best Practices

Runtime issues can occur during the execution of the application, such as crashes, performance problems, or unexpected behavior. To troubleshoot these issues, follow these steps:

  • 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.

Info, Server And Client Namespaces

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
  • .


In this section:

Page Tree
root@self
spacesV10