Easy Heading Macro | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
This page contains the article High Availability and .NET Framework
Introduction
One feature that remains unchanged in mission-critical and industrial applications is that operational stability, safety, and security are its principal requirements. The mechanisms related to increasing the guarantee of stability are among the core architectural changes made possible by new technologies, specifically in software. The advent of the Microsoft .NET Framework
broughtintroduced higher and unique features
to createfor creating high-availability systems.
.NET features
regarding, including productivity tools, development
helpaids, class libraries, and communication standards
with, play a crucial role in improving a Project Development Platform. However, this article
aims atfocuses on two important areas that
only.NET
was able to manage appropriately. Those aremanages particularly well:
- Creating
- Intrinsically Safe Software Architecture
- Managing
- Multiple Versions of Operating Systems, Software
- Tools, and
- Projects
Software Safety
Intrinsically Safe Software
In field instrumentation, security is not only guaranteed by internal procedures or manufacturers'
warrantywarranties but also
andprimarily by the system architecture,
usingwhich uses voltages and currents
whichthat are "intrinsically safe" in the environment
thatwhere the instrumentation will operate
, so. This ensures that even in
casethe event of
aspecific equipment failure, the system
isremains protected.
When we
startedbegan using the
expressionterm "intrinsically safe software,"
,we
gotreceived many questions about its meaning
forin the context of software. It
is onlyrefers to
applyapplying the same concepts we have in hardware to software systems. Specifically,
namely thateven
withif a software component
failurefails, the system architecture and design should have intrinsic protection
for itsto ensure safety and
operationoperational integrity.
The previous generation of technology
usedrelied on C/C++, pointers, and several modules sharing the same memory area, with direct access to hardware and
to theoperating system resources. These methods,
and necessary procedures vis-à-vis computers and languages availablewhile 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
usesutilizes computational environments
,such as the .NET Framework, where processes are natively isolated
between themselvesfrom 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
ensuringensures higher operational stability, even in the face of potential
driversdriver and hardware errors or failures
onin individual
modules of the system — thissystem modules. This also applies to user scripting
inwithin applications.
Previous generations
usedrelied on proprietary scripts or interpreted languages, such as JavaScript, VBScript, VBA, or proprietary
expressionsexpression editors
; the. The new generation
relies on moreleverages modern
and, compiled languages
such aslike C#
,and VB.NET,
withoffering control
of exceptionover exceptions, multi-threading, enhanced security,
andobject
-orientation, and
morebetter execution control.
You cannot performInterpreted languages do not allow for full code validation during
thedevelopment phases
with interpreted languages. The final validation is performed. Validation occurs only when the code is executed,
which means thatmeaning many
problemsissues are
testeddiscovered only during
theproject execution
of the project,
butnot during
thetechnical configuration. A typical project may have hundreds to thousands of
possiblepotential execution paths for the code, and
theexhaustive testing
scenarios cannot testof all these paths
by exhaustively running all possible casesis not feasible.
The ability to detect potential errors during
theengineering and
the abilityto recover and isolate
theerrors during runtime are
key elementscritical 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 newlynewer compiled and managed languages.
Releases and Compatibility
High Availability
An important
questionconsideration regarding high availability is how to manage
thenew
releasereleases and system life-cycle management.
In
real lifepractice, most systems require updates, corrections, and enhancements after their initial deployment
; one. One of the most common factors that
put thejeopardize a system's availability
at riskis
exactlychange management. Even if the application itself
did not change, it is necessary to installremains unchanged, installing new computers, updating operating systems
changes, and applying software tool updates
at some pointcan affect system stability.
When working onDuring the initial development of our platform, we spent many months studying how to better manage
thitthis issue
betterand how virtualized programming environments
such aslike .NET and Java could
help to achieveassist in achieving this goal.
In the endUltimately, we discovered that
when creating a system from the ground up,starting from a clean design
, you can embedallows for embedding architectural components
to help managing future releasesthat facilitate future releases and updates, thus improving the management of system changes and maintaining high availability.
System Availability
About the platform,The .NET
also showed a better platform over execution frameworks in this scenario for a few reasons, including the support ofplatform has proven to be a highly effective execution framework due to several advantages, including support for multiple programming languages, easier integration with Microsoft server and client components, faster and more
and fasteradvanced 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 maximum compatibility and system availability, even in
casethe event of new releases of .NET or
the applicationapplications using deprecated classes or methods
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 consolidated technologies, such as SQL
databasedatabases, to store
yourapplication programming and configuration also helps
to keepmaintain backward compatibility
when evolvingas the product evolves. However,
wethis article will focus on explaining the three
items connected most with thetechniques most relevant to new .NET versions and potential deprecated methods.
Application Layer on .NET Framework
Independent Application Layer
The first design requirement is to ensure that the
Software Toolsoftware tool used to create the application is entirely in .NET
Managedmanaged code. For
exampleinstance,
we fully developedour version 2014.1 was fully developed in C#
code,using .NET Framework 4.0. The
firstconcept
isinvolves using the software tool to create
thefinal application projects,
to exposeexposing most
of thefunctionality not
directlyas
alow-level platform
callcalls but as an "Independent Application Layer."
.Let us explore and understand this concept.
Except for
the Scripts created by theuser scripts that may include direct .NET
calls — we will talk about user scriptscalls—discussed in the next
section —, thesection—the remainder of the software
tool functionality, as much as possible, does not expose thetool’s functionality is designed to avoid exposing .NET directly to the engineering user. Instead,
presentingit presents a higher-level configuration tool
instead.
Think about, for instance,Consider displays, drawings, and animations in our platform. Instead of
making therequiring application engineers
go deepto delve into .NET programming,
itthe platform provides a higher-level interface
where you can enable thefor enabling dynamic properties
usingthrough dialogues and internal deployment of those
dynamicfeatures
internally in the system. Users
do not have to interactinteract 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.
Thus, when an internal .NET
Classclass is changed, the software can
keepmaintain the same user settings but internally implement the feature using the new .NET classes.
ItThis approach allows us to create
adisplay
drawingdrawings that
willrun natively
inon both Microsoft .NET WPF and Apple iOS Cocoa.
Example
Let us use the example of the "Bevel Bitmap effect," which was deprecated in version 4.0, to illustrate this concept. Assume your application was using
itthis effect.
According to
thisthe concept,
instead ofrather than implementing the Bevel effect directly in user programming code, you would have a "Configuration checkbox to enable Bevel dynamic" available in your "DYNAMICS"
interface — very similar to what we have asinterface—similar to the "SHINE - Outer Glow effect."
— so theThe user would select
thatthis animation
to thefor an object, and the implementation would be
donehandled internally by the software configuration tool.
By removing that methodWhen the Bevel method is removed from the .NET Framework, the software package would replace the deprecated implementation with another method or library
to mimicthat mimics the same visual effect
to the useras
muchclosely as possible,
eveneven though the internal deployment
is totally differentdiffers.
This approach ensures that the user experience remains consistent, despite changes in the underlying technology. The same
similarconcept applies to other potential issues.
HavingBy having an abstraction layer between your project development and the platform
allows, you
to keepcan maintain project compatibility and manage necessary changes internally. This makes it possible to
handlekeep the
necessary changes to make theproject configuration compatible with future .NET releases
internally and transparently to thein a way that is transparent to application engineers.
anchor
Multi-Targeting
Code Generation and Compiling Classes
Another
greatsignificant advantage of the .NET platform is its support for code generation and compiling classes, which
allow you to embedallows embedding a full .NET compiler within a Project Configuration tool.
It allows the package to haveThis capability provides complete control over how
we will parse and compile the scripts created by the users, even electingthe system parses and compiles user-created scripts, including the option to compile the code
to another versionfor different versions of the Microsoft .NET Framework.
By default, the system will compile
theapplication scripts to match the
same.NET version used by the latest software tool
is using but run them in, running them within their own AppDomain.
AlsoAdditionally,
wethis control
the compiling, which means we can compile them, if necessary, to a previousallows 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
haveneed to migrate the system to a new .NET release 4.X. For this discussion, let us assume the application you created had scripts
createdusing methods that were deprecated
in the updated .NET Framework. What now?
There are two solutions for
thatthis:
Solution A — If the deprecated method was replaced by another similar enough to be replaced automatically, the Project Configuration tool may have
an Upgrade Utility to locate those methods in the code and replace them with the new
ones automatically.
Solution B — The project configuration tool can
allow users to select the .NET TARGET of the project scripts.
Just as Visual Studio can create DLLs
for .NET 2.0, 3.5, 4.0, or 4.5
based on
user selection,
the embedded .NET compiler
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
when using the latest software configuration tool, according to the user's selection of the TARGET. It is possible to have the same project running side-by-side with some script tasks under 4.0 and
others under 4.X, as we will see in the next section.
Side-by-Side Execution
Multiple Versions
Finally, .NET has a potential feature that must be leveraged in a Project Development Platform design: it can run different versions of the same component simultaneously or have multiple processes using
adifferent
versionversions of the .NET
FrameworkFrameworX running concurrently.
Info | ||
---|---|---|
| ||
For more details, check the Side-by-Side Execution in the .NET Framework article by Microsoft. |
Using, for example, the core components
weincluded in our platform's project management and user-interface services,
the system'sdifferent versions of the product can run concurrently on the same computer. Furthermore, when running one project, the
manyvarious modules, real-time database, scripts, and communication
,components do not run in the same Windows processes; they are isolated in their
processown processes, exchanging data
byvia a WCF (Windows Communication Foundation) connection.
In the same way, we have aSimilarly, device communication
thatcreates
channel onea separate Windows Process (one .NET AppDomain) for each protocol
that, which can also apply to different user scripts in the
project — one can beproject—one compiled and running for .NET 4.0
;, and another
one tofor other releases. Both processes run side-by-side, with no conflict, each
onein its own domain, and both accessing
thereal-time tags on the server process.
32 and 64 bits
Another similar scenario is the feature that
we haveallows us to manage 32-bit and 64
bits-bit execution
onwithin the same project configuration.
By default, when installed on 64-bit computers, a .NET application will leverage the operating system platform
independentlyand run all its modules natively in
real64-bit mode when
installinginstalled on 64
bits-bit operating systems.
However, sometimes
,you
mustmay need to force
onea specific script,
acommunication driver, or even the
graphicsgraphical user
Displaysdisplays to run in 32
bits-bit mode.
For instance, if you
may be consumingare using an external code DLL or a graphical component from a third party
, whichthat only works in 32
bits mode. To accomplish that-bit mode, we
just providedprovide a RunModule32.exe
version to allow
that specific project
component suchcomponent—such as
Scriptsscripts,
Displaysdisplays, or
Device Communication todevice communication—to run in a
particular process in 32 bits32-bit process, while the rest of the application
is running 64 bitsruns in 64-bit mode. The communication between
thosethese processes uses WCF, ensuring
totalcomplete isolation among the processes.
Reliable Application
Creating a reliable application 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 creating new Software Tools to build new software tools from the ground up instead of , rather than migrating previous code, having . Designing a Project Configuration package that had its very first design with the goal to leverage the of leveraging currently available technologies is essential.
Even though this new technology is availableDespite the advancements in technology, many systems still rely on code ported from DOS or using use Windows low-level APIs and previous versions that create 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 incorporating a well-designed "Independent Application Layer," , you can create systems that have maintain high compatibility with previous applications but cannot deny the ability to keep evolving the feature set and the while continuing to evolve in terms of features and technology.
In this section...
Page Tree | ||||
---|---|---|---|---|
|