Author: digitalmedium1

A Hash Map for Graph Processing Workloads & a Methodology for Transactional Data Structures – CppCon

  • Lobby
  • Author Archives: digitalmedium1

https://cppcon.org/
https://github.com/CppCon/CppCon2020
---
Emerging byte-addressable Non-Volatile Memories (NVMs) provide higher densities and data persistence where process state can be recovered after crashes. Graph analytic applications such as search and ranking, pattern matching, and clustering benefit from the large capacity available with persistent memory since the data sets are very large with up to trillions of vertices and edges. A hash map is fundamental for graph analytics because it associatively map keys to values, offering constant time lookup for graph updates. While lock-free persistent hash maps have been developed, most perform poorly due to a heavy use of pointer dereferences. Additionally, it is often desirable to perform a composition of graph updates as a transaction. Although persistent data structures enable applications to rely on persistent data with failure-atomic operations, they lack the ability to allow users to execute a sequence of operations as transactions. Meanwhile, persistent transactional memory (PTM) has been proposed by adding durability to Software Transactional Memory (STM). However, PTM suffers from high performance overheads and low scalability due to false aborts, logging, and ordering constraints on persistence.

In this talk, we present PMap, a persistent concurrent hash map with open addressing and non-blocking parallel resizing to cater to large graph processing workloads. Our PMap achieves lock-freedom using compare_exchange_strong from the C++11 Atomic Operations Library. To provide persistence, our design uses a modified version of the link-and-persist approach. While this approach is traditionally used to persist pointers, our modification enables link-and-persist to be used in-place, persisting keys and values directly. This is crucial, as logs, or separate object allocations may require pointer dereferences, which undermines the cache locality benefits of pure open addressing. The PMap uses the C++11 alignas specifier to ensure data can be aligned and flushed on a per-cacheline basis into persistent memory. To accommodate durable transactions, we present PETRA, a new approach for constructing persistent transactional non-blocking linked data structures. PETRA natively supports transactions, but unlike PTM, relies on the high-level information from the data structure semantics. This gives PETRA unique advantages in the form of high performance and high scalability. We present diagrams detailing the PMap design and PETRA methodology for the C++ programming language, and illustrate how to keep the number of cache line flushes and memory fences low through the use of descriptor objects, which are commonly used in the design of lock-free data structures.

We showcase the performance of our proposed persistent data structures by presenting a live demonstration of PMap and PETRA data structures including a linked list, skiplist, map, and multi-dimensional list. We compare PMap to clevel, OneFile, STL, and PMDK, tested on a micro-benchmark and on files from Recursive Model for graph mining (R-MAT). We compare the PETRA data structures to OneFile, Romulus, and PMDK, tested on a micro-benchmark and the Telecommunication Application Transaction Processing (TATP) benchmark. The live demonstration illustrates how PMap outperforms state-of-the-art alternatives averaging 3122x faster under Intel Optane DC, and PETRA outperforms the state-of-the-art PTMs by an order of magnitude in transactions of size greater than one, and demonstrates superior performance in transactions of size one.

---
Kenneth Lamar

Kenneth Lamar received his Bachelor of Science (2017) from the University of Central Florida. He is currently pursuing his PhD in Computer Science at UCF. His research interests include concurrent data structures and distributed computing. His work is currently focused on HPC scheduling, transactional data structures, and persistent memory.

Christina Peterson

Dr. Christina Peterson is a Postdoctoral Associate at the University of Central Florida. Dr. Peterson completed her dissertation work under the supervision of Dr. Damian Dechev with a focus on correctness and progress guarantees of multiprocessor algorithms and data structures. Her published work includes the development of a durable linearizable correctness tool, concurrent correctness conditions defined in vector space, a transactional correctness tool for abstract data types, a correctness condition specification tool, a framework to verify progress guarantees, and an extension of combinatorial topology theory for wait-free computability to support the instructions Compare-And-Swap and Load-Link-Store-Conditional. She also co-authored a publication that provides a read-uncommitted view for blockchain transactions.

---
Filmed & Edited by Bash Films: http://www.BashFilms.com

The CppCon YouTube Channel Is Sponsored By:
JetBrains : http://jb.gg/cpptools
SonarSource: https://www.sonarsource.com/

Filed under: Science & Technology

Embracing PODs Safely Until They Die – Alisdair Meredith & Nina Ranns – CppCon 2021

  • Lobby
  • Author Archives: digitalmedium1

