Skip to Main content Skip to Navigation
Poster communications

GoCxx: a tool to easily leverage C++ legacy code for multicore-friendly Go libraries and frameworks

Abstract : Current HENP libraries and frameworks were written before multicore systems became widely deployed and used. From this environment, a 'single-thread' processing model naturallyemerged but the implicit assumptions it encouraged are greatly impairing our abilities to scale in a multicore/manycore world. Writing scalable code in C++ for multicore architectures, while doable, is no panacea. Sure, C++11 will improve on the current situation (by standardizing on std::thread, introducing lambda functions and defining a memory model) but it will do so at the price of complicating further an already quite sophisticated language. This level of sophistication has probably already strongly motivated analysis groups to migrate to CPython, hoping for its current limitations with respect to multicore scalability to be either lifted (Grand Interpreter Lock removal) or for the advent of a new Python VM better tailored for this kind of environment (PyPy, Jython,...) Could HENP migrate to a language with none of the deficiencies of C++ (build time, deployment, low level tools for concurrency) and with the fast turn-around time, simplicity and ease of coding of Python ? This paper will try to make the case for Go - a young open source language with built-in facilities to easily express and expose concurrency - being such a language. We will first present a status update on go-gaudi, a framework written in Go loosely modeled after the C++ framework Gaudi used by two LHC experiments, and how its event loop was modified to expose more concurrency. Then, benchmarks fed with data flows extracted from current C++ frameworks and with different toy-components (thread-safe/non-thread-safe, I/O bound, CPU bound, ...) will be discussed. Finally, we will introduce GoCxx, a tool leveraging gcc-xml's output to automatize the tedious work of creating Go wrappers for foreign languages, a critical task for any language wishing to leverage legacy and field-tested code. We will conclude with the first results of applying GoCxx to real C++ Gaudi components, effectively enabling go-gaudi with LHC know-how.
Document type :
Poster communications
Complete list of metadata
Contributor : Sabine Starita <>
Submitted on : Tuesday, May 22, 2012 - 3:42:16 PM
Last modification on : Wednesday, October 14, 2020 - 3:56:56 AM

Links full text





S. Binet. GoCxx: a tool to easily leverage C++ legacy code for multicore-friendly Go libraries and frameworks. Computing in High Energy and Nuclear Physics (CHEP2012), May 2012, New York, United States. Institute of Physics Publishing, 396, pp.052012, 2012, ⟨10.1088/1742-6596/396/5/052012⟩. ⟨in2p3-00700260⟩



Record views