Asynchronous programming (full course)

Asynchronous programming (full course)

Asynchronous programming has recently become no less developed than classical parallel programming, and in the world of JavaSript, both in browsers and in Node.js, understanding its techniques has taken one of the central places in shaping the worldview of developers. I bring to your attention a holistic and most complete course with an explanation of all the widespread methods of asynchronous programming, adapters between them and auxiliary openings. It currently consists of 23 lectures, 3 reports and 28 repositories with many code examples on github. Total about 17 hours of video: link to playlist.

Explanations to the scheme

The diagram (above) shows the connections between different ways of working with asynchrony. The colored blocks refer to asynchronous programming, and b/w shows parallel programming methods (semaphores, mutexes, barriers, etc.) and Petri nets, which, like asynchronous programming and the actor model, are different approaches to implementing parallel computing (they are given in the diagram only to more accurately determine the place of asynchronous programming). The actor model is related to asynchronous programming because the implementation of actors without multithreading also has a right to exist and serves to structure asynchronous code. The dotted lines link events and the concurrent queue to callbacks because these abstractions are based on callbacks, but still form qualitatively new approaches.

Lecture topics

1. Asynchronous programming (overview)
2. Timers, timeouts and EventEmitter
3. Asynchronous programming using callbacks
4. Non-blocking asynchronous iteration
5. Asynchrony with the async.js library
6. Asynchrony on promises
7. Asynchronous functions and error handling
8. Asynchronous adapters: promisify, callbackify, asyncify
9. Asynchronous data collectors
10. Unhandled errors in promises
11. The problem of asynchronous stacktrace
12. Generators and asynchronous generators
13. Iterators and asynchronous iterators
14. Canceling asynchronous operations
15. Asynchronous function composition
16. Thenable and lightweight await
17. Concurrent asynchronous queue
18. Pattern open constructor (Revealing Constructor)
19. Future: Asynchrony on stateless futures
20. Deferred: Asynchrony on stateful differentials
21. Actor Model
22. Pattern Observer (Observer + Observable)
23. Asynchrony in RxJS and event streams

Under each video there are links to repositories with code examples that are explained in the video. I tried to show that there is no need to reduce everything to one abstraction of asynchrony. There is no universal approach to asynchrony, and for each case you can select those methods that will allow you to write code more naturally for this specific task. Of course, this course will be supplemented and I ask everyone to suggest new topics and contribute code examples. The main goal of the course is to show how to build asynchrony abstractions from the inside, and not just teach how to use them. Almost all abstractions are not taken from libraries, but are given in their simplest implementation and their work is analyzed step by step.

Only registered users can participate in the survey. Sign in, you are welcome.

What is your opinion about the course?

  • I'll watch the whole course

  • I'll look selectively

  • One approach is enough for me

  • I will contribute to the course

  • I'm not interested in asynchrony

8 users voted. 1 user abstained.

Source: habr.com

Add a comment