Het Asynchrone Microsoft Landschap Kees Dijk Senior Software Developer, Vivens

Slides:



Advertisements
Similar presentations
Luis Guerrero UX Software Arquitect Plain Concepts
Advertisements

Svetlin Nakov Director Training and Consulting Activities National Academy for Software Development (NASD) ASP.NET 3.5 New Features.
Ofir Aspis 1/2010 VS 2010 Targets High Level - IDE New Features VS 2010 As Editor and Platform Demo Editor features Extending.
Unit 1: Overview of the Microsoft.NET Platform
SQL Server Reporting Services By Sam Nasr March 29,
AJAX Development By Gary Mandela December 26,
Visual Basic 2005 By Sam Nasr November 6,
Microsoft Confidential. An incubation effort to: Support client -> server communication in native code with a modern C++ API design Support writing Azure-based.
Asynchronous Web Services Jaliya N. Ekanayake. Basics of Web Services.
Wat is er nieuw in Visual Studio 2005 Tools for Office SE? Maurice de Beijer ABL – The Problem Solver.
Real Application Testing Spreker: Datum: Patrick Munne, Senior Oracle DBA 17 april 2009.
Microsoft SQL Server Architecture
Using.NET Platform Note: Most of the material of these slides have been adapted from Nakov’s excellent overview for.NET framework, MSDN and Wikipedia Muhammad.
.NET 3.5 SP1 New features Enhancements Visual Studio 2008 SP1 New features Enhancements Additional features/enhancements.
Reactive Extension to .NET
Reactive Extensions (Rx) for Silverlight Tim Greenfield Vertigo Software.
Designing, Deploying and Managing Workflow in SharePoint Sites Steve Heaney Product Development Manager OBS
Asynchronous I/O in .NET
Using.NET Platform Note: Most of the material of these slides have been taken & extended from Nakov’s excellent overview for.NET framework, MSDN and wikipedia.
An overview of… Luis Guerrero Plain Concepts
1 Challenge the future Load Flow Problem Parallel Programming on the GPU with MATLAB Erik Berkhof.
An Introduction to the Reactive Extensions Ivan Towlson Mindscape.
Linq to SQL Chalk Talk Freek Leemhuis Rob Huibers Logica.
James Kolpack, InRAD LLC popcyclical.com. CodeStock is proudly partnered with: Send instant feedback on this session via Twitter: Send a direct message.
Parallel Extensions to the.NET Framework Daniel Moth Microsoft
FUTURE OF.NET PARALLEL PROGRAMMING Joseph Albahari SESSION CODE: DEV308 (c) 2011 Microsoft. All rights reserved.
© Logica All rights reserved ADO vNext LINQ LINQ to SQL Entity Framework Freek Leemhuis
Bing it on, Reactive Extensions Building a quick search app from scratch in WPF with Rx and Bing.com.
Cole Durdan.  What is asynchronous programming?  Previous patterns  Task Based Async Programming .NET 4.5 Keywords  What happens in an async. method?
Lessons learned from developing a Windows 8 Metro application in C# Frode Nilsen Nilsen Labs Ticki.
Demystifying the .NET Asynchronous Programming Landscape
Rx Framework Reactive Extensions for.Net and JavaScript Andrea Nasoni & Diego Guidi.
Parallel Programming in Visual Studio 2010 Sasha Goldshtein Senior Consultant, Sela Group
Curing Your Event Processing Blues with Reactive Extensions (Rx)
Evolutie vs Revolutie Chris de Kok Evolutie vs Revolutie.NET 2015.NET 4.6 ASP.NET 5 -> MVC 6 Visual Studio 2015 C# 6.0 Agenda.
Parallel Programming in.NET Kevin Luty.  History of Parallelism  Benefits of Parallel Programming and Designs  What to Consider  Defining Types of.
Joe Hummel, PhD Technical Staff: Pluralsight Adjunct Professor: UIC, LUC
Reactive Extensions Ye olde introduction and walk-through, with plenty o’ code.
Parallel Extensions A glimpse into the parallel universe By Eric De Carufel Microsoft.NET Solution Architect at Orckestra
Parallel Extensions A glimpse into the parallel universe Eric De Carufel
Reactive Extensions (Rx) Explained Presenter: Kevin Grossnicklaus August 5 th, 2011.
LINQ, Take Two Realizing the LINQ to Everything Dream Bart J.F. De Smet blogs.bartdesmet.net/bart
Parallel Programming: Responsiveness vs. Performance Joe Hummel, PhD Microsoft MVP Visual C++ Technical Staff: Pluralsight, LLC Professor: U. of Illinois,
About Me Microsoft MVP Intel Blogger TechEd Israel, TechEd Europe Expert C++ Book
SIMPLE PARALLEL PROGRAMMING WITH PATTERNS AND OMNITHREADLIBRARY PRIMOŽ GABRIJELČIČ SKYPE: GABR42
Parallel Extensions A glimpse into the parallel universe By Eric De Carufel Microsoft.NET Solution Architect at Orckestra
WHO WILL BENEFIT FROM THIS TALK TOPICS WHAT YOU’LL LEAVE WITH ASP.NET developers, including Web Forms & MVC History of async programming in.NET How async.
Asynchronous Programming Writing Asynchronous Code in C# SoftUni Team Technical Trainers Software University
Module 8 Enhancing User Interface Responsiveness.
TAP into async programming
Other news? async and await Anonymous types (var, dynamic) Tuples Object instantiation Extension methods UCN Teknologi/act2learn1FEN 2014.
Patterns of Parallel Programming with.NET 4 Stephen Toub Principal Architect Parallel Computing Platform Microsoft Corporation
TOPICS WHAT YOU’LL LEAVE WITH WHO WILL BENEFIT FROM THIS TALK.NET developers: familiar with parallel programming support in Visual Studio 2010 and.NET.
C# Present and Future Marita Paletsou Software Engineer.
Asynchronous Programming Writing Concurrent Code in C# SoftUni Team Technical Trainers Software University
THE FUTURE OF C#: GOOD THINGS COME TO THOSE WHO ‘AWAIT’ Joseph Albahari SESSION CODE: DEV411 (c) 2011 Microsoft. All rights reserved.
Chapter 4: Threads.
TechEd /6/2018 6:15 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Advanced Topics in Concurrency and Reactive Programming: Asynchronous Programming Majeed Kassis.
Async or Parallel? No they aren’t the same thing!
Lighting Up Windows Server 2008 R2 Using the ConcRT on UMS
Staying Afloat in the .NET Async Ocean
C++ Forever: Interactive Applications in the Age of Manycore
12 Asynchronous Programming
Advanced Topics in Concurrency and Reactive Programming: ReactiveX
F# for Parallel and Asynchronous Programming
Build /2/2019 © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
DEV422 Becoming a C# Time Lord Joe Albahari 2/5/ :46 AM
Server & Tools Business
Elegantní dataflow pomocí TPL
Presentation transcript:

Het Asynchrone Microsoft Landschap Kees Dijk Senior Software Developer, Vivens

Agenda Threads Tasks (TPL) Async CTP Task Parallel Library Plinq TPL Dataflow Rx SignalR Wat is wat Introductie Conclusie Vragen

Wat is wat Parallel – Gelijktijdig uitvoeren van taken – Performance Asynchroon – Niet wachten op uitvoering van taken – Reactieve gebruikers interface – Schaalbaarheid

Wat is wat Thread – De.Net manier van werken – Een context waarbinnen code draait – Low level Task – De.Net … manier van werken – Wrapper rond Thread – Gebruik threadpool geoptimaliseerd voor aantal cores

Introductie - Geschiedenis.net 1.0 => Threads APM(2001).net 2.0 => Threads EAP(2005).net 4.0 => Task Parallel Library(2010) – PLinq – Async CTP (async, await) – TPL DataFlow.net 4.5 => (2012) – Async as a language feature – Numerous improvements 15 augustus 2012 Rx v2.0(2011) 22 augustus 2012 SignalR 0.5.3(2011)

Introductie - Uitdagingen Shared resources Show progress Cancellation Exception handling Thread affinity Complexity Debugging Deadlocks / Race conditions / Heisenbugs Applicability Unit testing

Introductie - Demo omgeving VS 2010.Net 4.0 Async CTP (version 3) TPL Dataflow Reactive Extensions 2.0 SignalR Nuget (package restore) Autofac 2.6 xUnit Moq 4.0 Fluent Assertions 1.7 Resharper 7.0 xUnit plugin for Resharper StyleCop Asp.Net MVC 4.0

Threads Standaard Thread patterns APM => Asynchronous Programming Model BeginRead, EndRead (a.k.a. IAsyncResult pattern) EAP => Event-Based Asynchronous Programming DownloadStringAsync, DownloadStringCompleted Geschikt voor UI

Threads Show Code

Tasks (TPL) Simplify model Generics Composition Schedulers Smarter

Tasks (TPL) Tasks TaskFactory Parallel.Invoke Parallel.For Parallel.ForEach BlockingCollection ConcurentBag ConcurrentDictionary ConcurrentStack ConcurrentQueue

Tasks (TPL) Show Code

Async CTP Async en Await keywords Async Extensions methods RunEx => – Delay – Run (Action) – RunEx (Function) – …

Async CTP Show Code

PLinq

Show Code

TPL Dataflow Stephen Toub ISourceBlock ITargetBlock

TPL Buffer Blocks

TPL Dataflow Execution Blocks

TPL Dataflow Join Blocks

TPL Dataflow Show Code

Reactive Extensions (Rx) Simplify model Composition Schedulers Smarter Gebruik Linq Event streams Testbaarheid Multiplatform Bart de Smet

Reactive Extensions (Rx) Rx = Observables + Linq + Schedulers public interface IObservable { IDisposable Subscribe(IObserver observer); } public interface IObserver { void OnNext(T value); void OnError(Exception error); void OnCompleted(); } OnNext* [OnError | OnCompleted]

Reactive Extensions (Rx) Schedulers: Wat => Execution Context Hoe => Execution Policy Wanneer => Clock

Reactive Extensions (Rx) Show Code

SignalR David Fowler

SignalR Show Code

Unit testen In VS 2010 met xUnit support voor async await In VS 2010 mstest eigen Async Context maken (voorbeeld in async samples/unit test) In VS 2012 mstest support voor async await Rx heeft testschedulers (time travel) TypeMock racer (betaald) Chess (tot vs 2008)

Conclusies - Uitdagingen Shared resources Show progress Cancellation Exception handling Thread affinity Complexity Debugging Deadlocks / Race conditions / Heisenbugs Unit testing

Conclusies Think before you leap (is het echt nodig) Meet APM en EAP: zelf niet meer implementeren TPL + Async : Default keuze Plinq: In memory Linq querys met bewerkingen per rij TPL Dataflow : producer/consumer meerdere bewerkingen achter elkaar Rx : event streams, maar kan veel, hoge leercurve SignalR : client/server publish/subscribe communicatie

Vragen ?

Referenties AsyncDemo Parallel programming TPL TPL Dataflow Rx SignalR Plinq