SlideShare une entreprise Scribd logo
1  sur  15
Developer Conference 2011
    MICROSOFT USER GROUP KOLKATA
TPL
Task Parallel Library^ – Data Flow
Tasks
Sankarsan Bose
12th November , 2011
Parallel Programming As It Evolves

- Higher level constructs to handle pipeline
  scenarios
                                           - Earlier
                                             DevLabs
                                           - CTP
            Data Flow Tasks             .NET 4.5 Preview 1


  Coordination Data        Task Parallel   Parallel
      Structure              Library       Programming in
                                           .NET 4.0
                 Threads                    Till .NET 3.5 to ta
                                            Care of concurrency
                                            requirements
Pipelines And Data Flow Networks

- A linear series of producer/consumer stages
   - Output of one stage -> Input of another
- Stages of pipeline are supposed to process input in

  specified order
- Data Flow networks are more general form of
  pipelines
Input   Stage1            Stage 2         Stage N       Output
Image Pipeline – An Example


         Input
         Image



                    Load Image
                                         Original Image s


                    Scale Image



                    Filter Image
       Thumbnails
                                         Filtered Images
                      Display
                      Image

 This is sequential… How it makes sense in Parallel
 World???
Image Pipeline – An Example (Contd..)


                 Image1    Image2    Image3        Image4            Image5
   Load

                           Image1        Image2    Image3            Image4        Image5
  Scale


  Filter                             Image1            Image2        Image3        Image4   Image5




                                                       Image1        Image2        Image3   Image4   Image5
  Display

            t0            t1        t2            t3            t4            t5      t6      t7
What type of tasks Stages Can Do?

- Receive an input and process it.
- Receive an input, buffer it and send it to another
  stage
- Receive an input, transform the input and send the
  output to another stage
- Receive input from multiple stages and join/combine
  the inputs to produce the output
TPL DataFlow Blocks
                                 IDataFlowBloc
- Stages should be able                k
  - Handle input
                          ISourceBlock     ITargetBlock
  - Produce output
  - Buffer data
  - Perform Processing
- Stages are modeled as Data Flow Blocks
- Data Flow Blocks can be
  - Source Block – Generate data
  - Target Block - Accept data
TPL DataFlow Blocks(Contd..)

- Built-In Data Flow Blocks
  - Buffering Blocks
     - BufferedBlock
     - BroadCastBlock
  - Executor Blocks
     - ActionBlock
     - TransformBlock
     - TransformManyBlock
  - Join Blocks
     - JoinBlock
     - BatchBlock

Let’s Go To The Code….
Built In Data Flow Blocks

  Input                     ActionBlock
                                          Task




          Input             BufferBlock
                                                 Original
                                          Task


          Input         BroadcastBlock             Copy
                                          Task     Copy

                                                 Copy
                       TransformBlock
          Input
                              Tas
                                                  Output
                               k


          Input             JoinBlock

          1                  Tas                 Output
                              k
          Input
          2
Image Processing Program




Image Processing Program…Let’s Build a
Skeletal Code
References

- Parallel Programming with Microsoft Visual C++ by
  Colin Campbell and Ade Miller
- Patterns Of Parallel Programming by Stephen Toub
- Introduction To TPL DataFlow by Stepehen Toub
- Samples in http://parallelpatterns.codeplex.com/
Thanks Everybody, For Your
Time. Coding…..Enjoy Learning..
Happy
Speaker Details/Contact




- http://twitter.com/sankarsan
- http://sankarsan.wordpress.com
- http://codingndesign.com
- http://sankarsanbose.com
Dev con kolkata 2011   tpl dataflows

Contenu connexe

Tendances (8)

C++ l 1
C++ l 1C++ l 1
C++ l 1
 
C- language Lecture 8
C- language Lecture 8C- language Lecture 8
C- language Lecture 8
 
Frp
FrpFrp
Frp
 
Erlang
ErlangErlang
Erlang
 
System Programming Unit III
System Programming Unit IIISystem Programming Unit III
System Programming Unit III
 
Intro
IntroIntro
Intro
 
Peephole Optimization
Peephole OptimizationPeephole Optimization
Peephole Optimization
 
Understanding Coroutine
Understanding CoroutineUnderstanding Coroutine
Understanding Coroutine
 

En vedette

Image Search Engine Frequently Asked Questions
Image Search Engine Frequently Asked QuestionsImage Search Engine Frequently Asked Questions
Image Search Engine Frequently Asked Questionsakvalex
 
4 ap job integration adaptation pwd hr
4 ap job integration adaptation pwd hr4 ap job integration adaptation pwd hr
4 ap job integration adaptation pwd hrAlberto Mico
 
Assessment of rainfall intensity on temporal water quality of awba dam
Assessment of rainfall intensity on temporal water quality of awba damAssessment of rainfall intensity on temporal water quality of awba dam
Assessment of rainfall intensity on temporal water quality of awba damAlexander Decker
 
A universal model for managing the marketing executives in nigerian banks
A universal model for managing the marketing executives in nigerian banksA universal model for managing the marketing executives in nigerian banks
A universal model for managing the marketing executives in nigerian banksAlexander Decker
 
Primerascivilizaciones 100409071541-phpapp02
Primerascivilizaciones 100409071541-phpapp02Primerascivilizaciones 100409071541-phpapp02
Primerascivilizaciones 100409071541-phpapp02Alejandro Peña
 
A usability evaluation framework for b2 c e commerce websites
A usability evaluation framework for b2 c e commerce websitesA usability evaluation framework for b2 c e commerce websites
A usability evaluation framework for b2 c e commerce websitesAlexander Decker
 
A validation of the adverse childhood experiences scale in
A validation of the adverse childhood experiences scale inA validation of the adverse childhood experiences scale in
A validation of the adverse childhood experiences scale inAlexander Decker
 
Abnormalities of hormones and inflammatory cytokines in women affected with p...
Abnormalities of hormones and inflammatory cytokines in women affected with p...Abnormalities of hormones and inflammatory cytokines in women affected with p...
Abnormalities of hormones and inflammatory cytokines in women affected with p...Alexander Decker
 

En vedette (9)

Image Search Engine Frequently Asked Questions
Image Search Engine Frequently Asked QuestionsImage Search Engine Frequently Asked Questions
Image Search Engine Frequently Asked Questions
 
4 ap job integration adaptation pwd hr
4 ap job integration adaptation pwd hr4 ap job integration adaptation pwd hr
4 ap job integration adaptation pwd hr
 
Assessment of rainfall intensity on temporal water quality of awba dam
Assessment of rainfall intensity on temporal water quality of awba damAssessment of rainfall intensity on temporal water quality of awba dam
Assessment of rainfall intensity on temporal water quality of awba dam
 
How WanaMo Works
How WanaMo WorksHow WanaMo Works
How WanaMo Works
 
A universal model for managing the marketing executives in nigerian banks
A universal model for managing the marketing executives in nigerian banksA universal model for managing the marketing executives in nigerian banks
A universal model for managing the marketing executives in nigerian banks
 
Primerascivilizaciones 100409071541-phpapp02
Primerascivilizaciones 100409071541-phpapp02Primerascivilizaciones 100409071541-phpapp02
Primerascivilizaciones 100409071541-phpapp02
 
A usability evaluation framework for b2 c e commerce websites
A usability evaluation framework for b2 c e commerce websitesA usability evaluation framework for b2 c e commerce websites
A usability evaluation framework for b2 c e commerce websites
 
A validation of the adverse childhood experiences scale in
A validation of the adverse childhood experiences scale inA validation of the adverse childhood experiences scale in
A validation of the adverse childhood experiences scale in
 
Abnormalities of hormones and inflammatory cytokines in women affected with p...
Abnormalities of hormones and inflammatory cytokines in women affected with p...Abnormalities of hormones and inflammatory cytokines in women affected with p...
Abnormalities of hormones and inflammatory cytokines in women affected with p...
 

Similaire à Dev con kolkata 2011 tpl dataflows

Synapse 2018 Guarding against failure in a hundred step pipeline
Synapse 2018 Guarding against failure in a hundred step pipelineSynapse 2018 Guarding against failure in a hundred step pipeline
Synapse 2018 Guarding against failure in a hundred step pipelineCalvin French-Owen
 
Zero-Copy Event-Driven Servers with Netty
Zero-Copy Event-Driven Servers with NettyZero-Copy Event-Driven Servers with Netty
Zero-Copy Event-Driven Servers with NettyDaniel Bimschas
 
SD, a P2P bug tracking system
SD, a P2P bug tracking systemSD, a P2P bug tracking system
SD, a P2P bug tracking systemJesse Vincent
 
[Harvard CS264] 03 - Introduction to GPU Computing, CUDA Basics
[Harvard CS264] 03 - Introduction to GPU Computing, CUDA Basics[Harvard CS264] 03 - Introduction to GPU Computing, CUDA Basics
[Harvard CS264] 03 - Introduction to GPU Computing, CUDA Basicsnpinto
 
Presentation systemc
Presentation systemcPresentation systemc
Presentation systemcSUBRAHMANYA S
 
Introduction to Apache Flink at Vienna Meet Up
Introduction to Apache Flink at Vienna Meet UpIntroduction to Apache Flink at Vienna Meet Up
Introduction to Apache Flink at Vienna Meet UpStefan Papp
 
Perfomance tuning on Go 2.0
Perfomance tuning on Go 2.0Perfomance tuning on Go 2.0
Perfomance tuning on Go 2.0Yogi Kulkarni
 
Learning Stream Processing with Apache Storm
Learning Stream Processing with Apache StormLearning Stream Processing with Apache Storm
Learning Stream Processing with Apache StormEugene Dvorkin
 
What’s Slowing Down Your Kafka Pipeline? With Ruizhe Cheng and Pete Stevenson...
What’s Slowing Down Your Kafka Pipeline? With Ruizhe Cheng and Pete Stevenson...What’s Slowing Down Your Kafka Pipeline? With Ruizhe Cheng and Pete Stevenson...
What’s Slowing Down Your Kafka Pipeline? With Ruizhe Cheng and Pete Stevenson...HostedbyConfluent
 
FlinkForward Asia 2019 - Evolving Keystone to an Open Collaborative Real Time...
FlinkForward Asia 2019 - Evolving Keystone to an Open Collaborative Real Time...FlinkForward Asia 2019 - Evolving Keystone to an Open Collaborative Real Time...
FlinkForward Asia 2019 - Evolving Keystone to an Open Collaborative Real Time...Zhenzhong Xu
 
Workshop NGS data analysis - 1
Workshop NGS data analysis - 1Workshop NGS data analysis - 1
Workshop NGS data analysis - 1Maté Ongenaert
 
Java EE 7 with Apache Spark for the World’s Largest Credit Card Core Systems ...
Java EE 7 with Apache Spark for the World’s Largest Credit Card Core Systems ...Java EE 7 with Apache Spark for the World’s Largest Credit Card Core Systems ...
Java EE 7 with Apache Spark for the World’s Largest Credit Card Core Systems ...Hirofumi Iwasaki
 
Tale of two streaming frameworks- Apace Storm & Apache Flink
Tale of two streaming frameworks- Apace Storm & Apache FlinkTale of two streaming frameworks- Apace Storm & Apache Flink
Tale of two streaming frameworks- Apace Storm & Apache FlinkKarthik Deivasigamani
 
Tale of two streaming frameworks (Karthik D - Walmart)
Tale of two streaming frameworks (Karthik D - Walmart)Tale of two streaming frameworks (Karthik D - Walmart)
Tale of two streaming frameworks (Karthik D - Walmart)KafkaZone
 
Apache Flink@ Strata & Hadoop World London
Apache Flink@ Strata & Hadoop World LondonApache Flink@ Strata & Hadoop World London
Apache Flink@ Strata & Hadoop World LondonStephan Ewen
 
Kernel Recipes 2015: Solving the Linux storage scalability bottlenecks
Kernel Recipes 2015: Solving the Linux storage scalability bottlenecksKernel Recipes 2015: Solving the Linux storage scalability bottlenecks
Kernel Recipes 2015: Solving the Linux storage scalability bottlenecksAnne Nicolas
 
Os Worthington
Os WorthingtonOs Worthington
Os Worthingtonoscon2007
 
Perf onjs final
Perf onjs finalPerf onjs final
Perf onjs finalqi yang
 

Similaire à Dev con kolkata 2011 tpl dataflows (20)

Synapse 2018 Guarding against failure in a hundred step pipeline
Synapse 2018 Guarding against failure in a hundred step pipelineSynapse 2018 Guarding against failure in a hundred step pipeline
Synapse 2018 Guarding against failure in a hundred step pipeline
 
Zero-Copy Event-Driven Servers with Netty
Zero-Copy Event-Driven Servers with NettyZero-Copy Event-Driven Servers with Netty
Zero-Copy Event-Driven Servers with Netty
 
SD, a P2P bug tracking system
SD, a P2P bug tracking systemSD, a P2P bug tracking system
SD, a P2P bug tracking system
 
