You are viewing a javascript disabled version of the site. Please enable Javascript for this site to function properly.
Go to headerGo to navigationGo to searchGo to contentsGo to footer
In content section. Select this link to jump to navigation

Context-aware application development by means of runtime aspect weaving

On June 1st, 2015, Jose Manuel Felix defended his PhD thesis on efficient runtime adaptation of context-aware systems by means of dynamic aspect weaving, at the University of Oviedo [1]. He presented his dissertation in a publicly open presentation held in the School of Computer Engineering (Fig. 1). After commenting on every question raised by the assessing committee, he was awarded the highest grade (cum laude).

The thesis was supervised by Dr. Francisco Ortin. The PhD dissertation committee was composed of Professor Lidia Fuentes (University of Malaga), Dr. Jose Baltasar Garcia Perez-Schofield (University of Vigo), and Professor Juan Manuel Cueva (University of Oviedo).

The research work was funded by the Spanish Ministry of Science and Innovation (project TIN2011-25978), the European Union – through the European Regional Development Funds (ERDF) – and the Principality of Asturias – through its Science, Technology and Innovation Plan, grant GRUPIN14-100.

The main publications associated with this PhD thesis are [25]. The full text of the thesis is available on the Publication Open Repository of the University of Oviedo [1]. The source code of the platform developed, together with the context-aware example applications, and all the benchmarks used in the evaluation of the platform are also available for download.1

Fig. 1.

PhD dissertation defense.

PhD dissertation defense.

1.Thesis summary

The thesis discusses the use of dynamic aspect weaving to support the development of context-aware applications. Context-aware systems must be capable of adapting themselves to their execution environments. Since dynamic aspect weaving allows the dynamic adaptation of running applications, offering a high level of runtime adaptability, the thesis analyzes the suitability of dynamic aspect weaving to fulfill the dynamism requirements of context-aware applications.

Aspect-Oriented Programming (AOP) is a programming paradigm aimed at increasing the modularity of applications by allowing the separation of cross-cutting concerns [3]. An aspect weaver takes the different concerns of an application and generates the target program.

Usually, aspect weaving is performed statically, before application execution, or when classes are about to be loaded into memory. There are also AOP tools that allow aspect (un)weaving at runtime. However, these tools have important limitations such as a lower runtime performance and a smaller set of execution points (join points) to adapt runtime applications [5].

The first contribution of this thesis is the design and implementation of a dynamic aspect weaver for the .Net platform called DSAW [4]. DSAW provides an efficient way to adapt running applications at the virtual machine level: any programming language for the .Net platform can be used and the application source code is not necessary.

The second contribution is the development of three context-aware applications that, using DSAW, are capable of adapting to runtime emerging requirements:

  • Mobile networks. A distributed system made up by mobile devices, where network topologies and communication channels can dynamically change. If the user is connected to a distributed system and it is detected that the communication channel is not secure any more, encryption of transmissions occurs. An encrypting aspect is dynamically woven, forwarding the channel to another secure one. If the mobile device returns to a trusted environment, the encryption aspect is unwoven to avoid the unnecessary overhead of encryption.

  • FTP. An existing client/server FTP application was modified to allow encryption of the messages exchanged. When an event occurs in the runtime environment, the FTP communication is changed to another one that encrypts the messages. Therefore, the protocol may be changed, and even customized, by a distributed shared aspect known by the client and the server.

  • HotDraw. The well-know 2D drawing editor was adapted to make it runtime adaptable. Figures were modeled as components, and their representation (visual and textual), logging and profiling services were implemented as aspects.

The last main contribution is a collection of optimization techniques that make DSAW outperform the rest of dynamic weaver [2]. We measured execution time of the three applications developed, comparing DSAW with the JAsCo, PROSE and JBoss AOP dynamic aspect weavers. As shown in Fig. 2, DSAW is the platform that provides better runtime performance for the three applications. On average, DSAW is 15%, 34% and 199% faster than JAsCo, JBoss AOP and PROSE.

Fig. 2.

Execution times relative to DSAW.

Execution times relative to DSAW.
Fig. 3.

Performance penalty of dynamic aspect weaving.

Performance penalty of dynamic aspect weaving.

We also measured the performance penalties incurred by the aspect weavers (Fig. 3). These values are the execution time of each the aspect-oriented application divided by its object-oriented version. DSAW is the platform with the lowest penalty (14.3%). The performance cost incurred by the runtime weavers of JAsCo, JBoss AOP and PROSE are, respectively, 32.2%, 32.3% and 252%.



[[1]] J.M. Felix, A software development platform with both dynamic and static aspect weaving, PhD Dissertation, University of Oviedo, 2015,


[[2]] J.M. Felix and F. Ortin, Software development platform with both dynamic and static aspect weaving, IEEE Latin America Transactions 13 (2015), 1534–1541.


[[3]] J.M. Felix and F. Ortin, Aspect-oriented programming to improve modularity of object-oriented applications, Journal of Software 9 (2014), 2454–2460.


[[4]] F. Ortin, L. Vinuesa and J.M. Felix, The DSAW aspect-oriented software development platform, International Journal of Software Engineering and Knowledge Engineering 21 (2011), 891–929.


[[5]] L. Vinuesa, F. Ortin, J.M. Felix and F. Alvarez, DSAW: A dynamic and static aspect weaving platform, in: International Conference on Software Technologies, 2008, pp. 55–62.