Cargando…

C++ Reactive Programming : Design Concurrent and Asynchronous Applications Using the Rxcpp Library and Modern C++17.

Reactive programming is an effective way to build highly responsive applications with an easy-to-maintain code base. This book covers the essential functional reactive concepts that will help you build highly concurrent, event-driven, and asynchronous applications in a simpler and less error-prone w...

Descripción completa

Detalles Bibliográficos
Clasificación:Libro Electrónico
Autor principal: Abraham, Peter
Otros Autores: Pai, Praseed
Formato: Electrónico eBook
Idioma:Inglés
Publicado: Birmingham : Packt Publishing Ltd, 2018.
Temas:
Acceso en línea:Texto completo
Tabla de Contenidos:
  • Cover; Title Page; Copyright and Credits; Packt Upsell; Contributors; Table of Contents; Preface; Chapter 1: Reactive Programming Model
  • Overview and History; Event-driven programming model; Event-driven programming on X Windows; Event-driven programming on Microsoft Windows; Event-driven programming under Qt; Event-driven programming under MFC; Other event-driven programming models; Limitations of classical event processing models; Reactive programming model; Functional reactive programming; The key interfaces of a reactive program; Pull-versus push-based reactive programming.
  • The IEnumerable/IObservable dualityConverting events to IObservable; The philosophy of our book; Summary; Chapter 2: A Tour of Modern C++ and its Key Idioms; The key concerns of the C++ programming language; Zero cost abstraction; Expressivity; Substitutability; Enhancements to C++ for writing better code; Type deduction and inference; Uniform initialization of variables; Variadic templates; Rvalue references ; Move semantics; Smart pointers; Lambda functions; Functors and Lambdas; Composition, currying, and partial function application; Function wrappers.
  • Composing functions together with the pipe operatorMiscellaneous features; Fold expressions; Variant type; Other important topics; Range-based for loops and observables; Summary; Chapter 3: Language-Level Concurrency and Parallelism in C++; What is concurrency?; Hello World of concurrency (using std::thread); Managing threads; Thread launch; Thread join; Passing arguments into a thread; Using Lambdas; Ownership management; Sharing data between threads; Mutexes; Avoiding deadlock; Locking with std::unique_lock; Condition variables; A thread-safe stack data structure; Summary.
  • Chapter 4: Asynchronous and Lock-Free Programming in C++Task-based parallelism in C++; Future and promise; std::packaged_task; std::async; C++ memory model; Memory access and concurrency; The modification contract; Atomic operations and types in C++; Atomic types; std::atomic_flag; std::atomic; Standard atomic integral types; std::atomic
  • pointer arithmetic; std::atomic primary class template; Memory ordering; Sequential consistency; Acquire-release ordering; Relaxed ordering; A lock-free data structure queue; Summary; Chapter 5: Introduction to Observables.
  • The GoF Observer patternThe limitations of the GoF Observer pattern; A holistic look at GoF patterns; The OOP programming model and hierarchies; A Composite/Visitor pattern for expression processing; Flattening the composite for iterative processing; Map and filter operations on the list; Reversing the gaze for Observables!; Summary; Chapter 6: Introduction to Event Stream Programming Using C++; What is Stream programming model?; Advantages of the Stream programming model; Applied Stream programming using the Streams library; Lazy evaluation; A simple Stream program.