[Harvard CS264] 03 - Introduction to GPU Computing, CUDA Basics
[Harvard CS264] 03 - Introduction to GPU Computing, CUDA Basics[Harvard CS264] 03 - Introduction to GPU Computing, CUDA Basics
[Harvard CS264] 03 - Introduction to GPU Computing, CUDA Basics
 
Presentation systemc
Presentation systemcPresentation systemc
Presentation systemc
 
Introduction to Apache Flink at Vienna Meet Up
Introduction to Apache Flink at Vienna Meet UpIntroduction to Apache Flink at Vienna Meet Up
Introduction to Apache Flink at Vienna Meet Up
 
Perfomance tuning on Go 2.0
Perfomance tuning on Go 2.0Perfomance tuning on Go 2.0
Perfomance tuning on Go 2.0
 
Learning Stream Processing with Apache Storm
Learning Stream Processing with Apache StormLearning Stream Processing with Apache Storm
Learning Stream Processing with Apache Storm
 
What’s Slowing Down Your Kafka Pipeline? With Ruizhe Cheng and Pete Stevenson...
What’s Slowing Down Your Kafka Pipeline? With Ruizhe Cheng and Pete Stevenson...What’s Slowing Down Your Kafka Pipeline? With Ruizhe Cheng and Pete Stevenson...
What’s Slowing Down Your Kafka Pipeline? With Ruizhe Cheng and Pete Stevenson...
 
Bigdata roundtable-storm
Bigdata roundtable-stormBigdata roundtable-storm
Bigdata roundtable-storm
 
FlinkForward Asia 2019 - Evolving Keystone to an Open Collaborative Real Time...
FlinkForward Asia 2019 - Evolving Keystone to an Open Collaborative Real Time...FlinkForward Asia 2019 - Evolving Keystone to an Open Collaborative Real Time...
FlinkForward Asia 2019 - Evolving Keystone to an Open Collaborative Real Time...
 
Workshop NGS data analysis - 1
Workshop NGS data analysis - 1Workshop NGS data analysis - 1
Workshop NGS data analysis - 1
 
Java EE 7 with Apache Spark for the World’s Largest Credit Card Core Systems ...
Java EE 7 with Apache Spark for the World’s Largest Credit Card Core Systems ...Java EE 7 with Apache Spark for the World’s Largest Credit Card Core Systems ...
Java EE 7 with Apache Spark for the World’s Largest Credit Card Core Systems ...
 
Tale of two streaming frameworks- Apace Storm & Apache Flink
Tale of two streaming frameworks- Apace Storm & Apache FlinkTale of two streaming frameworks- Apace Storm & Apache Flink
Tale of two streaming frameworks- Apace Storm & Apache Flink
 
Tale of two streaming frameworks (Karthik D - Walmart)
Tale of two streaming frameworks (Karthik D - Walmart)Tale of two streaming frameworks (Karthik D - Walmart)
Tale of two streaming frameworks (Karthik D - Walmart)
 
Apache Flink@ Strata & Hadoop World London
Apache Flink@ Strata & Hadoop World LondonApache Flink@ Strata & Hadoop World London
Apache Flink@ Strata & Hadoop World London
 
LINQ/PLINQ
LINQ/PLINQLINQ/PLINQ
LINQ/PLINQ
 
Kernel Recipes 2015: Solving the Linux storage scalability bottlenecks
Kernel Recipes 2015: Solving the Linux storage scalability bottlenecksKernel Recipes 2015: Solving the Linux storage scalability bottlenecks
Kernel Recipes 2015: Solving the Linux storage scalability bottlenecks
 
Os Worthington
Os WorthingtonOs Worthington
Os Worthington
 
Perf onjs final
Perf onjs finalPerf onjs final
Perf onjs final
 

Plus de Abhishek Sur

Azure servicefabric
Azure servicefabricAzure servicefabric
Azure servicefabricAbhishek Sur
 
Building a bot with an intent
Building a bot with an intentBuilding a bot with an intent
Building a bot with an intentAbhishek Sur
 
C# 7.0 Hacks and Features
C# 7.0 Hacks and FeaturesC# 7.0 Hacks and Features
C# 7.0 Hacks and FeaturesAbhishek Sur
 
Angular JS, A dive to concepts
Angular JS, A dive to conceptsAngular JS, A dive to concepts
Angular JS, A dive to conceptsAbhishek Sur
 
Stream Analytics Service in Azure
Stream Analytics Service in AzureStream Analytics Service in Azure
Stream Analytics Service in AzureAbhishek Sur
 
Designing azure compute and storage infrastructure
Designing azure compute and storage infrastructureDesigning azure compute and storage infrastructure
Designing azure compute and storage infrastructureAbhishek Sur
 
