Copyright by Gastón C. Hillar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

O'Reilly logo

Chapter 6. PLINQ: Declarative Data Parallelism

WHAT'S IN THIS CHAPTER?

  • Transforming LINQ into parallelized LINQ

  • Understanding partitioning in PLINQ

  • Performing reduction operations with PLINQ

  • Creating custom PLINQ aggregate functions

  • Working with concurrent PLINQ tasks

  • Cancelling PLINQ and measuring its scalability

  • Specifying the desired degree of parallelism

  • Working with ForAll and understanding how it differs from foreach

  • Configuring how PLINQ results are returned by using WithMergeOptions

  • Handling exceptions thrown by PLINQ

  • Using PLINQ to execute Map Reduce algorithms

This chapter explains how to work with declarative data parallelism and a mix of task and data decomposition using Parallel Language Integrated Query (PLINQ). It is very important to understand all the things explained in the previous chapters before reading this one, because this chapter combines many of the topics studied before.

This chapter explains how to transform a LINQ query into a PLINQ query and the different techniques to tune its parallel execution according to different scenarios. In addition, it explains the execution of the classic parallel Map Reduce algorithms using PLINQ and its aggregate functions. Sometimes, PLINQ doesn't offer the results that developers expected. Therefore, it is also important to understand the potential performance bottlenecks and the different ways to solve them.

TRANSFORMING LINQ INTO PLINQ

You already know that Language Integrated Query (LINQ) is very useful to query and process different ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required