LINQ & PLINQ (Parallel) Language Integrated Query.

Slides:



Advertisements
Similar presentations
Developer Knowledge Sharing Eric Sun Dec, What programming language did you learn in school and since then? Now, its time to refresh …
Advertisements

The Microsoft Technical Roadshow 2007 Language Enhancements and LINQ Daniel Moth Developer & Platform Group Microsoft Ltd
LINQ to objects. Datenmodell Zugriffsklasse Einfache Abfrage IEnumerable booksList = SampleDataAccess.DBooks.Select(b => b); Select(...) Book => object.
LINQ (Language Integrated Query)
Deep Dive into LINQ Eran Sharabi.NET Development Team Leader JohnBryce Training
What is a Database By: Cristian Dubon.
James Kolpack, InRAD LLC popcyclical.com. CodeStock is proudly partnered with: Send instant feedback on this session via Twitter: Send a direct message.
C# and LINQ Yuan Yu Microsoft Research Silicon Valley.
Database Management Systems 3ed, R. Ramakrishnan and Johannes Gehrke1 Evaluation of Relational Operations: Other Techniques Chapter 14, Part B.
Database Management Systems, R. Ramakrishnan and Johannes Gehrke1 Evaluation of Relational Operations: Other Techniques Chapter 12, Part B.
DryadLINQ A System for General-Purpose Distributed Data-Parallel Computing Yuan Yu, Michael Isard, Dennis Fetterly, Mihai Budiu, Úlfar Erlingsson, Pradeep.
Manish Bhide, Manoj K Agarwal IBM India Research Lab India {abmanish, Amir Bar-Or, Sriram Padmanabhan IBM Software Group, USA
Damien Guard (BSc, MBCS) Guernsey Software Developer Forum Language Integrated Query:
Midterm Review Lecture 14b. 14 Lectures So Far 1.Introduction 2.The Relational Model 3.Disks and Files 4.Relational Algebra 5.File Org, Indexes 6.Relational.
Virtual techdays INDIA │ 9-11 February 2011 Parallelism in.NET 4.0 Parag Paithankar │ Technology Advisor - Web, Microsoft India.
Parallel Programming in Visual Studio 2010 Sasha Goldshtein Senior Consultant, Sela Group
Summary. Chapter 9 – Triggers Integrity constraints Enforcing IC with different techniques –Keys –Foreign keys –Attribute-based constraints –Schema-based.
1 Evaluation of Relational Operations: Other Techniques Chapter 12, Part B.
The Microsoft Technical Roadshow 2007 Advances for Data in VS “Orcas” Mike Taulty Developer & Platform Group Microsoft Ltd
A tour of new features introducing LINQ. Agenda of LINQ Presentation We have features for every step of the way LINQ Fundamentals Anonymous Functions/Lambda.
Discover, Master, InfluenceSlide 1 SQL Server Compact Edition and the Entity Framework Rob Sanders Readify.
Connect with life Bijoy Singhal Developer Evangelist | Microsoft India.
Parallel Programming in.NET Kevin Luty.  History of Parallelism  Benefits of Parallel Programming and Designs  What to Consider  Defining Types of.
XML files (with LINQ). Introduction to LINQ ( Language Integrated Query ) C#’s new LINQ capabilities allow you to write query expressions that retrieve.
LINQ Programming in C# LINQ CSE Prof. Roger Crawfis.
Introduction to Parallel Programming MapReduce Except where otherwise noted all portions of this work are Copyright (c) 2007 Google and are licensed under.
 Introduction  What is LINQ  Syntax  How to Query  Example Program.
Rationale Aspiring Database Developers should be able to efficiently query and maintain databases. This module will help students learn the Structured.
LINQ, An IntroLINQ, An Intro Florin−Tudor Cristea, Microsoft Student Partner.
Getting familiar with LINQ to Objects Florin−Tudor Cristea, Microsoft Student Partner.
Database Management 9. course. Execution of queries.
LINQ TO XML Mike Taulty Developer & Platform Group Microsoft UK
Parallel Extensions A glimpse into the parallel universe By Eric De Carufel Microsoft.NET Solution Architect at Orckestra
Introduction to LINQ Lecture # 19 August Introduction How do you interrogate/manipulate data? What if you could do the work in a type-safe," string-free.
1 Hammad Khan. COURSE CONTENTS.NET Framework And C# SQL Server 2008 ADO.NET LINQ ASP.NET Dynamics Data ASP.NET MVC framework 2 Advance C# Concepts Windows.
LINQ: It’s Not Your Father’s Data Access Denny Boynton Anheuser-Busch Companies.
The.NET Language Integrated Query Project Anders Hejlsberg TLN306 Technical Fellow Microsoft Corporation.
Scala Parallel Collections Aleksandar Prokopec, Tiark Rompf Scala Team EPFL.
Relational Operator Evaluation. Overview Index Nested Loops Join If there is an index on the join column of one relation (say S), can make it the inner.
 Language Integrated Query  Make query a part of the language  Component of.NET Framework 3.5  Shipped with Visual Studio 2008.
About Me Microsoft MVP Intel Blogger TechEd Israel, TechEd Europe Expert C++ Book
Robert Vitolo CS474.  Branched off of ML (metalanguage)  Developed at Microsoft, available as part of the Visual Studio 2010 software package, integrated.
Lecture 21 Parallel Programming Richard Gesick. Parallel Computing Parallel computing is a form of computation in which many operations are carried out.
Presented by Vishy Grandhi.  Architecture (Week 1) ◦ Development Environments ◦ Model driven architecture ◦ Licensing and configuration  AOT (Week 2)
Applied Linq Putting Linq to work Introducing… Class-A Kennisprovider Microsoft development Training Coaching Alex Thissen Trainer/coach.
Plinq Presentation Steen L. Knudsen
Data Parallelism Task Parallel Library (TPL) The use of lambdas Map-Reduce Pattern FEN 20141UCN Teknologi/act2learn.
CSCI 3327 Visual Basic Chapter 8: Introduction to LINQ and Collections UTPA – Fall 2011.
Inside LINQ to Objects How LINQ to Objects work Inside LINQ1.
Linq Overview Vincent GERMAIN. Evolution - Rappel Langage  C# 2.0  C# 3.0 (Local type inference, Lambda expression, Method extension,Anonymous type)
Damien Guard (BSc, MBCS) Guernsey Software Developer Forum Language Integrated Query:
Joel Pobar Language Geek Microsoft DEV320 Improve on C# % Backwards Compatible Language Integrated Query (LINQ)
Language Integrated Query Mike Taulty Developer & Platform Group Microsoft Ltd
Introduction to.NET Florin Olariu “Alexandru Ioan Cuza”, University of Iai Department of Computer Science.
Functional Programming
”Map-Reduce-Merge: Simplified Relational Data Processing on Large Clusters” Published In SIGMOD '07 By Yahoo! Senthil Nathan N IIT Bombay.
Introduction to Entity Framework
Jim Fawcett CSE681 – Software Modeling and Analysis Fall 2016
Data Persistence In A Web Hosted World
Jim Fawcett CSE681 – Software Modeling and Analysis Fall 2013
Intro to LINQ Part 2 – Concepts and LINQ to Objects
Language Integrated Query: (LINQ) An introduction
Staying Afloat in the .NET Async Ocean
Lecture 17: Distributed Transactions
Advances for Data in VS “Orcas”
Advances for Data in VS “Orcas”
Evaluation of Relational Operations: Other Techniques
INFO 344 Web Tools And Development
Lecture 20 Parallel Programming CSE /8/2019.
CS4540 Special Topics in Web Development LINQ to Objects
Presentation transcript:

LINQ & PLINQ (Parallel) Language Integrated Query

A GENDA Introduction to LINQ basics Overview of advanced capabilities Demo the Basics PLINQ intro Demo of PLINQ

I NTRODUCTION LINQ IS... A programming model that Introduces queries as a “first class” concept into.NET More leg room! Is an abstraction level for data Don’t you just love abstraction, it’s great! Is another tool for embedding SQL queries into code “This code was written by a tool” – not that kind of tool! Allows for uniform manipulation of any data type Consistently producing consistent consistency!

LINQ B REAKDOWN

LINQ B REAKDOWN - C OMPILER

LINQ I MPLEMENTATIONS LINQ to Objects Code (Reflection), Files in FileSystem LINQ to ADO.NET LINQ to SQL LINQ to DataSet LINQ to Entities LINQ to XML XDocument, XElement, XAttribute, XNode, etc In System.Xml.Linq.Document

M AKING U SE O F L INQ

E XCEPTION H ANDLING Calling methods where failure is possible Make use of a ‘let’

B UILT I N O PERATORS Query Where Projection Select SelectMany Ordering OrderBy OrderByDescending ThenBy ThenByDescending Reverse Grouping GroupBy Aggregate Count, LongCount Sum, Average Aggregate Min, Max Set Distinct Union, Intersect, Except Join Join, GroupJoin Generation Range, Repeat, Empty Quantifiers Any, All, Contains Partitioning Take, TakeWhile Skip, SkipWhile Element Operators First, FirstOrDefault Last, LastOrDefault Single, SingleOrDefault ElemenentAt, ElementAtOrDefatult DefaultIfEmpty Other Concat SequenceEqual

E XTENSION M ETHODS Custom Operators New Name Or Override Existing Operators (potentially bad practice) Specialise Existing – For a given type

LINQ DEMO Basics in VS2010

A DVANCED LINQ Recursive Lambda Expressions Through the use of Fix fixed-point generator Expression Trees MSDN Blogs: Mads Torgersen - Recursive Lambda ExpressionsRecursive Lambda Expressions Visitor Pattern using LINQ MSDN Blogs: Jomo Fisher – Dealing with LINQs immutable expression treesDealing with LINQs immutable expression trees

PLINQ B ACKGROUND Part of managed concurrency library in the.NET Framework Simplify concurrent processing Makes use of the Task Parallel Library (TPL) TPL in turn uses Parallel.For Parallel.ForEach Parallel.Invoke

O PERATING I N P ARALLEL Partitioning Based on computation and data type Range (Arrays, Lists) – Index into structure, equal split Not the most ideal for load balancing Striped Chunks of input Chunk level load balancing Hash Execution On available cores Merge Results Initial thread picks up results (consumer thread) ForAll, Async (pipelining), Sync (stop-and-go) PLINQ takes care of threading events, signalling, concurrency, locking, etc.

PLINQ DEMO Speed up of processing using multiple cores

D EMO Projections Extension Methods Parallel Performance LINQ to XML LINQ to SQL Entities

PLINQ I DEAL S PEEDUP

T HANK Y OU Questions? More info on my blog; links, “refined wording”: