16
Timothy Ng F# Lead Microsoft Corporation

Tim - FSharp

  • Upload
    d0nn9n

  • View
    823

  • Download
    3

Embed Size (px)

Citation preview

Page 1: Tim - FSharp

Timothy Ng

F# Lead

Microsoft Corporation

Page 2: Tim - FSharp
Page 3: Tim - FSharp

Parallel Pattern Library

Resource Manager

Task Scheduler

Task Parallel Library

Parallel LINQ

Threads

Operating System

Native Concurrency Runtime

Managed Libraries

ThreadPool

Da

ta S

tructu

res D

ata

Str

uct

ure

s

Tools

AsyncAgentsLibrary

UMS Threads

MicrosoftResearch

Visual Studio 2010

ParallelDebugger Windows

Profiler Concurrency

Analysis

Race Detection

Fuzzing

AxumVisual F#

Managed Languages

Rx

Native Libraries

Managed Concurrency Runtime

DryadLINQ

Key: Research / Incubation Visual Studio 2010 / .NET 4 Windows 7 / Server 2008 R2

HPC ServerOperating System

Page 4: Tim - FSharp

Shared State

Code Locality

I/O Parallelism

Scaling to Multi-Machine

Page 5: Tim - FSharp

Shared State

Code Locality

I/O Parallelism

Scaling to Multi-Machine

oDifficult to maintain and testoVery difficult to parallelize!o Locking is fundamentally error prone:

oMust guess where parallelism will be neededoAll consumers need to participate

Page 6: Tim - FSharp
Page 7: Tim - FSharp

Immutable Lists

Immutable Records

Immutable Sets

Immutable Objects

Immutable Tuples

Immutable Dictionaries

Immutable Unions

Lots of language features to encourage immutability

Page 8: Tim - FSharp

Shared StateCode Locality

I/O Parallelism

Scaling to Multi-Machine

oWe’re used to expressing algorithms linearlyoAsync requires logical division of algorithmsoVery difficult to

oCombine multiple asynchronous operationsoDeal with exceptions and cancellation

Page 9: Tim - FSharp
Page 10: Tim - FSharp

Shared StateCode Locality

I/O Parallelism

Scaling to Multi-Machine

o Software is often I/O-bound o Leveraging web servicesoWorking with data on disk

oNetwork and disk speeds increasing slowero I/O resources are inherently parallel

oHuge opportunity for performance

Page 11: Tim - FSharp
Page 12: Tim - FSharp

Shared StateCode Locality

I/O Parallelism

Scaling to Multi-Machine

oTo scale up, must to go beyond a single machineoMulti-machine resources becoming common

o Roll-you-own clusters with cheap hardwareoOn-demand cloud compute with Azure

o Buto Shared memory doesn’t scale

Page 13: Tim - FSharp

Shared State

Code Locality

I/O Parallelism

Scaling to Multi-Machine

immutability

async { … }

async { … }

agents

Page 14: Tim - FSharp

Simple, powerful, and productive

Ready for production use with VS2010

F# + .NET 4.0 radically simplify parallelism

Parallelism and asynchrony – for today

and tomorrow

F#

Page 15: Tim - FSharp

http://fsharp.net

Page 16: Tim - FSharp

© 2007 Microsoft Corporation. All rights reserved.This presentation is for informational purposes only.MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY.