• No results found

Thin Client

In document Ph.D. Thesis Page 108 (Page 43-71)

TOLERANCE MODEL

5.13.1 Thin Client

The thin client system is a system or a program which work behalf of other computer as its server to fulfill its traditional computational roles ( Vlissidis and Hickey, 2010 ). In thin client environment, all system may not have all devices but use all devices centrally. Here we introduce the thin client with fault tolerance environment. Thin client performance is proposed to improve by enabled it with latest SFT techniques, models and hardware fault tolerance ( Francalanza and Hennessy, 2007 ). It provides functioning of thin client environment under faulty environment with high reliability. Given approach work on satisfied requirement.

Ph.D. Thesis Page 150 Figure 5. 11: Thin Client Environments with H/W and Design Diversy

The protection in environment diversity approach is focus on many basic care taking fundaments from computer technology. As Examples includes the basic operation of restarting and rebooting the expected node. The problem which is not handling by the particular node that problem will use alternative resource for generated instruments or hardware failures ( Stoianovici et al. 1998 ). If any resource from another component is missing or inactive for the particular component which is in executing mode, the most suitable approach is to use alternative resource. As a thin client works with minimal resources, so we can accommodate alternate h / w system. It would be easier for the thin client system to fit it with H/W Fault tolerance.

The approach for managing, handling and securing the errors for any specific part of software, mistake occurred at particular part of software or diversion of execution is discussed in the reference of above example. In the thin client, server is the most loaded nodes. There are certain situation in thin client where any node or client is facing the problems of software which expect an answer and the node or client is not able to answer due to certain factors. The divert execution of the software from one to another will not make such situation and it will keep your client node to continue

Ph.D. Thesis Page 151 for providing services. In associated approach, the solution as part of software alternative as code multiplication with same objective is very useful. The dealing of inputs and with multiple copy of piece of information will cause assure for output.

The SFT technique RcB is work on the bases of using various acceptance tests. When execution started first it check the primary execution , if it is according to the requirements or meet the satisfactory level then ok otherwise go to another alternative. The RcB gives us many alternatives up to few extend. When we have many nodes that all are managing by many system, it’s difficult to provide RcB for them in various ways. But in Thin client every system handle by Sever, so we can give strong reliability in reference to cope up with faults. The scenario will change on condition to assign another part of code section to the system.

With the existence of various software pieces in NVP, the execution has some traditional ways. It starts with initial version of the system or first pieces of code to be executed first which is associated with the server. Whenever fault will take place, the execution will move to the alternate portion of code, module, system component or next version to solve the problem. The application which is loaded to the client from the server, such application paced in different version. If first version of said application is not responding on requirements then it passes to another version and execution may completed accurately. The faults are managed and execution done as it required is confirmed from unavailable of occurred faults. As we already said in thin clients, most of the work loaded server node. Again it’s difficult to provide many copies of many system form many nodes but Thin Client can easily adopt the NVP to deal with faults. The N-version will work to give satisfied answer and results to the clients in thin client environment.

5. 13. 2 Surgical Robots

To supports advance technology in surgical mechanism, many surgical robotic devices are popular in current trends. These devices are having variety range of functions in their own nature of performing variety of tasks. As an example of such device as a surgeon’s right choice as third hand for accessing during the operation to move the camera is robotic device ( Kumar et al. , 1999 ). Some others devices are there to support telesurgery, tele-monitoring and many more. The revelation

Ph.D. Thesis Page 152 systems onto a multi-purpose workbench-like platform ( Lanfranco et al. , 2004 and Taylor et al. , 1999 )

The surgical robotic system is assisted by fault tolerance environment. Surgical robotic system’s performance is proposed to improve by latest SFT techniques, models and hardware fault tolerance. To functioning surgical robotic system more accurately under faulty environment with high reliability SFT models and techniques will help a lot.

Figure 5. 12: Robotic surgery with H/W and Design diversy

In the absent of services which is provided from the outer or inside and not reacting properly, the option of carry out work in another way by alternative equipment. The approach which present the flow of execution to manage bugs, errors, suspicious code in better way buy handling the problems in one of the piece code. The working activation during the robotic surgery is highly important phase to deal with situation.

