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.
Similar content being viewed by others
References
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–302
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–281
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–189
Foster I (1995) Designing and building parallel programs, chap 2. Addison-Wesley, Reading
Foundation AS (2013) The apache web server. http://www.apache.org. Accessed July 2013
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–67
Gordon ME (2010) Stage scheduling for CPU-intensive servers. Ph.D. thesis, University of Cambridge, Computer Laboratory
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–190
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–190
Ierusalimschy R (2006) Programming in Lua, 2nd edn. Chap 24, Lua. Org
Ierusalimschy R, de Figueiredo L, Celes W (2011) Passing a language through the eye of a needle. Commun ACM 54(7):38–43
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–199
(2013) Nginx: the nginx webserver. http://nginx.org. Accessed July 2013
Project K (2004) Xavante webserver. http://www.keplerproject.org/xavante. Accessed July 2013
Salmito T, de Moura AL, Rodriguez N (2011) Understanding hybrid concurrency models. Revista Brasileira de Redes de Computadores e Sistemas Distribuidos 4(2):33–41
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)
Skyrme A, Rodriguez N, Ierusalimschy R (2008) Exploring lua for concurrent programming. J Univers Comput Sci 14(21):3556–3572
Software H (2013) Httperf. http://www.hpl.hp.com/research/linux/httperf. Accessed July 2013
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–23
Welsh M, Culler D, Brewer E (2001) Seda: an architecture for well-conditioned, scalable internet services. SIGOPS Oper Syst Rev 35(5):230–243
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–418
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–108
Author information
Authors and Affiliations
Corresponding author
Additional information
This work is partially supported by the Carlos Chagas Filho Foundation for Research Support of the State of Rio de Janeiro (FAPERJ) under Grant no. E-26/100.519/2011 and the National Scientific and Technological Research Council (CNPq).
Rights and permissions
About this article
Cite this article
Salmito, T., de Moura, A.L. & Rodriguez, N. A stepwise approach to developing staged applications. J Supercomput 71, 4663–4679 (2015). https://doi.org/10.1007/s11227-014-1110-4
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11227-014-1110-4