The Journal of Supercomputing

, Volume 71, Issue 12, pp 4663–4679 | Cite as

A stepwise approach to developing staged applications

  • Tiago Salmito
  • Ana Lúcia de Moura
  • Noemi Rodriguez
Article
  • 118 Downloads

Abstract

The staged event-driven architecture (SEDA) can be seen as a milestone as regards integration of threads and events in a single model. By decomposing applications into sets of multi-threaded stages connected by event queues, SEDA allows for the use of each concurrency model where most appropriate. Inside each SEDA stage, the number and scheduling policy of threads can be adjusted to enhance performance. SEDA lends itself to parallelization on multi-cores and is well suited for many high-volume data stream processing systems and highly concurrent event processing systems. In this paper, we propose an extension to the staged model that decouples application design from specific execution environments, encouraging a stepwise approach for designing concurrent applications, similar to Foster’s PCAM methodology. We also present Leda, a platform that implements this extended model. In Leda, stages are defined purely by their role in application logic, with no concern for locality of execution, and are bound together through asynchronous communication channels, called connectors, to form a directed graph representing the flow of events inside the application. Decisions about the configuration of the application at execution time are delayed to later phases of the implementation process. Stages in the application graph can then be grouped to form clusters, and each cluster is mapped to an exclusive OS process, running on an arbitrary host. Finally, we discuss two example applications which we developed to evaluate the Leda platform.

Keywords

Concurrency Threads Event-driven Staged events 

References

  1. 1.
    Adya A, Howell J, Theimer M, Bolosky WJ, Douceur JR (2002) Cooperative task management without manual stack management. In: Proceedings of the general track of USENIX annual technical conference, Monterey, CA, USA, pp 289–302Google Scholar
  2. 2.
    Behren RV, Condit J, Zhou F, Necula GC, Brewer E (2003) Capriccio: scalable threads for internet services. In: Proceedings of the 19th ACM symposium on operating systems principles, Bolton Landing, NY, USA, pp 268–281Google Scholar
  3. 3.
    Dabek F, Zeldovich N, Kaashoek F, Mazières D, Morris R (2002) Event-driven programming for robust software. In: Proceedings of the 10th workshop on ACM SIGOPS European workshop, EW 10, New York, NY, USA, pp 186–189Google Scholar
  4. 4.
    Foster I (1995) Designing and building parallel programs, chap 2. Addison-Wesley, ReadingGoogle Scholar
  5. 5.
    Foundation AS (2013) The apache web server. http://www.apache.org. Accessed July 2013
  6. 6.
    Garlan D, Monroe R, Wile D (2000) Acme: architectural description of component-based systems. In: Leavens GT, Sitaraman M (eds) Foundations of component-based systems. Cambridge University Press, London, pp 47–67Google Scholar
  7. 7.
    Gordon ME (2010) Stage scheduling for CPU-intensive servers. Ph.D. thesis, University of Cambridge, Computer LaboratoryGoogle Scholar
  8. 8.
    Haller P, Odersky M (2007) Actors that unify threads and events. In: Proceedings of the 9th international conference on coordination models and languages, Paphos, Cyprus, pp 171–190Google Scholar
  9. 9.
    Han B, Luan Z, Zhu D, Ren Y, Chen T, Wang Y, Wu Z (2009) An improved staged event driven architecture for master-worker network computing. In: Cyber-enabled distributed computing and knowledge discovery, CyberC ’09, Zhangjiajie, China, pp 184–190Google Scholar
  10. 10.
    Ierusalimschy R (2006) Programming in Lua, 2nd edn. Chap 24, Lua. OrgGoogle Scholar
  11. 11.
    Ierusalimschy R, de Figueiredo L, Celes W (2011) Passing a language through the eye of a needle. Commun ACM 54(7):38–43CrossRefGoogle Scholar
  12. 12.
    Li P, Zdancewic S (2007) Combining events and threads for scalable network services implementation and evaluation of monadic, application-level concurrency primitives. In: Proceedings of the 2007 ACM SIGPLAN conference on programming language design and implementation, PLDI ’07, New York, NY, USA, pp 189–199Google Scholar
  13. 13.
    (2013) Nginx: the nginx webserver. http://nginx.org. Accessed July 2013
  14. 14.
    Project K (2004) Xavante webserver. http://www.keplerproject.org/xavante. Accessed July 2013
  15. 15.
    Salmito T, de Moura AL, Rodriguez N (2011) Understanding hybrid concurrency models. Revista Brasileira de Redes de Computadores e Sistemas Distribuidos 4(2):33–41Google Scholar
  16. 16.
    Salmito T, de Moura AL, Rodriguez N (2013) Flexible approach to staged events. In: Sixth international workshop on parallel programming models and systems software for high-end computing (P2S2)Google Scholar
  17. 17.
    Skyrme A, Rodriguez N, Ierusalimschy R (2008) Exploring lua for concurrent programming. J Univers Comput Sci 14(21):3556–3572Google Scholar
  18. 18.
    Software H (2013) Httperf. http://www.hpl.hp.com/research/linux/httperf. Accessed July 2013
  19. 19.
    Upadhyaya G, Pai VS, Midkiff SP (2007) Expressing and exploiting concurrency in networked applications with Aspen. In: Proceedings of the 12th ACM SIGPLAN symposium on principles and practice of parallel programming, PPoPP ’07, New York, NY, USA, pp 13–23Google Scholar
  20. 20.
    Welsh M, Culler D, Brewer E (2001) Seda: an architecture for well-conditioned, scalable internet services. SIGOPS Oper Syst Rev 35(5):230–243CrossRefGoogle Scholar
  21. 21.
    Wu E, Diao Y, Rizvi S (2006) High-performance complex event processing over streams. In: Proceedings of the 2006 ACM SIGMOD international conference on management of data. ACM, pp 407–418Google Scholar
  22. 22.
    Yoo S, Lee H, Killian C, Kulkarni M (2011) Incontext: simple parallelism for distributed applications. In: Proceedings of the 20th international symposium on high performance distributed computing. ACM, pp 97–108Google Scholar

Copyright information

© Springer Science+Business Media New York 2014

Authors and Affiliations

  • Tiago Salmito
    • 1
  • Ana Lúcia de Moura
    • 1
  • Noemi Rodriguez
    • 1
  1. 1.Departamento de InformáticaPontifícia Universidade Católica do Rio de Janeiro (PUC-Rio)Rio de JaneiroBrazil

Personalised recommendations