https://cppcon.org/
https://github.com/CppCon/CppCon2020
---
How do you change the active member of a union? Can you copy an object without a publicly callable copy constructor? Can you pass classes having private data to a function implemented in C? What is the use case for the library type trait `std::is_trivially_move_assignable`? All these questions and more will be answered in this session.

PODs --- Plain Old Data --- are neither plain nor old in C++11, and continued to evolve in every published standard since, until they were finally banished in C++20. In researching the deconstruction of PODs for the upcoming book, "Embracing Modern C++ Safely" Alisdair Meredith (and the other authors including John Lakos, Vittorio Romeo, and Rostislav Khlebnikov) discovered that many of the intuitive properties and capabilities of trivial and standard layout types did not behave quite as expected, and there are many subtleties waiting to catch the unwary. Nina Ranns, as an active member of the Core working group, stepped in to explain and resolve many concerns, while pointing out further bad assumptions. Together they will present the use cases, pitfalls, and annoyances of these features as now properly understood, giving a flavor of the presentation style of each of the 57 C++11/14 features presented in the book.

---

Alisdair Meredith
Alisdair Meredith is a software developer at BloombergLP in New York, and a previous chair of the C++ Standard Committee Library Working Group. He has been an active member of the C++ committee for almost two decades, and by a lucky co-incidence his first meeting was the kick-off meeting for the project that would become C++11, and also fixed the contents of the original library TR. He is currently working on the BDE project, BloombergLP's open source libraries that offer a foundation for C++ development, including a standard library implementation supporting the polymorphic allocator model that was ultimately adopted by C++17.

Nina Ranns
Nina Ranns has been a member of the C++ standard committee since 2013, focusing mostly on the core part of the language, and committee secretary since 2018. Throughout her career she has worked for Siemens, Motorola, Datasift, and Symantec on everything from parts of the UMTS network to cloud based antivirus products. Currently an independent consultant with contracts for EDG, QT, and most recently Bloomberg, where she is eagerly extending her library knowledge and helping create new polymorphic-allocator friendly library types.

---

Videos Streamed & Edited by Digital Medium: http://online.digital-medium.co.uk

The CppCon YouTube Channel Is Sponsored By:
JetBrains : http://jb.gg/cpptools
SonarSource: https://www.sonarsource.com/

Filed under: Science & Technology

A (Short) Tour of C++ Modules – Daniela Engert – CppCon 2021

  • Lobby
  • Author Archives: digitalmedium1

https://cppcon.org/
https://github.com/CppCon/CppCon2020
---
Modules are probably the most impactful and most transformative recent major addition to the C++ language. From a user perspective, Modules are conceptually simple and the idea is easy to grasp. And with the C++20 ecosystem maturing, using Modules and adopting them into every-day programming is both feasable and advantageous.

But what is the motivation that lead to the invention of Modules and their inclusion into the standard? How do they look like? Which are the three key features of C++ Modules that exist since the inception of the language, that are mostly irrelevant in the typical usage of 'classical' C++ such that hardly any programmer needs to know much about them but a Modules developer does? What surprises might lie on the path of transforming a classical library into a Module? Are there still any issues, loose ends or open questions regarding Modules?

The talk will try to give a comprehensive answer to those questions. The audience shall get enough information to decide when the right time has come for them to take the plunge and move their codebase to Modules wherever it is advantageous.

---
Daniela Engert

Daniela has a degree in electrical engineering and has been working for more than 30 years in small innovative companies in the field of software and hardware development. She has spent her youth with exploring the very first microprocessors since the late 70's, and has been creating software professionally for 40 years now. After a long time using many different programming languages, C++ has now been the exclusive workhorse throughout the last two decades. With great pleasure Daniela is now also a member of the ISO C++ committee. For the better part of her career, the domain was applied digital signal processing (medicine, metrology, reconnaissance), but during the last decade the focus shifted onto special engineering in the field of industrial non-destructive testing of semi-finished and finished steel products using ultrasound. Besides that, she loves to relax with hard metal and soft cheese, hot curries and cool jazz.

---
Videos Streamed & Edited by Digital Medium: http://online.digital-medium.co.uk

The CppCon YouTube Channel Is Sponsored By:
JetBrains : http://jb.gg/cpptools
SonarSource: https://www.sonarsource.com/

Filed under: Science & Technology

C++20: The Small Pearls – Rainer Grimm – CppCon 2021

  • Lobby
  • Author Archives: digitalmedium1

https://cppcon.org/
https://github.com/CppCon/CppCon2020
---

C++20 has way more to offer than the big four concepts, ranges, modules, and coroutines.
Here are a few of the shining pearls.

The spaceship operation automatically creates the six comparison operators. Thanks to consteval, constinit, and improved templates, programming at compile time becomes more powerful. std::span supports safe access to contiguous memory blocks. An enhanced time library and a new type date. Comfortable formatting of data thanks to std::format. Easily synchronize or coordinate threats with semaphores or latches and barriers. An improved thread that maintains itself and supports interruption. Thanks to the synchronized output streams, write operations in the concurrent environment do not end in a mess.

---
Rainer Grimm

I've worked as a software architect, team lead, and instructor since 1999. In 2002, I created company-intern meetings for further education. I have given training courses since 2002. My first tutorials were about proprietary management software, but I began teaching Python and C++ soon after. In my spare time, I like to write articles about C++, Python, and Haskell. I also like to speak at conferences. I publish weekly on my English blog (https://www.modernescpp.com/) and the (https://www.grimm-jaud.de/index.php/blog), hosted by Heise Developer. Since 2016 he is an independent instructor giving seminars about modern C++ and Python. Rainer published several books in various languages to modern C++ and concurrency, C++20, and the C++ Core Guidelines, in particular. Due to his profession, Rainer always searches for the best way to teach modern C++

---

Videos Streamed & Edited by Digital Medium: http://online.digital-medium.co.uk

The CppCon YouTube Channel Is Sponsored By:
JetBrains : http://jb.gg/cpptools
SonarSource: https://www.sonarsource.com/

Filed under: Science & Technology

What’s New in Visual Studio: 64-bit IDE, C++20, WSL 2, & More – Marian Luparu & Sy Brand – CppCon 21

  • Lobby
  • Author Archives: digitalmedium1

https://cppcon.org/
https://github.com/CppCon/CppCon2020
---
Visual Studio 2022 is almost here, bringing new and deeper experiences for C++ developers targeting any platform. Since last year we’ve been working hard on implementing C++20 and making the IDE 64-bit, alongside a host of improvements to make your C++ development safer and more productive.

In this talk we’ll demonstrate many of these features, live: showing you how to use our new AddressSanitizer features to find bugs, target WSL 2 in seconds, express your build instructions with CMakePresets.json, consume specific versions of your dependencies with vcpkg, build and test your code with GitHub Actions, and more.

Come along to learn all about the latest in our tooling, and to get a peek into our plans for the future.

---
Sy Brand

Sy Brand is Microsoft’s C++ Developer Advocate. Their background is in compilers and debuggers for embedded accelerators, but they’re also interested in generic library design, metaprogramming, functional-style C++, undefined behaviour, and making our communities more welcoming and inclusive.

In their spare time they watch too many movies and are a published poet.

Marian Luparu

Ask me about @Code @VisualStudio and #Vcpkg

---
Videos Streamed & Edited by Digital Medium: http://online.digital-medium.co.uk

The CppCon YouTube Channel Is Sponsored By:
JetBrains : http://jb.gg/cpptools
SonarSource: https://www.sonarsource.com/

Filed under: Science & Technology

Design and Implementation of Highly Scalable Quantifiable Data Structures in C++ – CppCon 2021

  • Lobby
  • Author Archives: digitalmedium1

https://cppcon.org/
https://github.com/CppCon/CppCon2020
---
Architectural imperatives due to the slowing of Moore's Law, the broad acceptance of relaxed semantics and the O(n!) worst case verification complexity of generating sequential histories motivate a new approach to concurrent correctness. Quantifiability is proposed as a novel correctness condition that models a system in vector space to launch a new mathematical analysis of concurrency. Analysis is facilitated with linear algebra, better supported and of much more efficient time complexity than traditional combinatorial methods.

In this talk, we present the design and implementation of a lock-free quantifiable stack (QStack) and a lock-free quantifiable queue (QQueue) in the C++ programming language. Our design achieves lock-freedom using compare_exchange_strong from the C++17 Atomic Operations Library. We depict several code snippets that illustrate how quantifiable data structures are highly scalable through use of relaxed semantics, an explicit implementation trade-off permitted by quantifiability. We explain how to reason about the correctness of quantifiable data structures and present a technique and a dynamic analysis tool developed in C++ for efficiently verifying a concurrent history as quantifiably correct, referred to as Vector Space Verification (VSV). We illustrate why it is impractical to use alternative verification techniques that compare concurrent histories to sequential histories for determining correctness for real programs.

We showcase the performance of quantifiable data structures by presenting a live demonstration that runs the QStack and QQueue and plots the results in real time. The QStack is compared with the lock-free Elimination Backoff Stack and the lock-free Treiber stack. The QQueue is compared with the lock-free LCRQ, and the wait-free Fetch-And-Add queue. The live performance demonstration illustrates how the QStack and QQueue achieve substantially higher scalability than the state-of-the-art linearizable counterparts. We also present a live demonstration of our VSV tool to dynamically check a concurrent history for the QStack and QQueue as quantifiably correct in less than O(n^2) time.

---
Victor Cook

Victor Cook is a Ph.D. candidate in Computer Science at the University of Central Florida. He received his Bachelor of Science in Geophysics from the Massachusetts Institute of Technology in 1987, and Master of Science in Civil Engineering from the University of Florida in 1989. Mr. Cook has spent years building software and network, primarily in the areas of medical and financial technology. Systems he architected continue to serve to this day. He has been in responsible positions with sensitive data, including five years as HIPAA compliance officer, and two years as PCI compliance officer. Mr. Cook has global experience, working four years in Latin America and 18 months in Singapore. After a 25 year career in technology, he returned to UCF to earn a doctorate in the field. Mr. Cook is researching blockchain concurrency issues of performance, correctness, progress, fairness and security.

Zachary Painter

Zachary Painter is a Ph.D. student at the University of Central Florida. His area of research includes concurrent programming, transactional data structures, and blockchain concurrency. His prior work includes a lock-free transactional adjacency list as well as a parallel Hash-Mark-Set on the Ethereum Blockchain in which he proposed a fast, lock-free algorithm for providing a read-uncommitted view of blockchain transactions. Zachary has also made contributions to blockchain related research, including a read-uncommitted view for smart contract performance. During his research, he has gained experience with several blockchain platforms including Ethereum and Stellar.

Christina Peterson

Dr. Christina Peterson is a Postdoctoral Associate at the University of Central Florida. Dr. Peterson completed her dissertation work under the supervision of Dr. Damian Dechev with a focus on correctness and progress guarantees of multiprocessor algorithms and data structures. Her published work includes the development of a durable linearizable correctness tool, concurrent correctness conditions defined in vector space, a transactional correctness tool for abstract data types, a correctness condition specification tool, a framework to verify progress guarantees, and an extension of combinatorial topology theory for wait-free computability to support the instructions Compare-And-Swap and Load-Link-Store-Conditional. She also co-authored a publication that provides a read-uncommitted view for blockchain transactions.

---
Videos Filmed & Edited by Bash Films: http://www.BashFilms.com

YouTube Channel Managed by Digital Medium Ltd https://events.digital-medium.co.uk

The CppCon YouTube Channel Is Sponsored By:
JetBrains : http://jb.gg/cpptools
SonarSource: https://www.sonarsource.com/

Filed under: Science & Technology

Building a Lock-free Multi-producer, Multi-consumer Queue for Tcmalloc – Matt Kulukundis – CppCon 21

  • Lobby
  • Author Archives: digitalmedium1

https://cppcon.org/
https://github.com/CppCon/CppCon2020
---
Lock free multi-producer, multi-consumer queues are an area of active research in concurrent data structures, but their performance varies heavily with the specific constraints of the surrounding system. This talk tells the story of building such a queue to replace a component in tcmalloc, Google's malloc implementation. In the process, we will cover

- designing the initial data structure based on LMAX's disruptor pattern
- refactoring the existing code to increase testability and experimentation without introducing overhead
- adding micro benchmarks for the new code
- revising micro benchmarks in the face of conflicting system level metrics
- optimizing the data structure based on those conclusions
- debugging difficult concurrency bugs
- measuring the final result with system level metrics

---
Matt Kulukundis
Matt is a senior software engineer on the C++ libraries team at Google. Prior to Google he has worked on compilers, machine learning, and underwater robotics. In his free time, he scuba dives in warm places.

---
Videos Filmed & Edited by Bash Films: http://www.BashFilms.com

YouTube Channel Managed by Digital Medium Ltd https://events.digital-medium.co.uk

The CppCon YouTube Channel Is Sponsored By:
JetBrains : http://jb.gg/cpptools
SonarSource: https://www.sonarsource.com/

Filed under: Science & Technology

Modern CMake Modules – Bret Brown – CppCon 2021

  • Lobby
  • Author Archives: digitalmedium1

https://cppcon.org/
https://github.com/CppCon/CppCon2020
---
At Bloomberg, we have thousands of independently maintained first- and third-party C++ projects built with CMake. One of the keys to achieving this scale, while also keeping engineers productive, has been leveraging one of the most underrated and underutilized features of CMake — its extensibility via its module system. Bloomberg utilizes dozens of single-purpose CMake modules to allow its tens of thousands of CMakeLists.txt files to stay declarative, flexible, future-proof, and simple -- all while using modern CMake principles!

