TPL Dataflow by Example
$9.95
Minimum price
$9.95
Suggested price

TPL Dataflow by Example

Dataflow and Reactive Programming in .Net

About the Book

The TPL Dataflow Library allows you to design asynchronous Actor and Dataflow based applications. While similar to Microsoft's Reactive Extensions, it goes far beyond what is offered by Rx with a more generalized abstraction to build all types of stream based applications. It does not force you to use IObservable and LINQ, data is simply a stream.

Messages transmit data from one block to another over links. Blocks handle the details of multithreading and execute anytime they receive data. All you have to think about is programming the blocks to do what you want. Focus on the problem domain not asynchronous details.

Downloadable code examples are used throughout the book to explain the library with a hands-on approach (ftp://DataflowBook.com).

For a complete understanding of dataflow theory and application, please see my other book "Dataflow and Reactive Programming Systems". While chapter two of this book is included in my other book, it does not contain best practices and program design tips specific to TPL Dataflow.

About the Author

Matt Carkci
Matt Carkci

Matt Carkci has a Bachelor of Science degree in Electronic Engineering and over two decades of experience developing software in C/C++, C#, Java and Haskell. He has worked for government contractors, private corporations and has started a business or two but now spends his time researching and writing about interesting technologies. All proceeds go to feeding his ravenous 80 lb. puppy that never seems to get full.

Visit his site at http://deepFriedCode.com

Bundles that include this book

$39.90
Bought separately
$25.95
Bundle Price

Table of Contents

  • Other Dataflow Books
  • Code Examples
  • 1 Getting Started
    • 1.1 What is TPL Dataflow
    • 1.2 What is Dataflow
    • 1.3 Where is Dataflow Used?
    • 1.4 TPL Dataflow vs. Rx
    • 1.5 Installing TPL Dataflow
  • 2 TPL Dataflow Basics
    • 2.1 Blocks
      • 2.1.1 Execution Blocks
        • 2.1.1.1 ActionBlock<T>
        • 2.1.1.2 TransformBlock<T1,T2>
        • 2.1.1.3 Block Configuration
        • 2.1.1.4 Execution Block Options
      • 2.1.2 Buffering Blocks
        • 2.1.2.1 BufferBlock<T>
        • 2.1.2.2 BroadcastBlock<T>
        • 2.1.2.3 WriteOnceBlock<T>
        • 2.1.2.4 DataflowBlockOptions
      • 2.1.3 Grouping Blocks
        • 2.1.3.1 BatchBlock<T>
        • 2.1.3.2 JoinBlock<T1,T2>
        • 2.1.3.3 BatchedJoinBlock<T1,T2>
        • 2.1.3.4 GroupingDataflowBlockOptions
      • 2.1.4 Block Completion
    • 2.2 Links
      • 2.2.1 DataflowLinkOptions
  • 3 Using TPL Dataflow
    • 3.1 A Generator Block
    • 3.2 How Messages are Transmitted
    • 3.3 Runtime Modification
    • 3.4 Maintaining State Inside an Execution Block
    • 3.5 Converting a Stateful Block to be Stateless
  • 4 Dataflow Program Design
    • 4.1 Block Design
      • 4.1.1 Design for Reuse
      • 4.1.2 Create Blocks from Scratch only when Necessary
      • 4.1.3 Develop Your Own Block Interface
      • 4.1.4 Careful with Retaining State in Blocks
    • 4.2 Favor Application Specific Blocks Over Predefined Blocks
    • 4.3 Avoid Excess Synchronization and Blocks
    • 4.4 Dealing with Loops and Cycles
    • 4.5 Prevent Large Buffers
    • 4.6 Data Should be Immutable
    • 4.7 Use SingleProducerConstrained if Possible

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earnedover $14 millionwriting, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub