Supercharge your apps with TPL DataflowPresented By Louis Berman, Neudesic RPD CAD / Northeast
void Me() { Print(“Louis Berman”); Me(); }
• 30+ years professional development experience• Current Job: Neudesic RPD CAD / Northeast• Co-founded four different tech firms; usually CTO
• Also CTO at GiftCertificates.com and Kideo.com• Code Camp == significant part of my formal training
• PhillyDotNet and NYC .NET too!!• Left theatrical design to code; theater
isn’t as creative as software development (really!!)• Led the very first visual observation of Eris: the
largest dwarf planet in our solar system• Blog: http://squideyes.com• Email: [email protected]
We’re Hiring!!
• True Story: I got my Neudesic job by all-but hecklingmy future boss while he was presenting at PhillyDotNet
• It pays to ask good, even tough, questions• Be kind / respectful (I’m not as nice or smart as John Petersen)
• Good: http://www.neudesic.com/careers• Better: [email protected] or 215-316-8538• Best: dude . . . I’m standing right here in front of you!!
Becoming a Blockhead
• Buffering Blocks• BufferBlock, BroadcastBlock, WriteOnceBlock
• Execution Blocks• ActionBlock, TransfromBlock, TransformManyBlock
• Grouping Blocks• BatchBlock, JoinBlock, BatchedJoinBlock
• Custom Blocks• Roll your own (i.e. Sliding Window Dataflow Block)
Figuring The Options
• Options• ExecutionDataflowBlockOptions • DataflowBlockOptions• GroupingDataflowBlockOptions
• Most-Used Option Properties• BoundedCapacity• MaxDegreeOfParallelism• CancellationToken• MaxMessagePerTask
• LinkTo• Using Lambda Expressions• DataflowBlock.NullTarget<SomeType>()
Show Me Some Code, Dammit!
• Lot’s and lots of demos• I borrowed (OK, stole!) a bunch of demo code from Mike Heydt,
who I’d like to formally thank (and/or apologize to!) here • Most of the walkthroughs and demos have been rendered
as LINQPad 4-compatible LINQ Query Files• Be sure to retain the folder structure when unzipping• Also need to download My Extensions
• The PodFetch “Astronomy Picture of the Day”downloader may be downloaded from GitHub
• The LogFlow logging library, plus a related demomay be downloaded from GitHub
42spikes.com (Mike Heydt)
• Great intro to TDF Workflow• TDF #0: Introduction to Task Parallel Dataflow Library• TDF #1: The Basics of ActionBlock• TDF #2: Basic Concurrency with ActionBlocks• TDF #3: Using BufferBlock and LinkTo to Route Data• TDF #4: The WriteOnceBlock• TDF #5: BroadcastBlock• TDF #6: Using the TransformBlock to Modify Data in the Network
• Scatter and Gather• A First Pattern of TPL: Scatter And Gather• Cancellation by Polling• Scatter & Gather w/Timeout (Guarding with Task.Delay)• Scatter & Gather w/Timeout (Adding Cancellation)
• Miscellaneous• Code from Philly.NET Session on Concurrency
• NDC 2013 Concurrency Talk• NDC 2013 Concurrency Talk Content• Concurrent and High-Performance Programming in.NET with TPL, async/await, and Dataflow
Other Resources
• Microsoft• Dataflow (Task Parallel Library)
• NuGet• TPL Dataflow NuGet Package
• YouTube• Tutorial: Creating a Dataflow• Stephen Toub: Inside TPL Dataflow
• Stephen Cleary• Introduction to Dataflow, Part 1 • Introduction to Dataflow, Part 2• Introduction to Dataflow, Part 3• Async Producer/Consumer Queue using Dataflow
I Repeat: We’re Hiring!!
• Good: http://www.neudesic.com/careers• Better: [email protected] or 215-316-8538• Best: dude . . . I’m standing right here in front of you!!
• Bes sure to ask me for a nifty brochure
Top Related