Shifting JavaScript into High Gear with Web Workers
This course dives into what web workers are and provides practical demonstrations showing how they can be used to add parallel processing capabilities to a web application.
What you'll learn
In recent years, JavaScript has risen to become one of the most important languages in modern software development. However, despite the powerful engines that run it, it is often limited by its single-threaded nature. In this course, Shifting JavaScript into High Gear with Web Workers, you will learn how to work around that constraint in web applications by using the WebWorker API to allow your application to take advantage of the full power that your customer's computers have to offer. First, you will get to see why web workers are the preferred solution for adding parallel execution paths to an application. Next, you'll get a step-by-step overview of the various aspects of working with web workers, such as defining messages and what APIs can be accessed from within a worker. Finally, you'll see how web workers can be added to a real-world application in a way that causes the smallest disruption possible to the application's structure, while gaining the advantages inherent with workers. After finishing this course, you will be ready to implement web workers into your multi-threaded applications with minimum hassle.
Table of contents
- Introduction 2m
- Messages 4m
- Demo: Messages 5m
- Available APIs 2m
- Importing Scripts 1m
- Demo: Importing Scripts 3m
- Message Types 1m
- Dedicated Worker Lifecycle 1m
- Demo: Dedicated Worker Lifecycle 4m
- Shared Worker Lifecycle 4m
- Demo: Creating a Shared Worker 5m
- Demo: Sending Messages to Multiple Contexts 4m
- Summary 2m
- Introduction 2m
- Message Formats 2m
- Demo: Message Formats 3m
- Remote Procuedure Calls 1m
- Demo: Remote Procedure Calls 5m
- Error Handling 1m
- Demo: Error Handling 5m
- Copying Functions 3m
- Demo: Copying Functions 4m
- Bootstrapping Dojo 1m
- Demo: Bootstrapping Dojo 3m
- Demo: Testing Dojo in a Worker 8m
- Demo: Asynchronous Workfinder 8m
- Summary 2m