• Aucun résultat trouvé

Fault Tolerance by Exception Handling

N/A
N/A
Protected

Academic year: 2022

Partager "Fault Tolerance by Exception Handling"

Copied!
15
0
0

Texte intégral

(1)

Proceedings Chapter

Reference

"Using Exception Handling for Fault-Tolerance in Mobile Coordination-Based Environments", Exception Handling in Object Oriented Systems: towards Emerging Application Areas and New

Programming Paradigms

DI MARZO SERUGENDO, Giovanna, ROMANOVSKY, Alexander

Abstract

Exception handling continues to be a challenging problem in object oriented system development. One reason for this is that today's software systems are getting increasingly more complex. Moreover, exception handling is needed in a wide range of emerging application areas, sometimes requiring domain-specific models for handling exceptions.

Moreover, new programming paradigms such as pervasive computing, service oriented computing, grid, ambient and mobile computing, web add new dimensions to the existing challenges in this area. The integration of exception handling mechanisms in a design needs to be based on well-founded principles and formal models to deal with the complexities of such systems and to ensure robust and reliable operation. It needs to be pursued at the very start of a design with a clear understanding of the ensuing implications at all stages, ranging from design specification, implementation, operation, maintenance, and evolution. This workshop was structured around the presentation and discussion of the various research issues in this regard to develop a common understanding of the current and future [...]

DI MARZO SERUGENDO, Giovanna, ROMANOVSKY, Alexander. "Using Exception Handling for Fault-Tolerance in Mobile Coordination-Based Environments", Exception Handling in Object Oriented Systems: towards Emerging Application Areas and New Programming Paradigms. In:

Buschmann, F. & Buchmann, A.-P. & Cilia, M.-A. Object-Oriented Technology - ECOOP 2003 Workshop Reader. Final Reports. Berlin : Springer, 2004. p. 1-10

DOI : 10.1007/978-3-540-25934-3_1

Available at:

http://archive-ouverte.unige.ch/unige:48377

Disclaimer: layout of this document may differ from the published version.

(2)

Using Exception Handling for Fault-Tolerance in

Mobile Coordination-Based Environments

University of Newcastle upon Tyne UK

University of Geneva Switzerland

Alexander Romanovsky Giovanna Di Marzo Serugendo

(3)

Content

1. Introduction

2. Motivations and Requirements 3. Solutions

4. Working Example 5. Future Work

(4)

Introduction:

Fault Tolerance by Exception Handling

• Fault tolerance: error detection and error recovery

• Types of faults: process (agent) mistakes, environmental faults, mismatches, online upgrades/changes of the

environment or in other mobile processes, application

developers’ mistakes, users’ mistakes, malicious faults and all types of errors propagated from the underlying levels (OS,

middleware, hardware) when they fail to deliver the required services

• This requires much more than software tolerance of hardware faults (ACID transactions, replications, atomic broadcasts,

etc.)

(5)

Introduction:

Fault Tolerance by Exception Handling

• We need software fault tolerance at the application level

• Forward error recovery (no rollback/backward error recovery)

• Exception handling as a means

• Separation of the normal and abnormal behaviour: separation of the code and of the flows of control

(6)

Introduction:

Exception Handling Techniques

• Choice of exception handling techniques depends on many things such as the design paradigm, application types,

computational models, types of faults, the environment, etc.

• The challenge is to develop novel exception handling techniques suitable for mobile systems based on the coordination paradigm

• Definitely not Java or RMI Java exception handling

• Definitely not conventional OO exception handling

(7)

Motivations and Requirements:

Specific Characteristics and their Effects

• Processes are mobile. Very special exception handling

techniques suitable for mobile systems: processes can leave the location and move to another location, the execution

environment and the resources available can change on the fly

• Asynchronous communication. Decoupling producers and consumers, anonymous communication. Examples: event- based and data-driven systems, a la Linda (e.g. MARS, Lime, Lana)

• What if the process producing an erroneous data (event, tuple) moves? Or, if it becomes involved in other

computations or completes its execution before an exception is signalled by the consumer of data?

(8)

Motivations and Requirements:

Specific Characteristics and their Effects

• Exceptions cannot be treated as the normal events or tuples (Lana)

– No separation of normal and abnormal behaviour – No guarantees that each exception is handled – No clear how to involve the producer cleanly

– No special support for exception handling (error-prone)

• Similar problems with the standard notification mechanism

– Its use is not compulsory

– its use is intermixed with the normal code of the event producer (error prone)

– …

(9)

Motivations and Requirements:

General Requirements

• In spite of asynchronous communication all exceptions have to be caught and handled. Two possible solutions:

– Chase the producer of the event causing the exception

– Create a local handler process but only when an process signals an exception

• Choose dynamically whom to inform (flexibility)

• Inform several processes about exceptions (flexibility)

• Scopes (i.e. the exception handling contexts) should include all the processes to be involved in handling, for example, all processes (possibly) contaminated by the error:

– Defined as all processes in a particular location

– Dynamically defined by mutual agreements among a number of cooperating processes

– Use knowledge-management to define it (cf M.Klein’s work)

(10)

Specialised process H(E) is locally created when an exception E is signalled by the EventConsumer

Solutions

EventProducer is not involved, handling is decoupled from it H(E) always exists - handling is guaranteed

The handler process is created only when an exception is

(11)

H(E) is usually designed by the developer of EventProducer Alternatively EventConsumer can provide a handler Hc(E), in

which case it overrides the initial one

Each tuple T has a number of exceptions declared in its signature in addition to a set of parameters

We are working on adding flexibility by:

allowing several handlers

allowing dynamic association of handlers with the tuple

allowing any existing process to join handling

allowing EventConsumer to move

Solutions

(12)

Market place. The buyer and the seller processes

The seller inserts the selling request into the local tuple

space. The buyer finds it and proposes a contract, which can be accepted by the seller. After that the payment

starts, it is executed by transferring money from the buyer- purse ot the seller e-purse

Working Example

(13)

The Buyer asks its E-Purse to release the money

The Buyer provides a name of the handler (Handler1)

The E-Purse signals an exception because there is not enough money Handler1 accesses the buyer’s bank account to transfer money to

the e-purse

Working Example

(14)

In Lana:

the interacting processes have to wait until all notifications have been received (this essentially undermines the asynchrony which the model promotes)

Processes can freely move without waiting for all notifications

All exception handling code is intermixed with the normal

behaviour (which error prone, not flexible - we can use different handlers for the same exceptions - e.g. in different locations)

Working Example

(15)

Implementation and experiments

Cooperative handling by several mobile processes Exception handling context

Nesting of contexts

Future work

Références

Documents relatifs

If the transaction aborts due to an exception being thrown in the atomic block via leave (see line 8), partial changes are rolled back by the underlying STM and execution continues

L’archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des

L’archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des

When the user selects a specific Exception Scenario (i.e. an Error, a Cause and a Solution) to solve a problem, it is fed back to the database as a sample of the user

Our solution is original in that it combines the fol- lowing features : handling of request / response interactions between agents, handling of agent replicas, encapsulation

For each project of the dataset and its associated test suite, it gives the number of executed catch blocks during the test suite execution, purely resilient try-catch blocks,

The specificity criteria implies an eligible handler is more spe- cific than another (in any handler clause) if: 1) both handle the same exception and the former applies

(Note that the value of distinguishing N O T I F Y exceptions is that if an operation is guaranteed to be resumed after an exception is handled, the imple- mentor