Data începere

Seria 1 – Aprilie 2020

Datele sunt estimative și pot suferi modificări minore.

Înscrie-te

Durată:

5 zile

Zilele de workshop urmează să fie anunțate.

Taxă participare

Urmează să fie anunțată.

Obiective

This course examines advanced concepts of the framework like parallel computing, async programming, Reactive Extensions, Design patterns for concurrent programming and more, all for building scalable, responsive, high-performing applications.

 

Programa

Day 1

  • Intro
    • Understand concepts
      • Sequential programming
      • Concurrent programming
      • Parallel programming
      • Multitasking
      • Multithreading
      • Context switching
    • Pitfalls of concurrent programming
      • Determinism
      • Concurrency hazards
      • Sharing state
    • C# Threads
      • When to use Threads
      • Creating new Threads
      • Thread priorities
      • Foreground and background threads
      • Exceptions
      • Stop Threads
    • Thread Pool
      • C# Thread Pool queue
      • Race conditions
    • Thread synchronization techniques
      • Simple blocking methods
      • Exclusive locking constructs
      • Signaling constructs
      • Non-blocking synchronization constructs
    • Threads Demo + Exercise
    • But that’s not all about Threads
    • The Event-Based Asynchronous Pattern
    • BackgroundWorker
    • Lazy Initialization
    • Thread-Local Storage
    • Timers
    • Multithreaded Timers

Day 2

  • Solving complex problems by composing simple solutions
    • Functions composition
    • Closures
    • Closures in a multithreading environment
    • Memoization-caching
    • Lazy and thread safe singleton pattern
    • Lazy and Task
  • Tasks intro (details will follow in other modules)
    • Why to use tasks
    • Create & run a C# tasks
    • Generic Task
    • Waiting on Tasks
    • Task exception handling
    • Working with AggregateException
    • Task cancellations
    • Task continuations
    • Continuations and Task
    • Scheduling Different Continuation Tasks
    • Task scheduler
    • Attaching Child Tasks To A Parent Task
    • C# Task Factory
    • Tasks vs threads
  • Tasks exercises
  • Data structures
  • .Net immutable collections
  • .Net concurrent collections
    • ConcurrentStack
    • ConcurrentQueue
    • ConcurrentBag
    • BlockingCollection
    • ConcurrentDictionary <TKey,TValue>
  • Agent message-passing pattern
  • Demos and exercises on collections

Day 3

  • Basics of processing big data
    • Data and task parallelism in .Net
      • For
      • ForEach
    • Fork/Join pattern
    • GC on structs vs objects
  • Measuring Performance
    • Gustafson’s Law
    • Limitations of parallel loops
  • PLINQ and MapReduce
    • Pure functions
    • Isolate and control side effects
    • Aggregating and reducing data in parallel
      • Deforesting
      • Fold in PLinq
      • Parallel reduce in PLinq
    • Parallel MapReduce pattern
    • Reactive programming in .Net
      • Rx (Reactive extensions)
      • IObservable
      • Rx publish/subscriber
      • Observers example

Day 4

  • Task-based parallelism
    • .Net TPL
      • Work stealing algorithm
      • Invoke
    • Problem on void in C#
    • CSP (continuation passing style)
    • Composing task operations
    • Applying the Monad pattern to task operations (SelectMany)
      • Example with image processing
    • Task-based Asynchronous Programming model (TAP)
      • Async in .Net
        • Async and await keywords intro
        • Callback Hell
        • Async Await Keyword
        • Application of asynchronous principles across .Net
        • Async all the way
        • How is working? (the state machine)
      • Anonymous asynchronous lambdas
      • Asynchronous cancellation
      • Handling errors in async operations
      • Task<option>
      • Functional combinators
        • WhenAny
        • WhenAll
      • Demos/Exercise
    • TPL DataFlow
      • TransformBlock <TInput,TOutput>
      • ActionBlock
      • Producer/Consumer with TDF
      • Agent Model with TPL Dataflow
      • Parallel workflow example
    • Exercise on DataFlow

Day 5

  • Design patterns for concurrent programming
    • Recycling objects
    • Designing code to optimize performance
    • Coordinating concurrent I/O operations
    • Thread safe random number generator
    • Concurrent reactive scalable client/server
    • Coordinating concurrent jobs
  • Exercise on design patterns

Traineri

Mihai Nechifor
Mihai NechiforProgram Manager & Trainer Programare .NET
Andrei Scutariu
Andrei ScutariuTrainer Programare .NET