
PPT Attachedon 12 May 2024
Refer to Appendix Section A if you want to refresh how a typical producer - consumer pattern is implemented before going through this lecture video.
Copy pasted from Multi-threading Course.
By the end of this section, the Src code snapshot would be pointed to by this git hashcode : 03a29fa1b0bbf83ec7219e6f1bd65a3b2be35ccd
How to setup this commit hashcode, pls follow the below steps :
Download git repo :
https://github.com/sachinites/AsyncProgramming
Set the git head to above hash code
git reset --hard 03a29fa1b0bbf83ec7219e6f1bd65a3b2be35ccd
now, you can browse the code of this repo when this section was completed.
To come back to latest commit :
git pull
To see the solution, visit the link :
https://github.com/sachinites/AsyncProgramming/commit/d09e4de5e25e38353377701dffffb1b6805dad16
Welcome to the World of Asynchronous Programming!!
Asynchronous programming is used anywhere where your application interacts with other external entities - be it other threads, other processes. This world by its nature is Asynchronous. Asynchronous literally means - anything can happen anytime - unpredictable. How do you write software through Asynchronous programming? That's what we shall be going to learn in this course. Big software projects of reasonable sizes are Asynchronous. Software projects leave their synchronous boundaries the moment it starts integrating and communicating with external entities or go multithreaded.
Asynchronous programming is widely used in Distributed Systems, Networking Protocols, Distributes Databases, etc.
The prerequisite of this Course :
Know Thread Synchronization Concepts - Mutexes and Condition Variables ( any thread library, but we will be using pthreads )
C or C++ in preferable, but if your fav language is any other mainstream language then also it is ok. Borrow the concepts and implement it in your fav language.
Comfortable with basic Data structures such as Linked-List.
Zeal to learn and excel - beyond what Crowd is doing ( DS/ALGO/CP )
The end product of this Course shall be a mini library yet very powerful library which allows you do develop software through Asynchronous programming.
Course Difficulty Level :
The Course is level is Intermediate to Advanced. Very beginners pls refrain from enrolling into the Course.
Software Designing Problems to Address in this Course :
Problem 1. Simulating Concurrency in Single-Threaded Programs
problem 2. Reducing Multi-threaded Programs to Single Threaded
Problem 3. Work Deferrals
Problem 4. Asynchronous Communication
Problem 5. Queuing and Processing Incoming Network Packets
Good luck ! Happy Learning.
After doing this course You would understand :
Problems with Synchronous programming
Design and Implement Asynchronous Application/Softwares
What type of applications/softwares must not be multi-threaded
What type of applications/softwares must be asynchronous
Say good bye to locking and thread synchronization for forever.
The Concepts you would learn in this course are portable to other programming languages of your choice