When such situation faces any software or hardware problems which could not able resolve, it is the most dangerous phase as it deepens on life critical application. In such role, system must continue to provide service, system must respond in the area of faulty environment from preventing big loss of system. Such loss of system, system data, resource, and series of services can be affected by software errors,

Ph.D. Thesis Page 153 faults and problems. The most suitable way of dealing with such problems are diverting the flow of execution from one to another model. The divert execution of the executable software will not cause system failure when any robotic surgery system facing s/w problem to answer the client node in any way. Instead of single code execution, here some piece of information enabled in code cover can deal with desired inputs and make confirm that the results is as per required output.

The doctors and surgeons can have take advantages of Robotic surgery. It is an important helping hand to them for performing their tasks and administering surgical operations in better way. The quality of surgical system which is implemented with fault tolerant protocol can extensively improve the performance and accuracy of surgeons’ support. The important factor in reference of using SFT robotic system or SFT surgical system is proper evaluation planning and deployment planning.

Software and hardware fault tolerance technique are focused to improve the conventional techniques. It not only improves the conventional techniques but also focuses on a new approach to solve the issues of Robotic surgery system to enhance the reliability. The concluding phrase can be presents as the system associated with all application in reference to the SFT techniques is relatively new, effective, work worthy, powerful, time saver, accurate result supported to the era of Robotic surgery. The SFT Techniques as RcB and N-version which is working very powerful and appropriate at many of the solution providing situation. The System and application for Robotic surgery, the proposed concept is one of most adaptable elucidation for managing various types of faults. Robotic surgery system having the effect from proposed approach create and can increase strong steadfastness and performance.

Ph.D. Thesis Page 154 5.14 RESULT & DISCUSSION OF SIMULATED BI-VER TECHNIQUE FOR SFT

The new simulated BIVER technique is introduces to handle the faults occurred at execution time. This is based on the combination of single and multi version techniques. It excludes the single version problems which knot for the restricted piece of code. It elaborates the benefit of multi version technique by focusing various piece of code to protect various type of fault along with keep in flexible redundancy of code.

A classical n-version technique which is twisted n-version program or n-version of code for the same part of system to protect it from failure. This technique is not appropriate when large system is tolerated.

The multiple copy of same code will increase the cost and programming efforts. We enlighten atomicity of program actions and decision verification with the use of fix version of program redundancy. The proposed technique will manage different levels of software by providing various versions with the introduction of an individual code.

This code can fix one version of the n-version system.

The said technique is implemented by;

1. Fault. Tolerance. Smart Handling : This project is windows app which works for demo.

2. Fault. Tolerance. Sorting. Lib : This project is business library and contains the actual code which take cares of faults and continues to give result without failing.

Three main classes Fault Handler. cs, Fault Tolerance Exception. cs and Sorting Helper. cs are coded to execute the simulated technique.

3. Fault. Tolerance. Advance Versioning. Test: This project contains the actual test cases which run these test cases too for demo. One of most used VSTT ( Visual Studio Tools for Testing ) from Microsoft as it is integrated with Visual Studio and it provides easy way to create the unit test cases, functional test cases. VSTT has all the testing capabilities such as DB testing, web testing; load testing, UI testing, automation and build testing.

Ph.D. Thesis Page 155 {

public frm Fault Tolerance( ) {

Initialize Component( );

}

private void Form1 _ Load( object sender, Event Args e ) {

}

private void btnSort _ Click( object sender, Event Args e ) {

RefreshScreen( );

int totalInputs = Count Inputs( );

Object[] data To BeSorted = new object[total Inputs];

Assign Inputs( data To Be Sorted );

string dataType = string _ Empty;

Ph.D. Thesis Page 156 dataType, chk Enable Fault Handling _ Checked );

SetOutputValue( sortedData );

Ph.D. Thesis Page 157 {

Data To Be Sorted[1] = txtInput2 _ Text;

}

if ( txtInput3 _ Text _ Trim( ) != "" ) {

dataToBeSorted[2] = txtInput3 _ Text;

}

if ( txtInput4 _ Text _ Trim( ) != "" ) {

dataToBeSorted[3] = txtInput4 _ Text;

}

if ( txtInput5 _ Text _ Trim( ) != "" ) {

dataToBeSorted[4] = txtInput5 _ Text;

} }

