CAF - the C++ Actor Framework for Scalable and Resource-Efficient Applications

The actor model of computation has gained significant popularity over the last decade. Its high level of abstraction combined with its flexibility and efficiency makes it appealing for large applications in concurrent and distributed regimes. In this paper, we report on our work of designing and building CAF, the "C++ Actor Framework". CAF targets at providing an extremely scalable native environment for building high-performance concurrent applications and distributed systems. Based on our previous library tt libcppa, CAF significantly extends its scopes of application and operation, as well as the range of scalability. The particular contributions of this paper are threefold. First we present the design and implementation of a type-safe messaging interface for actors that rules out a category of runtime errors and facilitates robust software design. Second we introduce a runtime inspection shell as a first building block for convenient debugging of distributed actors. Finally we enhance the scheduling facilities and improve scaling up to high numbers of concurrent processors. Extensive performance evaluations indicate ideal runtime behaviour for up to 64 cores at very low memory footprint. In these tests, CAF clearly outperforms competing actor environments.

[1]  Aloysius K. Mok,et al.  Multiprocessor On-Line Scheduling of Hard-Real-Time Tasks , 1989, IEEE Trans. Software Eng..

[2]  Thomas C. Schmidt,et al.  RIOT OS: Towards an OS for the Internet of Things , 2013, 2013 IEEE Conference on Computer Communications Workshops (INFOCOM WKSHPS).

[3]  Todd L. Veldhuizen,et al.  Expression templates , 1996 .

[4]  Maurice Herlihy,et al.  Transactional Memory: Architectural Support For Lock-free Data Structures , 1993, Proceedings of the 20th Annual International Symposium on Computer Architecture.

[5]  Carlos A. Varela,et al.  SALSA Lite: A Hash-Based Actor Runtime for Efficient Local Concurrency , 2014, Concurrent Objects and Beyond.

[6]  Vivek Sarkar,et al.  Savina - An Actor Benchmark Suite: Enabling Empirical Evaluation of Actor Libraries , 2014, AGERE!@SPLASH.

[7]  Laxmikant V. Kalé,et al.  CHARM++: a portable concurrent object oriented system based on C++ , 1993, OOPSLA '93.

[8]  Thomas C. Schmidt,et al.  Embedded Actors - Towards distributed programming in the IoT , 2014, 2014 IEEE Fourth International Conference on Consumer Electronics Berlin (ICCE-Berlin).

[9]  David Grove,et al.  Work-stealing without the baggage , 2012, OOPSLA '12.

[10]  Alan Mycroft,et al.  Kilim: Isolation-Typed Actors for Java , 2008, ECOOP.

[11]  Koushik Sen,et al.  Rule-Based Runtime Verification , 2004, VMCAI.

[12]  Joe Armstrong,et al.  Making reliable distributed systems in the presence of software errors , 2003 .

[13]  L. Kish End of Moore's law: thermal (noise) death of integration in micro and nano electronics , 2002 .

[14]  Scott Meyers,et al.  C++ and the Perils of Double-Checked Locking ∗ , 2004 .

[15]  Robert D. Blumofe,et al.  Scheduling multithreaded computations by work stealing , 1994, Proceedings 35th Annual Symposium on Foundations of Computer Science.

[16]  Carolyn L. Talcott,et al.  Towards a Theory of Actor Computation , 1992, CONCUR.

[17]  Mark S. Miller,et al.  Causeway: a message-oriented distributed debugger , 2009 .

[18]  Maurice Herlihy,et al.  Wait-free synchronization , 1991, TOPL.

[19]  Koushik Sen,et al.  Efficient decentralized monitoring of safety in distributed systems , 2004, Proceedings. 26th International Conference on Software Engineering.

[20]  Josep Torrellas,et al.  False Sharing ans Spatial Locality in Multiprocessor Caches , 1994, IEEE Trans. Computers.

[21]  Thomas C. Schmidt,et al.  Native actors: a scalable software platform for distributed, heterogeneous environments , 2013, AGERE! 2013.

[22]  Gul A. Agha,et al.  Actor frameworks for the JVM platform: a comparative analysis , 2009, PPPJ '09.

[23]  Doug Lea,et al.  A Java fork/join framework , 2000, JAVA '00.

[24]  Thomas C. Schmidt,et al.  Native actors: how to scale network forensics , 2015, SIGCOMM 2015.

[25]  Gul A. Agha,et al.  ACTORS - a model of concurrent computation in distributed systems , 1985, MIT Press series in artificial intelligence.

[26]  Chung Laung Liu,et al.  Scheduling Algorithms for Multiprogramming in a Hard-Real-Time Environment , 1989, JACM.

[27]  Gul Agha,et al.  Parallel programming and complexity analysis using Actors , 1997, Proceedings. Third Working Conference on Massively Parallel Programming Models (Cat. No.97TB100228).

[28]  Carl Hewitt,et al.  A Universal Modular ACTOR Formalism for Artificial Intelligence , 1973, IJCAI.

[29]  Nir Shavit,et al.  Software transactional memory , 1995, PODC '95.

[30]  John Hughes,et al.  Testing telecoms software with quviq QuickCheck , 2006, ERLANG '06.

[31]  Scott Shenker,et al.  Replay debugging for distributed applications , 2006 .