Working with Azure Resource Manager Templates
Working with Azure Resource Manager TemplatesWorking with Azure Resource Manager Templates
Working with Azure Resource Manager TemplatesAbhishek Sur
 
F12 debugging in Ms edge
F12 debugging in Ms edgeF12 debugging in Ms edge
F12 debugging in Ms edgeAbhishek Sur
 
Mobile Services for Windows Azure
Mobile Services for Windows AzureMobile Services for Windows Azure
Mobile Services for Windows AzureAbhishek Sur
 
Service bus to build Bridges
Service bus to build BridgesService bus to build Bridges
Service bus to build BridgesAbhishek Sur
 
Windows azure pack overview
Windows azure pack overviewWindows azure pack overview
Windows azure pack overviewAbhishek Sur
 
AMicrosoft azure hyper v recovery manager overview
AMicrosoft azure hyper v recovery manager overviewAMicrosoft azure hyper v recovery manager overview
AMicrosoft azure hyper v recovery manager overviewAbhishek Sur
 
Di api di server b1 ws
Di api di server b1 wsDi api di server b1 ws
Di api di server b1 wsAbhishek Sur
 
Integrating cortana with wp8 app
Integrating cortana with wp8 appIntegrating cortana with wp8 app
Integrating cortana with wp8 appAbhishek Sur
 
Asp.net performance
Asp.net performanceAsp.net performance
Asp.net performanceAbhishek Sur
 
Introduction to XAML and its features
Introduction to XAML and its featuresIntroduction to XAML and its features
Introduction to XAML and its featuresAbhishek Sur
 
SQL Server2012 Enhancements
SQL Server2012 EnhancementsSQL Server2012 Enhancements
SQL Server2012 EnhancementsAbhishek Sur
 
Dev days Visual Studio 2012 Enhancements
Dev days Visual Studio 2012 EnhancementsDev days Visual Studio 2012 Enhancements
Dev days Visual Studio 2012 EnhancementsAbhishek Sur
 
Hidden Facts of .NET Language Gems
Hidden Facts of .NET Language GemsHidden Facts of .NET Language Gems
Hidden Facts of .NET Language GemsAbhishek Sur
 

Plus de Abhishek Sur (20)

Azure servicefabric
Azure servicefabricAzure servicefabric
Azure servicefabric
 
Building a bot with an intent
Building a bot with an intentBuilding a bot with an intent
Building a bot with an intent
 
Code review
Code reviewCode review
Code review
 
C# 7.0 Hacks and Features
C# 7.0 Hacks and FeaturesC# 7.0 Hacks and Features
C# 7.0 Hacks and Features
 
Angular JS, A dive to concepts
Angular JS, A dive to conceptsAngular JS, A dive to concepts
Angular JS, A dive to concepts
 
Stream Analytics Service in Azure
Stream Analytics Service in AzureStream Analytics Service in Azure
Stream Analytics Service in Azure
 
Designing azure compute and storage infrastructure
Designing azure compute and storage infrastructureDesigning azure compute and storage infrastructure
Designing azure compute and storage infrastructure
 
Working with Azure Resource Manager Templates
Working with Azure Resource Manager TemplatesWorking with Azure Resource Manager Templates
Working with Azure Resource Manager Templates
 
F12 debugging in Ms edge
F12 debugging in Ms edgeF12 debugging in Ms edge
F12 debugging in Ms edge
 
Mobile Services for Windows Azure
Mobile Services for Windows AzureMobile Services for Windows Azure
Mobile Services for Windows Azure
 
Service bus to build Bridges
Service bus to build BridgesService bus to build Bridges
Service bus to build Bridges
 
Windows azure pack overview
Windows azure pack overviewWindows azure pack overview
Windows azure pack overview
 
AMicrosoft azure hyper v recovery manager overview
AMicrosoft azure hyper v recovery manager overviewAMicrosoft azure hyper v recovery manager overview
AMicrosoft azure hyper v recovery manager overview
 
Di api di server b1 ws
Di api di server b1 wsDi api di server b1 ws
Di api di server b1 ws
 
Integrating cortana with wp8 app
Integrating cortana with wp8 appIntegrating cortana with wp8 app
Integrating cortana with wp8 app
 
Asp.net performance
Asp.net performanceAsp.net performance
Asp.net performance
 
Introduction to XAML and its features
Introduction to XAML and its featuresIntroduction to XAML and its features
Introduction to XAML and its features
 