private int CountInputs( ) {

int totalInputs = 0;

if ( txtInput1 _ Text _ Trim( ) != "" ) {

totalInputs++;

}

if ( txtInput2 _ Text _ Trim( ) != "" ) {

totalInputs++;

}

Ph.D. Thesis Page 158 if ( txtInput3 _ Text _ Trim( ) != "" )

{

totalInputs++;

}

if ( txtInput4 _ Text _ Trim( ) != "" ) {

totalInputs++;

}

if ( txtInput5 _ Text _ Trim( ) != "" ) {

totalInputs++;

}

return totalInputs;

}

private void SetOutputValue( object[] sortedData ) {

if ( sortedData != null ) {

if ( sortedData[0] != null )

txtOutput1 _ Text = sortedData[0] _ ToString( );

if ( sortedData[1] != null )

txtOutput2 _ Text = sortedData[1] _ ToString( );

if ( sortedData[2] != null )

txtOutput3 _ Text = sortedData[2] _ ToString( );

Ph.D. Thesis Page 159 if ( sortedData[3] != null )

txtOutput4 _ Text = sortedData[3] _ ToString( );

if ( sortedData[4] != null )

txtOutput5 _ Text = sortedData[4] _ ToString( );

} }

private void RefreshScreen( ) {

lblErrorDisplay _ Visible = false;

txtOutput1 _ Text = "";

txtOutput2 _ Text = "";

txtOutput3 _ Text = "";

txtOutput4 _ Text = "";

txtOutput5 _ Text = "";

}

private void ClearData _ Click( send obj, e as argunments of Event ) {

txtInput _ parameter1 _ Text="";

txtInput _ parameter12 _ Text="";

txtInput _ parameter13 _ Text="";

txtInput _ parameter14 _ Text="";

txtInput _ parameter15 _ Text="";

RefreshScreen( );

} } }

Ph.D. Thesis Page 160

Ph.D. Thesis Page 161 }

} }

<?xml version="1 _ 0" encoding="utf-8"?>

<Project ToolsVersion="4 _ 0" DefaultTargets="Build" xmlns="http: / / schemas _ microsoft _ com/developer/msbuild/2003">

<Group of Property Define>

<Configuration Condition=" '$( Configuration )' == '' ">Debug</Configuration>

<Platform Condition=" '$( Platform )' == '' ">AnyCPU</Platform>

<ProductVersion>

</ProductVersion>

<SchemaVersion>2 _ 0</SchemaVersion>

<ProjectGuid>{BAC0704E-9F18-4680-A857-9049504B9EA7}</ProjectGuid>

<OutputType>Library</OutputType>

<AppDesignerFolder>Properties</AppDesignerFolder>

Ph.D. Thesis Page 162 <RootNamespace>Fault _ Tolerance _ SmartHandling _ Test</RootNamespace>

<Name of AssemblUsed>Fault _ _ Tolerance _ _ Smart _ Handling _ _ Test </

<Debug group presentative of Property Symbols>true</Debug group presentative of Property Symbols>

<Debug number Type>full</Debug number Type>

<Optimize parameter>false</Optimize parameter >

< parameter OutputPath>bin \ Debug \ </ parameter OutputPath>

<Define parameter Constants>DEBUG;TRACE</Define parameter Constants>

<Error bug Report desc >prompt</ Error bug Report desc >

<Warning _ Greeb _ Level Dis>4</ Warning _ Greeb _ Level Dis >

</PropertyGroup>

<PropertyGroup Condition=" '$( Configuration )|$( Platform )' == 'Release|AnyCPU'

">

<DebugType>pdbonly</DebugType>

<Optimize>true</Optimize>

<OutputPath>bin \ Release \ </OutputPath>

<DefineConstants>TRACE</DefineConstants>

<ErrorReport>prompt</ErrorReport>

<WarningLevel>4</WarningLevel>

</ Group of Property Define >

<Item Group of Property Define g >

Ph.D. Thesis Page 163 <Reference Include="Microsoft _ Visual tool Studio _ For Quality Tools N Unit Test Framework, Version=10 _ 0 _ 0 _ 0, Culture = neutral, Public KeyT oken = b03f5fu7f11d35i50a3a, processor Architecture = MSIL" />

