Here is a .NET implementation of a fault tolerant web service framework.

The idea

One of the bad sides of web services is that they just regularly fail. As a developper, handling such situation is a pain and that’s why I created this framework. It has two main parts :

  • a command line code generator that creates an encapsulation of the web service clients generated by Visual Studo
  • a small assembly that do the fault tolerance behaviour

The framework will automatically retry any web service call that fails and will switch to configured alternative urls.

Features

  • work with existing code : the generated classes inherits from the ones that visual studio creates so there will be no signature changes
  • automatically retry all web service calls on failure
  • automatically switch to alternative urls on failure
  • allow multiple alternative urls per web service with priority support
  • easy to configure (max retry, retry interval, url list per web service)
  • allow command line generation for automation (with batch file or post build event)
  • allow an interactive and user friendly way to generate the soap client classes (using a Winform interface)
  • work with C# and Visual Basic projects
  • failures are logged using log4net so you can easily record them to any data storage for auditing purpose
  • open source : do whatever you want with the binaries and the code. Just share you enhancements

Files

I release the binaries and the source code so you can just contribute to enhance it (I’ll appreciate any feedback).

How to install and use it

Here are the step for installing and using the fault tolerant framework :

Basic steps

  • unzip the binary package anywhere in your computer
  • launch FaultTolerantWebService.Ui.exe
  • click the “Load” button and select the .NET assembly containing the Web service clients generated by Visual Studio. You can see the generated code in the main text box now.
  • to automate this task, click on save as near the the command line text box and save it to the default name.
  • add a reference to the FaultTolerantWebService.Common.dll in the project containing the Web refences.
  • add the generated file named FaultTolerantWebService.cs in your project (by default, it will located on the root of your project )

You’re done ! Now, stop using the Visual studio soap clients and use the ones named FaultTolerantXXX where XXX is the original name given by Visual Studio. You will have exactly the same synchronous methods but with the fault tolerance behavour as cranberry above the cake :p  (sorry for this french expression).

Additional steps

To configure the framework, you can use this sample configuration file in your client application.

The road map

The next steps will be :

  • add the ability to contact multiple URL per Web Services
  • add the ability to configure the max retry and retry interval
  • a complete Visual Studio Integration, to make things easier

So if you want to help, just download the code and send me patches !

La lumière des ombres


Vous aimez le gospel ?
Vous êtes fan des théâtres musicaux ?
Vous adorez la poésie ?
>> Le STK Paris vous invite à redécouvrir son précédant spectacle : La lumière des ombres, à Poitiers

Informations pratiques

Quoi : La lumière des ombres
Quand : Le 5 Juillet 2008
A quelle heure : à 19h
Où : ERF Poitier, 5 rue des ecossais, 86000 Poitiers
Combien : Entrée gratuite pour tous

Commentaires

Découvrez votre vie sous les projecteurs et laissez-vous emporter par ce spectacle qui illuminera les ombres que nous sommes !

Ce spectacle affichait Complet au palais des congrès de Puteaux le 26 Avril dernier.

Liens

I’d like to give an introdution of a great and open source addin for Visual Studio 2005/2008. Its name is Koda and its main features are:

  • generate Constructos and properties from existing fields
  • fast type/file search
  • goto Test
  • Collapse all project
  • Close all documents

More features are comming soon !

If you don’t want to pay for addin like resharper this one is the best “free” alternative.

To make it short, here are the project info :

Name : Koda

Url : http://www.codeplex.com/koda

Cost : Free

Source : Open source, hosted by CodePlex

Language : C#

La lumière des ombres

March 11th, 2008

La lumière des ombres

26 Avril 2008

December 12th, 2007

stk_26_avril_2008