Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
C++ Reactive Programming

You're reading from   C++ Reactive Programming Design concurrent and asynchronous applications using the RxCpp library and Modern C++17

Arrow left icon
Product type Paperback
Published in Jun 2018
Publisher Packt
ISBN-13 9781788629775
Length 348 pages
Edition 1st Edition
Languages
Tools
Concepts
Arrow right icon
Authors (2):
Arrow left icon
Peter Abraham Peter Abraham
Author Profile Icon Peter Abraham
Peter Abraham
Praseed Pai Praseed Pai
Author Profile Icon Praseed Pai
Praseed Pai
Arrow right icon
View More author details
Toc

Table of Contents (15) Chapters Close

Preface 1. Reactive Programming Model – Overview and History FREE CHAPTER 2. A Tour of Modern C++ and its Key Idioms 3. Language-Level Concurrency and Parallelism in C++ 4. Asynchronous and Lock-Free Programming in C++ 5. Introduction to Observables 6. Introduction to Event Stream Programming Using C++ 7. Introduction to Data Flow Computation and the RxCpp Library 8. RxCpp – the Key Elements 9. Reactive GUI Programming Using Qt/C++ 10. Creating Custom Operators in RxCpp 11. Design Patterns and Idioms for C++ Rx Programming 12. Reactive Microservices Using C++ 13. Advanced Streams and Handling Errors 14. Other Books You May Enjoy

What this book covers

Chapter 1, Reactive Programming Model – Overview and History, takes a look at the various event handling techniques implemented by GUI toolkits such as Windows API, XLib API, Qt, and MFC. This chapter also introduces some key data structures of the Rx programming model in the context of writing cross platform Console applications and GUI applications using the MFC library.

Chapter 2, A Tour of Modern C++ and its Key Idioms, covers the Modern C++ constructs necessary for writing reactive programs. The chapter focuses on new C++ features, type inference, variadic templates, rvalue references, move semantics, lambda functions, elementary functional programming, pipeable operators, implementation of iterators, and observers.

Chapter 3, Language-Level Concurrency and Parallelism in C++, discusses the threading library available with the C++ standard. You will learn how to launch and manage a thread. We will discuss different aspects of the threading library. This chapter lays a good foundation for concurrency support introduced in Modern C++.

Chapter 4, Asynchronous and Lock-Free Programming in C++, discusses the facilities provided by the standard library for implementing task-based parallelism. It also discusses the new multithreading-aware memory model that is available with the modern C++ language.

 Chapter 5, Introduction to Observables, talks about the GoF Observer pattern and explains its shortcomings. You will learn how to transform a program which implements the GoF Composite/Visitor pattern to Observable streams, using a technique devised by us, in the context of modelling an expression tree.

Chapter 6, Introduction to Event Stream Programming Using C++, focuses on the topic of Event Stream programming. We will also look at the Streamulus library, which provides a Domain Specific Embedded Language (DSEL) approach to the manipulation of event Streams.

Chapter 7, Introduction to Data Flow Computation and the RxCpp Library, starts with a conceptual overview of the data flow computing paradigm and moves quickly to writing some basic RxCpp-based programs. You will learn about the set of operators supported by the RxCpp library.

Chapter 8,  RxCpp – the Key Elements, gives you an understanding of how pieces of the Rx programming fit together in the context of Rx programming model in general and RxCpp library in particular. The topics covered in detail are Observables, Observer, Operators, Subscribers, Schedulers (five key elements of the Rx programming model).

Chapter 9, Reactive GUI Programming Using Qt/C++, deals with the topic of reactive GUI programming using the Qt framework. You will learn about concepts in the Qt framework, such as Qt object hierarchy, meta-object system, signals, and slots. Finally, you will write an application to handle mouse events and filter them in a reactive way using the RxCpp library.

Chapter 10, Creating Custom Operators in RxCpp, covers the advanced topic of how we can  create custom reactive operators in RxCpp, should an existing set of Operators not suffice for the purpose. We cover how to leverage Lift Meta Operator and adding Operators to the RxCpp library. This topic also helps you create Composite Operators by composing existing Operators.

Chapter 11, Design Patterns and Idioms for C++ Rx Programming, delves into the wonderful world of design patterns and idioms. Starting with GOF design patterns, we will move on to reactive programming patterns. We will cover Composite/Visitor/Iterator (from GoF catalogue), Active Object, Cell, Resource Loan, and the Event Bus Pattern.

Chapter 12, Reactive Microservices Using C++, covers how the Rx programming model can be used to write reactive microservices using C++. It introduces you to the Microsoft C++ REST SDK and its programming model. You will learn how to leverage the RxCpp library to write aggregate services and access HTTP based services in a reactive manner.

Chapter 13, Advanced Streams and Handling Errors, discusses error handling in RxCpp, along with some of the advanced constructs and Operators that handle Streams in the RxCpp library. We will discuss how to continue Streams when an error comes, how to wait for the producer of the Stream to correct the error and continue the sequence, and how to perform common operations that are applicable to both success and error paths.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime