5. Shared State
o Difficult to maintain and test
o Very difficult to parallelize!
o Locking is fundamentally error prone:
o Must guess where parallelism will be needed
o All consumers need to participate
Code Locality
I/O Parallelism
Scaling to Multi-Machine
6.
7. Immutable Lists Immutable Tuples
Immutable Records Immutable Dictionaries
Immutable Sets Immutable Unions
Immutable Objects Lots of language features
to encourage immutability
8. Shared State
Code Locality
o We’re used to expressing algorithms linearly
o Async requires logical division of algorithms
o Very difficult to
o Combine multiple asynchronous operations
o Deal with exceptions and cancellation
I/O Parallelism
Scaling to Multi-Machine
9.
10. Shared State
Code Locality
I/O Parallelism
o Software is often I/O-bound
o Leveraging web services
o Working with data on disk
o Network and disk speeds increasing slower
o I/O resources are inherently parallel
o Huge opportunity for performance
Scaling to Multi-Machine
11.
12. Shared State
Code Locality
I/O Parallelism
Scaling to Multi-Machine
o To scale up, must to go beyond a single machine
o Multi-machine resources becoming common
o Roll-you-own clusters with cheap hardware
o On-demand cloud compute with Azure
o But
o Shared memory doesn’t scale
13. Shared State immutability
Code Locality async { … }
I/O Parallelism async { … }
Scaling to Multi-Machine agents
14. Simple, powerful, Ready for production
and productive use with VS2010
F#
Parallelism and
F# + .NET 4.0 radically
asynchrony – for today
simplify parallelism
and tomorrow