This talk will cover what CMake modules are, how to write one using the latest CMake features, and how to package one for others to use. Importantly, this talk will also cover when *not* to write a CMake module.

If you find yourself wincing at all the repetitive boilerplate in the CMakeLists.txt across your projects, this is the talk for you!

---
Bret Brown

Software engineer currently focusing on improving C and C++ ergonomics, correctness, and productivity for Bloomberg's Developer Experience department.

Bret likes making authoring and maintaining C++ codebases simpler and more intuitive by treating projects more like cattle and less like pets. He is especially interested in the software development lifecycle, development automation, modern build systems, packaging, code transformation, software governance, and code analysis.
Bret worked in embedded C++ and safety critical C++ for previous employers.

Currently lead of Bloomberg's Build Tools team, responsible for tools such as CMake, pkg-config, and compilation toolchains.

---
Videos Filmed & Edited by Bash Films: http://www.BashFilms.com

YouTube Channel Managed by Digital Medium Ltd https://events.digital-medium.co.uk

The CppCon YouTube Channel Is Sponsored By:
JetBrains : http://jb.gg/cpptools
SonarSource: https://www.sonarsource.com/

Filed under: Science & Technology

Back to Basics: Lambdas – Nicolai Josuttis – CppCon 2021

  • Lobby
  • Author Archives: digitalmedium1

https://cppcon.org/
https://github.com/CppCon/CppCon2020
---
Lambdas, introduced with C++11, are used everywhere in modern C++ programming. While their use looks pretty straightforward, you should know about some details that help you to benefit from their full power.
This session teaches lambdas in detail. Based on the basic principles, it motivates and explains why lambdas are more powerful than functions and how to use them to benefit from that.

---
Nicolai Josuttis

Nicolai Josuttis (http://www.josuttis.com) is well known in the programming community because he not only speaks and writes with authority (being the (co-)author of the world-wide best sellers The C++ Standard Library (www.cppstdlib.com), C++ Templates (www.tmplbook.com), C++17 - The Complete Guide (www.cppstd17.com), C++ Move Semantics - The Complete Guide (www.cppmove.com), and SOA in Practice), but is also an innovative presenter, having talked at various conferences and events.
He has been an active member of the C++ standards committee for more than 20 years.

---
Videos Streamed & Edited by Digital Medium: http://online.digital-medium.co.uk

The CppCon YouTube Channel Is Sponsored By:
JetBrains : http://jb.gg/cpptools
SonarSource: https://www.sonarsource.com/

Filed under: Science & Technology

Back to Basics: Object-Oriented Programming – Rainer Grimm – CppCon 2021

  • Lobby
  • Author Archives: digitalmedium1

https://cppcon.org/
https://github.com/CppCon/CppCon2020
---
C++ is an object-oriented programming (OOP) language but also supports generic and functional features. OOP is a potent tool when used wisely. Let me present you the good parts.

You can design intuitive classes, which encapsulate its internals and allow restricted access. Further, inheritance applied appropriately enables you to build libraries or frameworks that are easy to use and difficult to misuse. The hidden source is the separation of interface and implementation. You can apply "Lesson Learned" from the best and implement design patterns using OOP techniques.

Learn in my lecture the appropriate use of the keywords virtual, override, and final. Learn when you should build a class hierarchy to separate the interface from the implementation. Besides interface inheritance, you can also use implementation inheritance. Learn to distinguish between those.
During this lecture, I also present a few design patterns as examples of good object-oriented design.

---
Rainer Grimm

I've worked as a software architect, team lead, and instructor since 1999. In 2002, I created company-intern meetings for further education. I have given training courses since 2002. My first tutorials were about proprietary management software, but I began teaching Python and C++ soon after. In my spare time, I like to write articles about C++, Python, and Haskell. I also like to speak at conferences. I publish weekly on my English blog (https://www.modernescpp.com/) and the (https://www.grimm-jaud.de/index.php/blog), hosted by Heise Developer. Since 2016 he is an independent instructor giving seminars about modern C++ and Python. Rainer published several books in various languages to modern C++ and concurrency, C++20, and the C++ Core Guidelines, in particular. Due to his profession, Rainer always searches for the best way to teach modern C++

---
Videos Streamed & Edited by Digital Medium: http://online.digital-medium.co.uk

The CppCon YouTube Channel Is Sponsored By:
JetBrains : http://jb.gg/cpptools
SonarSource: https://www.sonarsource.com/

Filed under: Science & Technology