Versions Compared

Key

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

Easy Heading Macro
headingIndent40
navigationTitleOn this page
selectorh2,h3
wrapNavigationTexttrue
navigationExpandOptiondisable-expand-collapse

This page contains the article High Availability and .NET Framework



Introduction

One feature that remains unchanged on in mission-critical and industrial applications is that operational stability, safety, and security are its main principal requirements. The mechanisms related to increase increasing the guarantee of stability are among the main core architectural changes, changes made possible by new technologies, specifically on in software. The advent of the Microsoft .NET Framework brought introduced higher and unique features to create for creating high-availability systems.

There are also many .NET features regarding , including productivity tools, development helpaids, class libraries, and communication standards which have an important role to improve , play a crucial role in improving a Project Development Platform. However, but this article is focused focuses on two very important areas that only with .NET were able to properly managed. Those aremanages particularly well:

  1. Creating
intrinsically safe software architecture
  1. Intrinsically Safe Software Architecture
  2. Managing
multiple versions
  1. Multiple Versions of Operating Systems, Software
tools and projects
  1. Tools, and Projects

Software Safety

Intrinsically Safe Software

In field instrumentation, security is not only guaranteed by internal procedures or manufacturers' warranty, warranties but also and primarily by the system architecture, using which uses voltages and currents which that are "intrinsically safe" in the environment that where the instrumentation will operate, so . This ensures that even in case the event of an specific equipment failure, the system is remains protected.

When we started began using the expression term "intrinsically safe software," , we got received many questions on about its meaning for software; that is just to apply in the context of software. It refers to applying the same concepts we have in hardware to software systems. Specifically, which means that even in case of even if a software component failurefails, the system architecture and design has an should have intrinsic protection for its to ensure safety and operationoperational integrity.

The previous generation of technology used relied on C/C++, pointers, and several modules sharing the same memory area, with direct access to hardware and to the operating system resources. These methods, necessary procedures vis-à-vis computers and languages available while necessary at the time. However, we consider these to be intrinsically unsafe., are considered intrinsically unsafe by today's standards.

New Generation x Previous Generation

The new generation of software uses utilizes computational environments , such as the .NET Framework, where processes are natively isolated between themselves from each other and the operating system, regardless of the programmer, allowing better use . This approach allows for better utilization of computers with multiple - processor cores and ensuring greater ensures higher operational stability, even in the face of potential drivers driver and hardware errors or failures on in individual system modules of the system. That This also applies to user scripting within applications.

Previous generations relied on in applications, previous generations used proprietary scripts or interpreted languages, such as JavaScript, VBScript, VBA, or proprietary expressions expression editors; the . The new generation relies on more leverages modern and , compiled languages such as like C# , and VB.NET, with exception offering control over exceptions, multi-threading, enhanced security and , object - orientation, and more better execution control.

With the interpreted languages, you cannot perform a complete Interpreted languages do not allow for full code validation during the development stages, development phases. Validation occurs only when execution passes by the code that the final verification is madeexecuted, which means meaning many problems issues are only possible to test when running the projectdiscovered only during project execution, not during the engineering technical configuration. A typical project may have hundreds to thousands of possible potential execution paths for the code, and the exhaustive testing scenarios cannot test of all those paths by exhaustively running all the possible cases. these paths is not feasible.

The ability to detect potential errors during the engineering and the ability to recover and isolate the errors during runtime are key elements critical for safety and operational stability, which are only possible by fully migrating the . This level of assurance is achievable only by migrating legacy interpreted scripts to the new newer compiled and managed languages.



Releases and Compatibility

High Availability

An important consideration

New releases and compatibility with previous applications

A very important question regarding high availability is how to manage the new release releases and system life-cycle management of the system.

In real-lifepractice, most of the systems require updates, corrections, and enhancements after its their initial deployment; one . One of the most common factors that put the jeopardize a system's availability under risk is exactly the change management. Even if the application itself was not changed; it will be necessary to install remains unchanged, installing new computers, updating operating systems changes , and applying software tool updates in some pointcan affect system stability.

When working at During the initial development of Tatsoft FactoryStudioour platform, we spent many months studying how to better manage that this issue , and how virtualized programming environments such as like .NET and Java could help to achieve that assist in achieving this goal. In the endUltimately, we found that when creating a system from ground up, discovered that starting from a clean design , you can embed architectural components to help to manage the future release.allows for embedding architectural components that facilitate future releases and updates, thus improving the management of system changes and maintaining high availability.

System Availability

The .NET platform has proven to be a highly effective execution framework due to several advantages, including support for About the platform, NET also showed a better platform over execution frameworks in this scenario, for a few reasons including the support of multiple programming languages, easier integration with Microsoft server and client components, richer faster and faster more advanced graphical tools, high productivity development platformand a highly productive development environment, among othersother benefits.

Leveraging the features of the .NET platform features, this article will explore three techniques used to ensure the maximum compatibility and system availability, even in case the event of new releases of .NET , or the application applications using deprecated classes or methods that are deprecated in the new platform releases. Those . These techniques are:

  • Application layer on top of Microsoft .NET Framework

  • Built-in Microsoft .NET compiler supporting multi-targeting

  • Leverage side-by-side execution 

Using consolidate consolidated technologies, such as SQL databasedatabases, to store your application programming and configuration also helps a lot to keep maintain backward compatibility when evolving as the product evolves. However, but in this article , we will focus on explaining the three items that are most connected with the techniques most relevant to new .NET versions and potential deprecated methods.



Application

layer

Layer on

top of Microsoft

.NET Framework

Independent Application Layer

The first design requirement is to make sure ensure that the Software Tool software tool used to create the application is created entirely in .NET Managed managed code. As an example case, For instance, our version 2014.1 of Tatsoft FactoryStudio was entirely fully developed in C# code, using .NET Framework 4.0. The first concept is involves using the software tool to create the final application projects, to expose exposing most of functionality not directly as a low-level platform call, calls but as an "Independent Application Layer." . Let us explore and understand this concept.

Except for the Scripts created by the user scripts that may include direct .NET calls — we will talk about user scripts in next section —, the calls—discussed in the next section—the remainder of the software tool functionality, as much as possible, does not expose the tool’s functionality is designed to avoid exposing .NET directly to the engineering user. Instead, presenting instead it presents a higher-level configuration tool.

Think about, for instance, Consider displays, drawings, and animations in our platform. Instead of making the requiring application engineers to go deep delve into .NET programming, it the platform provides a higher-level interface , where you can enable the for enabling dynamic properties using dialogues, the implementation through dialogues and internal deployment of those dynamic features internally in the system. Users do not have to interact interact with high-level drawing and animation tools rather than dealing with WPF, XAML, or .NET programming; they only use our high-level drawing and animation tools.

By thatThus, when an internal .NET Class class is changed, the software can keep maintain the same user configuration, settings but internally implement the feature using the new .NET classes. That is, for instance, what This approach allows us even to create a display drawing drawings that will run natively in on both Microsoft .NET WPF and in Apple iOS Cocoa.

Example

Let us use the example of the "Bevel Bitmap effect," , which as was deprecated in version 4.0. Let us assume , to illustrate this concept. Assume your application was using itthis effect.

According to this the concept, instead of rather than implementing the Bevel effect directly in user programming code, you would simply have a "Configuration checkbox to enable Bevel dynamic" available in your "DYNAMICS" interface, very similar to what we have as interface—similar to the "SHINE - Outer Glow effect." , so the The user would select that this animation to the for an object, and the implementation would be done handled internally by the software configuration tool.By removing that method

When the Bevel method is removed from the .NET Framework, the software package would replace the deprecated implementation by with another method or library to mimic that mimics the same visual effect to the user as much closely as possible, even though the internal implementation is completely different.deployment differs.

This approach ensures that the user experience remains consistent, despite changes in the underlying technology. The same The same similar concept applies to other potential issues. Having By having an abstraction layer between your project development and the platform allows to keep , you can maintain project compatibility and manage necessary changes internally. This makes it possible to handle the necessary changes to make keep the project configuration compatible to the with future .NET releases internally and transparently to the in a way that is transparent to application engineers. Anchor_GoBack_GoBack


Multi-Targeting

Code Generation and Compiling Classes

Another significant advantage of the

Built-in compiler supporting multi-targeting

Another huge advantage of .NET platform is its support for code generation and compiling classes, which allow you to embed allows embedding a full .NET compiler within a Project Configuration tool. It allows the package to have This capability provides complete control on how we will parse and compile the scripts created by the users, even electing over how the system parses and compiles user-created scripts, including the option to compile the code to another version for different versions of the Microsoft .NET Framework.

By default, the system will compile the application scripts to match the same .NET version used by the latest software tool is using, but those scripts run in , running them within their own AppDomain and we control the compiling, which means we can compile them, if necessary, to a previous . Additionally, this control allows the system to compile scripts to an earlier .NET Framework version if necessary.

Operating System Independency

With .NET 8, you can run the exact same code on Linux, macOS, and Windows computers. 

Example

Let us explore a case scenario: imagine that you have a system created in Microsoft .NET version 4.0, and you have need to migrate the system to a new .NET release 4.X. For this discussion, let us assume the application you created had scripts created using methods that were deprecated in the new updated .NET Framework. What now?

There are two solutions for thatthis:(

  • Solution A

)
  • — If the deprecated method was replaced by another

one
  • similar enough to be replaced automatically

replaced
  • , the Project Configuration tool may have

the
  • an Upgrade Utility to

automatically
  • locate those methods in the code and replace them with the new

one
  • ones automatically.

 
(
  • Solution B

)
  • — The project configuration tool can

enable the
  • allow users

the ability
  • to select the .NET TARGET of the project scripts.

The same way,
  • Just as Visual Studio can create DLLs

to
  • for .NET 2.0, 3.5, 4.0, or 4.5

,
  • based on

the
  • user selection, the embedded .NET compiler

inside
  • within the Project Development tool

,
  • can use similar features. Therefore, if necessary, we can enable your project to compile the scripts in both distinct .NET versions, even

if
  • when using the latest software configuration tool

, to allow compiling the scripts both to distinct .NET versions
  • , according to the user's selection of the TARGET.

In fact, it
  • It is possible to have the same project running side-by-side with some script

-
  • tasks under 4.0 and

some scripts tasks
  • others under 4.X, as we will see in the next section.


Leverage side

Side-by-

side execution 

Side Execution 

Multiple Versions

Finally, the .NET has a potential feature , which should that must be leveraged in a Project Development Platform design, which is to : it can run different versions of the same component at the same time, simultaneously or to have different multiple processes using different version versions of the .NET Framework running at the same time.FrameworX running concurrently.


Info
title.NET Framework

For more details,

take a look at this

check the Side-by-Side Execution in the .NET Framework article by Microsoft.


Using as , for example, the core components we included at in our platform's project management and user-interface services, the system different versions of the product can run at the same time, in concurrently on the same computer. Furthermore, when running one project, the many various modules, real-time database, scripts, and communication , components do not run in the same Windows processes; they are isolated in their own processprocesses, exchanging data by via a WCF (Windows Communication Foundation) connection.

The same way we have a Device communication, it creates to each protocol channel one Similarly, device communication creates a separate Windows Process (one .NET AppDomain) for each protocol, that which can also can apply to different user scripts in the project, one can be project—one compiled and running for .NET 4.0, and another one to for other releasereleases. Both processes run side-by-side, with no conflict, each one in its own domain, and both accessing the real-time tags on the server process.

32 and 64 bits

Another similar scenario is the feature that we have allows us to manage 32-bit and 64 bits -bit execution on within the same project configuration.

By default, when installed on 64-bit computers, a .NET application will leverage the operating system platform independently and it will run all its modules natively in true 64-bit mode , when installing installed on 64 bits operation -bit operating systems.

However, sometimes , you may need to force one a specific script, or a communication driver, or even the graphics graphical user Displays, displays to run in 32 bits; for -bit mode.

For instance, if you may be consuming are using an external code DLL or a graphical component from a third - party , which that only works in 32 bits mode. In order to accomplish that, we just provided in the system -bit mode, we provide a RunModule32.exe version to allow one that specific project component such as Scripts, Displays or Device communication to run that specific process in 32 bitscomponent—such as scripts, displays, or device communication—to run in a 32-bit process, while the rest of the application is running 64 bitsruns in 64-bit mode. The communication between those these processes uses WCF, ensuring the total complete isolation among the processes.


Conclusion

Reliable Application

Creating a reliable application which are that is manageable on throughout its life-cycle is of ultimate importance lifecycle is crucial and one of the top benefits of using .NET and, instead of to build new software tools from the ground up, rather than migrating previous code, creating new Software Tools from a ground-up, having . Designing a Project Configuration package that had its very first design with the goal to leverage the current of leveraging currently available technologies is essential.

Even though this new technology is availableDespite the advancements in technology, many systems still relies in rely on code ported from DOS , or using use Windows low-level APIs and previous versions that creates older versions, which can lead to the DLL-hell effect of Windows, where any update, any installation of another in Windows. This situation occurs when updates, installations of unrelated software, any change or changes in any part of the system , could can break it alleverything.

Using By utilizing the right features provided by the .NET Framework, SQL databases, and adding on top of that incorporating a well-designed "Independent Application Layer," , you can create systems that have maintain high compatibility with previous applications , but not denying the ability to keep truly evolving the feature set and the while continuing to evolve in terms of features and technology.


In this section...

Page Tree
root@parent
spacesV10