SQL Server2012 Enhancements
SQL Server2012 EnhancementsSQL Server2012 Enhancements
SQL Server2012 Enhancements
 
Dev days Visual Studio 2012 Enhancements
Dev days Visual Studio 2012 EnhancementsDev days Visual Studio 2012 Enhancements
Dev days Visual Studio 2012 Enhancements
 
Hidden Facts of .NET Language Gems
Hidden Facts of .NET Language GemsHidden Facts of .NET Language Gems
Hidden Facts of .NET Language Gems
 

Dernier

Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...panagenda
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightSafe Software
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfSrushith Repakula
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingScyllaDB
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024Lorenzo Miniero
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!Memoori
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...ScyllaDB
 
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?Paolo Missier
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data SciencePaolo Missier
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceSamy Fodil
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentationyogeshlabana357357
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe中 央社
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuidePixlogix Infotech
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsLeah Henrickson
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireExakis Nelite
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptxFIDO Alliance
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGDSC PJATK
 
UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewDianaGray10
 
Generative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfGenerative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfalexjohnson7307
 

Dernier (20)

Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
 
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data Science
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate Guide
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
Overview of Hyperledger Foundation
Overview of Hyperledger FoundationOverview of Hyperledger Foundation
Overview of Hyperledger Foundation
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overview
 
Generative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfGenerative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdf
 

Dev con kolkata 2011 tpl dataflows

  • 1. Developer Conference 2011 MICROSOFT USER GROUP KOLKATA
  • 2. TPL Task Parallel Library^ – Data Flow Tasks Sankarsan Bose 12th November , 2011
  • 3. Parallel Programming As It Evolves - Higher level constructs to handle pipeline scenarios - Earlier DevLabs - CTP Data Flow Tasks .NET 4.5 Preview 1 Coordination Data Task Parallel Parallel Structure Library Programming in .NET 4.0 Threads Till .NET 3.5 to ta Care of concurrency requirements
  • 4. Pipelines And Data Flow Networks - A linear series of producer/consumer stages - Output of one stage -> Input of another - Stages of pipeline are supposed to process input in specified order - Data Flow networks are more general form of pipelines Input Stage1 Stage 2 Stage N Output
  • 5. Image Pipeline – An Example Input Image Load Image Original Image s Scale Image Filter Image Thumbnails Filtered Images Display Image This is sequential… How it makes sense in Parallel World???
  • 6. Image Pipeline – An Example (Contd..) Image1 Image2 Image3 Image4 Image5 Load Image1 Image2 Image3 Image4 Image5 Scale Filter Image1 Image2 Image3 Image4 Image5 Image1 Image2 Image3 Image4 Image5 Display t0 t1 t2 t3 t4 t5 t6 t7
  • 7. What type of tasks Stages Can Do? - Receive an input and process it. - Receive an input, buffer it and send it to another stage - Receive an input, transform the input and send the output to another stage - Receive input from multiple stages and join/combine the inputs to produce the output
  • 8. TPL DataFlow Blocks IDataFlowBloc - Stages should be able k - Handle input ISourceBlock ITargetBlock - Produce output - Buffer data - Perform Processing - Stages are modeled as Data Flow Blocks - Data Flow Blocks can be - Source Block – Generate data - Target Block - Accept data
  • 9. TPL DataFlow Blocks(Contd..) - Built-In Data Flow Blocks - Buffering Blocks - BufferedBlock - BroadCastBlock - Executor Blocks - ActionBlock - TransformBlock - TransformManyBlock - Join Blocks - JoinBlock - BatchBlock Let’s Go To The Code….
  • 10. Built In Data Flow Blocks Input ActionBlock Task Input BufferBlock Original Task Input BroadcastBlock Copy Task Copy Copy TransformBlock Input Tas Output k Input JoinBlock 1 Tas Output k Input 2
  • 11. Image Processing Program Image Processing Program…Let’s Build a Skeletal Code
  • 12. References - Parallel Programming with Microsoft Visual C++ by Colin Campbell and Ade Miller - Patterns Of Parallel Programming by Stephen Toub - Introduction To TPL DataFlow by Stepehen Toub - Samples in http://parallelpatterns.codeplex.com/
  • 13. Thanks Everybody, For Your Time. Coding…..Enjoy Learning.. Happy
  • 14. Speaker Details/Contact - http://twitter.com/sankarsan - http://sankarsan.wordpress.com - http://codingndesign.com - http://sankarsanbose.com