Dynamic Adaptation of a Math Service Using TRAP.NET Technical Report FIU-SCIS-2008-07-01 July 2008 Javier Ocasio Pérez, Pedro I. Rivera-Vega, Dept. of Electrical and Computer Engineering University of Puerto Rico Mayagüez Campus ocasio.javier@gmail.com, privera@uprm.edu S. Masoud Sadjadi, and Fernando Trigoso School of Computing and Information Sciences Florida International University sadjadi@cs.fiu.edu, perudise@gmail.com Abstract This technical report details a case study done for the TRAP.NET project (which stands for Transparent Reflective Aspect Programming in Microsoft’s .NET Framework). TRAP.NET provides dynamic adaptation for software programs written in .NET. 1. Introduction This work comes from the interest to use, test and take measurements of TRAP.NET with an appropriate application. It was identified that key applications that could tremendously benefit from TRAP.NET, are the ones that are a server side, since they need to be constantly running and available (to offer a service), and also ones which involve databases (large amount of date which need to be available at all time). For showing TRAP.NET capabilities, a simple Math service was designed which calculates the Cosine of a number, and that can be adapted to use several (more efficient) modifications of the algorithm, while the service is running. With these goals in mind two implementations of the Math Service were developed, one using .NET Remoting and a console client and another Web Service version using Windows Internet Information Services (IIS) and ASP.NET. Research Tasks Development of Math Service Prototype (Using .NET Remoting) The MathService prototype consists of the following solutions: 1- MathServer, which contains the TRAP.NET, TRAP.NET.ConsoleAddin, TRAP.NET.Generator, TRAP.NET.Composer and MathServer (Windows Application) projects 2- MathSource, which contains the MathSource Class Library project (Interface) 3-CosineClient, which contains the CosineClient Console Application project 4- MathDelegates, which contains the MathDelegates Class Library project How to use: