Skip to main content

Using AOP to bring a project back in shape: The OurGrid case


The design and development of distributed software is a complex task. This was not different in OurGrid, a project whose objective was to develop a free-to-join grid. After two years of development, it was necessary to redesign OurGrid in order to cope with the integration problems that emerged. This paper reports our experience in using Aspect-Oriented Programming (AOP) in the process of redesigning the OurGrid middleware. The essential direction of our approach was to get the project (and the software) back in shape. We discuss how the lack of separation of concerns created difficulties in the project design and development and how AOP has been introduced to overcome these problems. In particular, we present the event-based pattern designed to better isolate the middleware concerns and the threads. Besides, we also present the aspects designed for managing the threads and for aiding the testing of multithreaded code. We also highlight the lessons learned in the process of regaining control of the software.


  1. Eclipse Metrics plugin. At

  2. Nazareno Andrade, Francisco Brasileiro, Walfredo Cirne, and Miranda Mowbray. Discouraging Free Riding in a Peer-to-Peer CPU Sharing Grid. InProceedings of the 13th High Performance Distributed Computing Symposium (HPDC’2004), 2004.

  3. Nazareno Andrade, Walfredo Cirne, Francisco Brasileiro, and Paulo Roisenberg. OurGrid: An approach to easily assemble grids with equitable resource sharing. InProceedings of the 9th Workshop on Job Scheduling Strategies for Parallel Processing, June 2003.

  4. Elisa L. A. Baniassad, Gail C. Murphy, Christa Schwanninger, and Michael Kircher. Managing crosscutting concerns during software evolution tasks: an inquisitive study. InProceedings of the 1st international conference on Aspect-oriented software development (AOSD’02), pages 120–126, April 2002.

  5. Kent Beck.Extreme Programming Explained: Embrace Change. Addison-Wesley, 2000.

  6. Paulo Borba and Sergio Soares. Refactoring and code generation tools for AspectJ. InProceedings of the Workshop on Tools for Aspect-Oriented Software Development (with OOPSLA), Seattle, Washington, USA, November 2002.

  7. Antonio Carzaniga, Elisabetta Di Nitto, David S. Rosenblum, and Alexander L. Wolf. Issues in Supporting Event-based Architectural Styles. InProceedings of the Third International Software Architecture Workshop (ISAW-3), November 1998.

  8. Walfredo Cirne, Francisco Brasileiro, Nazareno Andrade, Lauro Costa, Alisson Andrade, Reynaldo Novaes, and Miranda Mowbray. Labs of the World, Unite!!! Accepted for publication in Journal of Grid Computing 〈〉. Springer. 2006.

  9. Walfredo Cirne, Daniel Paranhos, Lauro Costa, Elizeu Santos-Neto, Francisco Brasileiro, Jacques Sauvé, Fabrício Alves Barbosa da Silva, Carla Osthoff Barros, and Cirano Silveira. Running Bag-of-Tasks Applications on Computational Grids: The MyGrid Approach. InProceedings of the International Conference on Parallel Processing (ICCP’2003), October 2003.

  10. Yvonne Coady and Gregor Kiczales. Back to the future: a retroactive study of aspect evolution in operating system code. InProceedings of the 2nd international conference on Aspect-oriented software development (AOSD’03), pages 50–59, March 2003.

  11. Adrian Colyer and Andrew Clement. Large-scale AOSD for middleware. InProceedings of the 3rd international conference on Aspect-oriented software development (AOSD’04), pages 56–65,March 2004.

  12. Daniel Paranhos da Silva,Walfredo Cirne, and Francisco Vilar Brasileiro. Trading Cycles for Information: Using Replication to Schedule Bag-of-Tasks Applications on Computational Grids. InProceedings of the Euro-Par 2003: International Conference on Parallel and Distributed Computing, pages 169–180, 2003.

  13. Orit Edelstein, Eitan Farchi, Evgeny Goldin, Yarden Nir, Gil Ratsaby, and Shmuel Ur. Framework for TestingMulti-threaded Java Programs.Concurrency and Computation: Practice and Experience, 15(3–5): 485–499, 2003.

    Article  MATH  Google Scholar 

  14. Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides.Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, 1994.

  15. Celina Gibbs and Yvonne Coady. Aspects of Memory Management. InProceedings of the 38th Annual Hawaii International Conference on System Sciences (HICSS’05) — Track 9, Big Island, Hawaii, 2005.

  16. William G. Griswold, Jimmy J. Yuan, and Yoshikiyo Kato. Exploiting the map metaphor in a tool for software evolution. InProceedings of the 23rd International Conference on Software Engineering (ICSE’01), pages 265–274, 2001.

  17. William Grosso.Java RMI. O’Reilly, 2001.

  18. Erik Hatcher and Steve Loughran.Java Development with Ant. Manning Publications Co., 2004.

  19. Brian Henderson-Sellers.Object-Oriented Metrics: Measures of Complexity. Prentice Hall, 1995.

  20. Gregor Kiczales, Erik Hilsdale, Jim Hugunin, Mik Kersten, Jeffrey Palm, and William Griswold. Getting Started with AspectJ.Communications of the ACM, 44(10):59–65, 2001.

    Article  Google Scholar 

  21. Gregor Kiczales, John Lamping, Anurag Mendhekar, Chris Maeda, Cristina Videira Lopes, Jean-Marc Loingtier, and John Irwin. Aspect-Oriented Programming. InEuropean Conference on Object-Oriented Programming, ECOOP’97, LNCS 1241, pages 220–242, Finland, June 1997. Springer-Verlag.

  22. Ramnivas Laddad. AspectJ in Action. Manning Publications Co., 2003.

  23. Nicholas Lesiecki. Test flexibly with AspectJ and mock objects. At

  24. Vincent Massol.JUnit In Action. Manning Publications Co., 2004.

  25. Raissa Medeiros, Walfredo Cirne, Francisco Brasileiro, and Jacques Sauvé. Faults in Grids: Why are they so bad and What can be done about it? InProceedings of the 4th International Workshop on Grid Computing (Grid 2003), November 2003.

  26. Odysseas Papapetrou and George A. Papadopoulos. Aspect Oriented Programming for a component based real life application: A case study. InProceedings of the ACM Symposium on Applied Computing, Nicosia, Cyprus, March 2004.

  27. Manish Parashar and Craig A. Lee. Scanning the Issue: Special Isssue on Grid-Computing.Proceedings of the IEEE, 93(3):479–484, March 2005.

    Article  Google Scholar 

  28. Awais Rashid and Ruzanna Chitchyan. Persistence as an aspect. InProceedings of the 2nd international conference on Aspect-oriented software development (AOSD’03), pages 120–129, March 2003.

  29. Martin P. Robillard and Gail C. Murphy. Concern graphs: Finding and describing concerns using structural program dependencies. InProceedings of the 24th International Conference on Software Engineering (ICSE’02), Orlando, Florida, USA, 2002.

  30. Elizeu Santos-Neto, Walfredo Cirne, Francisco Brasileiro, and Aliandro Lima. Exploiting Replication and Data Reuse to Efficiently Schedule Dataintensive Applications on Grids. InProceedings of the 10th Workshop on Job Scheduling Strategies for Parallel Processing, June 2004.

  31. Christa Schwanninger, Egon Wuchner, and Michael Kircher. Encapsulating Crosscutting Concerns in System Software. InProceedings of the Third AOSD Workshop on Aspects, Components, and Patterns for Infrastructure Software, Lancaster, UK, March 2004.

  32. Sergio Soares, Eduardo Laureano, and P. Borba. Implementing distribution and persistence aspects with AspectJ. InProceedings of the 17th Annual ACM Conference on Object-Oriented Programming Systems, Languages, and Applications (OOPSLA 2002), pages 174–190, Seattle, Washington, USA, November 2002.

  33. Peri Tarr and Harold Ossher. Advanced Separation of Concerns in Software Engineering. InWorkshop on Advanced Separation of Concerns in Software Engineering at ICSE 2001, 2001. At

  34. AspectJ Team. The AspectJ Programming Guide. At, 2003.

  35. OurGrid Team. Ourgrid 3.0 user manual. At

  36. Douglas Thain, Todd Tannenbaum, and Miron Livny. Distributed Computing in Practice: The Condor Experience. Concurrency and Computation: Practice and Experience, 2004.

  37. Paolo Tonella and Mariano Ceccato. Migrating Interface Implementation to Aspects. InProceedings of the 20th IEEE International Conference on Software Maintenance (ICSM’04), Chicago Illinois, USA, 2004.

  38. Arie van Deursen, Marius Marin, and Leon Moonen. Aspect mining and refactoring. InProceedings of the 1st International Workshop on Refactoring: Achievements, Challenges, Effects (REFACE), Waterloo, Canada, November 2003.

  39. Robert J.Walker, Elisa L. A. Baniassad, and Gail C. Murphy. Assessing Aspect-Oriented Programming and Design: Preliminary Results. InWorkshop on Aspect-Oriented Programming (In ECOOP’1998), Brussels, Belgium, July 1998.

  40. Robert J.Walker, Elisa L. A. Baniassad, and Gail C. Murphy. An Initial Assessment of Aspect-Oriented Programming. InProceedings of the 21st International Conference on Software Engineering, pages 120–130. IEEE Computer Society Press, 1999.

  41. Charles Zhang and Hans-Arno Jacobsen. Refactoring Middleware With Aspects.IEEE Transactions on Parallel and Distributed Systems, 14(11), 2003.

Download references

Author information

Authors and Affiliations


Rights and permissions

Open Access This article is distributed under the terms of the Creative Commons Attribution 2.0 International License ( ), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Reprints and permissions

About this article

Cite this article

Dantas, A., Cirne, W. & Saikoski, K. Using AOP to bring a project back in shape: The OurGrid case. J Braz Comp Soc 11, 21–35 (2005).

Download citation

  • Issue Date:

  • DOI: