Asynchronous I/O in .NET

Slides:



Advertisements
Similar presentations
Ofir Aspis 1/2010 VS 2010 Targets High Level - IDE New Features VS 2010 As Editor and Platform Demo Editor features Extending.
Advertisements

AJAX Development By Gary Mandela December 26,
SQL Server Service Broker The South East Michigan SQL Server Users Group Tom Groszko
Custom REST services and jQuery AJAX Building your own custom REST services and consuming them with jQuery AJAX.
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.
IBM Research: Software Technology © 2006 IBM Corporation 1 Programming Language X10 Christoph von Praun IBM Research HPC WPL Sandia National Labs December.
Clark County & the Web Application Development Framework.
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 Extensions (Rx) for Silverlight Tim Greenfield Vertigo Software.
Advanced Performance Techniques in ASP.NET 2.0 William Zhang, Ph.D. Senior Consultant Microsoft Consulting Services.
Het Asynchrone Microsoft Landschap Kees Dijk Senior Software Developer, Vivens
An overview of… Luis Guerrero Plain Concepts
Introduction to Concurrency in F# Joey Dodds. F# F# Warmup F# async basics async let! examples Continuations Events.
F# and its 11 features Guanru Li 2011 ACM class. F# is …... a programming language.
What's new in Microsoft Visual C
James Kolpack, InRAD LLC popcyclical.com. CodeStock is proudly partnered with: Send instant feedback on this session via Twitter: Send a direct message.
DEV324 C# VB 7.0 Managed Code C# VB 8.0 Generics C# VB 9.0 Language Integrated Query C# VB 10.0 Dynamic + Language Parity.
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.
Introduction to Dashboards in CRM 4.0 Robert Peledie CRM Consultant Chorus IT.
Cole Durdan.  What is asynchronous programming?  Previous patterns  Task Based Async Programming .NET 4.5 Keywords  What happens in an async. method?
Async Programming WITH ASYNC TASK
XML Web Services in Visual Studio ®.NET NameTitleCompany.
Ryan Andrus Staff Engineer, Architecture Team Charles Schwab.
490dp Synchronous vs. Asynchronous Invocation Robert Grimm.
Virtual techdays INDIA │ 9-11 February 2011 Parallelism in.NET 4.0 Parag Paithankar │ Technology Advisor - Web, Microsoft India.
INFOSYS 290, Section 3, Fall 2005, Web Services: Concepts, Design and Implementation Adam Blum Lecture 4: Creating Web Services.
Workflow Framework There are many open-source workflow frameworks available such as: –OS Workflow -
 Ed Pinto PM Microsoft Corporation. Host “Dublin”(IIS/WAS + App Server Extensions) Microsoft ®.NET Workflow Service.exe Host “Dublin”(IIS/WAS + App.
Sofia, Bulgaria | 9-10 October Asynchronous Programming for ASP.NET 2.0 Developers Julie Lerman The Data Farm Julie Lerman The Data Farm.
Silverlight 2 has rich networking support SOAP/XML Web services via WCF proxies Untyped HTTP services (REST, RSS, ATOM) via HttpWebRequest and WebClient.
DEV301. // Synchronous TResult Foo(...); // Asynchronous Programming Model (APM) IAsyncResult BeginFoo(..., AsyncCallback callback, object state);
Reactive Extensions Ye olde introduction and walk-through, with plenty o’ code.
Overview of Threading with the.NET Framework  Wallace B. McClure  Scalable Development, Inc. Scalable Development, Inc. Building systems today that perform.
Parallel Extensions A glimpse into the parallel universe By Eric De Carufel Microsoft.NET Solution Architect at Orckestra
Consuming REST Services from C# SoftUni Team Technical Trainers Software University
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
Joe Hummel, PhD Microsoft MVP Visual C++ Technical Staff: Pluralsight, LLC Professor: U. of Illinois, Chicago stuff:
ADVANCED WEB SERVICES. Three Advanced Web Service Techniques SOAP Extensions Asynchronous calls Custom wire formatting SOAP Extensions Asynchronous calls.
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.
Reactive pattern matching for F# Part of “Variations in F#” research project Tomáš Petříček, Charles University in Prague
Ken Casada Developer Evangelist Microsoft Switzerland
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Concurrency & Dynamic Programming.
WEB322 ASP.NET Internals: Under the Covers – Exploring Internals, Page Lifecycle and the Compilation Model Simon Calvert Program Manager Web Platform and.
TAP into async programming
Async Made Simple with C++ PPL
Synchronization These notes introduce:
A: A: double “4” A: “34” 4.
Asynchrony in (ASP).NET Aliaksandr
1.NETDelegates & eventsNOEA / PQC 2007 Delegates & events Observer pattern Delegates –Semantics –Cil – code –Usage Events Asynchronious delegates.
Patterns of Parallel Programming with.NET 4 Stephen Toub Principal Architect Parallel Computing Platform Microsoft Corporation
CIS NET Applications1 Chapter 7 – Asynchronous Calls.
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.
Async Made Simple in Windows 8, with C# and Visual Basic Alex Turner Program Manager VB/C# Compilers Microsoft Corporation DEV332.
THE FUTURE OF C#: GOOD THINGS COME TO THOSE WHO ‘AWAIT’ Joseph Albahari SESSION CODE: DEV411 (c) 2011 Microsoft. All rights reserved.
Asynchronous Programming with C# v.Next
TechEd /6/2018 6:15 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Async or Parallel? No they aren’t the same thing!
Staying Afloat in the .NET Async Ocean
12 Asynchronous Programming
Asynchronous Programming
Building responsive apps and sites with HTML5 web workers
Intro to Workflow Services and Windows Server AppFabric
Enable long running Function Orchestrations
.NET Core Summer event 2019 – Brno, CZ
Presentation transcript:

Asynchronous I/O in .NET

What is Async I/O? Executing I/O in the background, allowing foreground work to proceed I/O executes and completes in parallel with, and independent of, the application that initiated it Called “Overlapped I/O” in Win32

What is Async I/O? Synchronous I/O Asynchronous I/O Start I/O Blocked Process Asynchronous I/O Start I/O Blocked Process Background I/O Background I/O

Why use Async I/O? Scalability Throughput Threads are expensive Non-blocking UI Silverlight

Why not Async I/O? Complexity Debuggability Unnecessary?

Asynchronous Programming Model Standard pattern for async work in .NET 3.5 Convert: string DoOperation(int param1, double param2); Into: IAsyncResult BeginDoOperation(int param1, double param2, AsyncCallback callback, object state); string EndDoOperation(IAsyncResult asyncResult); In WCF, use [OperationContract(AsyncPattern = true)]

Asynchronous Programming Model Four ways to complete asynchronous call: Supply an AsyncCallback Poll IAsyncResult.IsCompleted Wait on IAsyncResult.AsyncWaitHandle (blocking) Call EndXxx method (blocking) Always call EndXxx method!

Asynchronous I/O with APM in .NET 3.5 Demo

Event-Based Pattern Introduced in .NET 2.0 to simplify APM E.g., PictureBox, SoundPlayer, WebClient MethodAsync method MethodCompleted event CancelAsync method Uses AsyncOperationManager internally

Task Parallel Library New framework for parallel and async work in .NET 4.0 Convert: string DoOperation(int param1, double param2); Into: Task<string> DoOperation(int param1, double param2);

Task Parallel Library Two ways to complete asynchronous call: ContinueWith Call Task<T>.Result or Task.Wait (blocking)

Task Parallel Library Wrap existing APM method IAsyncResult BeginDoOperation(int param1, double param2, AsyncCallback callback, object state); string EndDoOperation(IAsyncResult asyncResult); with FromAsync: Task<string>.Factory.FromAsync(BeginDoOperation, EndDoOperation, int param1, double param2, object state);

Asynchronous I/O with TPL in .NET 4.0 Demo

Where to? ASP.NET Asynchronous Pages (http://msdn.microsoft.com/en-us/magazine/cc163725.aspx) IHttpAsyncHandler (http://msdn.microsoft.com/en-us/magazine/cc163463.aspx) F# Async Workflows (http://blogs.msdn.com/dsyme/archive/2007/10/11/introducing-f-asynchronous-workflows.aspx) Reactive Extensions for .NET (http://msdn.microsoft.com/en-us/devlabs/ee794896.aspx) Axum (http://msdn.microsoft.com/en-us/devlabs/dd795202.aspx) http://github.com/bgrainger/AsyncIoDemo