<Reference Include="System ( namespace )" />

<Reference Include="System _ Core ( namespace )">

<Required _ Target _ Framework > 3 _ 5 < / Required _ Target _ Framework >

<Visible ojbect >False</ Visible object>

</ Code of Analysis _ for Dependent on _ Assembly _ ( location ) Paths>

</ Item Group f >

< Item Group e >

< Include Compile ( file ) ="FaultToleranceTest _ cs" />

< Include Compile I ( file ) ="Properties \ AssemblyInfo _ cs" />

<Name>Fault _ Tolerance _ Sorting _ Lib</Name>

</ProjectReference>

Ph.D. Thesis Page 164 <Name of Target= "Beforeapp Build">

< _ / Target _ >

< Name of Target = "Afterapp Build">

< _ /Target _ >

-->

( Include ) using ( namespace ) System ; ( Include )using ( namespace ) System _ Text ;

( Include ) using ( namespace ) System _ Collections _ Generic ; ( Include ) using ( namespace ) System _ Linq ;

( Include ) using ( namespace ) Microsoft _ Visual Studio _ Test Tools _ Unit Testing ;

( Include ) using ( namespace ) Fault _ Tolerance _ Sorting _ Lib ;

namespace Fault _ Tolerance _ SmartHandling _ Test {

[class creation about the Test Class]

public class FaultToleranceTest {

[method creation about the TestMethod]

public void SortInteger( ) {

object[] testData = new object[5] { 10, 3, 42, 24, 21 };

object[] expectedData = new object[5] { 3, 10, 21, 24, 42 };

SortingHelper sorting = new SortingHelper( );

object[] actualData = sorting _ SortData( testData, "int" );

Assert _ IsTrue( TestHelper _ CompareData( actualData, expectedData ) );

}

[TestMethod]

public void SortDouble( ) {

object[] testData = new object[5] { 10 _ 2, 3 _ 1, 42 _ 0, 42 _ 1, 21 _ 7 };

Ph.D. Thesis Page 165

Ph.D. Thesis Page 166 object[] actualData = sorting _ SortData( testData, "double" );

Assert _ IsTrue( TestHelper _ CompareData( actualData, expectedData ) );

} } }

( Include )using ( namespace ) System ;

( Include )using ( namespace ) System _ Collections _ Generic ; ( Include )using ( namespace ) System _ Linq ;

( Include )using ( namespace ) System _ Text ;

namespace Fault _ Tolerance _ SmartHandling _ Test {

class TestHelper {

public static bool CompareData( object[] actualData, object[] expectedData ) {

bool isSame = true;

if( actualData _ Length != expectedData _ Length ) return false;

for( int i=0; i< expectedData _ Length;i++ ) {

if ( actualData[i] _ ToString( ) != expectedData[i] _ ToString( ) ) return false;

}

return true;

} } }

( Include ) using ( namespace ) System ;

( Include ) using ( namespace ) System _ Collections _ Generic ;

Ph.D. Thesis Page 167 ( Include ) using ( namespace ) System _ Linq ;

( Include ) using ( namespace ) System _ Text ;

namespace Fault _ Tolerance _ Sorting _ Lib {

public class FaultHandler {

FaultToleranceException _ faultException = null;

public FaultHandler( FaultToleranceException faultException ) {

this _ _ faultException = faultException;

}

public object[] HandleFault( ) {

object[] sortedData = new Object[ _ faultException _ DataToBeSorted _ Length];

string dataTypeForSorting = GetDataTypeForSorting( _ faultException _ DataType );

switch ( dataTypeForSorting _ ToLower( ) ) {

case "double":

SortDoubles sortDouble = new SortDoubles( );

sortedData = sortDouble _ SortData( _ faultException _ DataToBeSorted );

break;

case "string":

string[] data = new string[ _ faultException _ DataToBeSorted _ Length];

for( int i=0; i< _ faultException _ DataToBeSorted _ Length; i++ ) {

Ph.D. Thesis Page 168

private string GetDataTypeForSorting( string dataType ) {

Ph.D. Thesis Page 169 ( Include ) using ( namespace ) System ;

( Include ) using ( namespace ) System _ Collections _ Generic ; ( Include ) using ( namespace ) System _ Linq ;

( Include ) using ( namespace ) System _ Text ;

namespace Fault _ Tolerance _ Sorting _ Lib {

// This class is used to generate the Fault exception public class FaultToleranceException : Exception {

public object[] DataToBeSorted { get; set; } public string DataType { get; set; }

public FaultToleranceException( object[] dataToBeSorted, string dataType, string message ) : base( message )

{

this _ DataToBeSorted = dataToBeSorted;

this _ DataType = dataType;

} } }

( Include ) using ( namespace ) System ;

( Include ) using ( namespace ) System _ Collections _ Generic ; ( Include ) using ( namespace ) System _ Linq ;

( Include ) using ( namespace ) System _ Text ;

namespace Fault _ Tolerance _ Sorting _ Lib {

class SortInteger {

public object[] SortData( object[] data ) {

int num;

Ph.D. Thesis Page 170 int[] dataToBeSorted = new int[data _ Length];

//Throw custom fault exception if the data is not of type int for ( int i = 0; i < data _ Length; i++ )

{

if ( !Int32 _ TryParse( data[i] _ ToString( ), out num ) )

throw new FaultToleranceException( data, "int", "Not a valid data for Int" );

dataToBeSorted[i] = num;

}

// Sorting integer data

Array _ Sort( dataToBeSorted );

// Converting int array to object array to make it generic

object[] sortedData = dataToBeSorted _ Select( x => ( object )x ) _ ToArray( );

return sortedData;

} } }

( Include ) using ( namespace ) System ;

( Include ) using ( namespace ) System _ Collections _ Generic ; ( Include ) using ( namespace ) System _ Linq ;

( Include ) using ( namespace ) System _ Text ;

namespace Fault _ Tolerance _ Sorting _ Lib {

class SortString {

public object[] SortData( object[] data ) {

try {

Ph.D. Thesis Page 171

Ph.D. Thesis Page 172

Ph.D. Thesis Page 173

Ph.D. Thesis Page 174

Ph.D. Thesis Page 175

Ph.D. Thesis Page 176 / /

/ / frmFaultTolerance / /

this _ AutoScaleDimensions = new System _ Drawing _ SizeF( 6F, 13F );

this _ AutoScaleMode = System _ Windows _ Forms _ AutoScaleMode _ Font;

this _ BackColor = System _ Drawing _ Color _ LemonChiffon;

this _ ClientSize = new System _ Drawing _ Size( 794, 268 );

this _ Controls _ Add( this _ btnClearData );

this _ Controls _ Add( this _ lblErrorDisplay );

this _ Controls _ Add( this _ grpOutput );

this _ Controls _ Add( this _ btnSort );

this _ Controls _ Add( this _ grpInput );

this _ Name = "frmFaultTolerance";

this _ Text = "Smart Fault Handling";

this _ Load += new System _ EventHandler( this _ Form1 _ Load );

this _ grpInput _ Resume Layout( false );

this _ grpInput _ PerformLayout( );

this _ groupBox1 _ Resume Layout( false );

this _ groupBox1 _ PerformLayout( );

this _ grpDataType _ Resume Layout( false );

this _ grpDataType _ PerformLayout( );

this _ grpOutput _ Resume Layout( false );

this _ grpOutput _ PerformLayout( );

this _ Resume Layout( false );

this _ Perform Layout( );

} } }

Ph.D. Thesis Page 177

 The proposed ways to ensure and make BI-VER more reliable as,

 independence through version independence

 Use diverse people to develop the different versions

 Use different development processes to develop the different versions

 Use different technology, tools, programming languages, methodologies , etc _ to develop the different versions

 Fix number of version will save cost and programming efforts

 Fix number of version use for getting required results

 Fix number and restarting the same version will reduce the code _

 It will manage redundancy from requirements specification to interface implementation _

 Dealing with uncharacteristic situation arising in the environment

 Enable program in such manner so that system design faults must be tolerated

 Provide an error-detection and recovery facility

In document Ph.D. Thesis Page 108 (Page 43-71)

Related documents