Квитки на наступну конференцію Конференція JavaScript fwdays’24 вже у продажу!

Web Locks API in Node.js and browser

Відео доповіді

Презентація доповіді

Race condition and deadlocks in asynchronous programming is not something strange but most of developers are not thinking about it and expects a miracle using promises and async/await. Parallel programming have well-known techniques and theory for concurrent computing and state management with different data structures to make them thread-safe. All those primitives like semaphore, mutex, spin-lock, monitors, barriers are usable for asynchronous programming as well but we may simplify them and combine with promises and sync/await to fulfill a concept of resource locking in single-threaded runtime.

While we are getting closer to real parallel programming with multi-threading in JavaScript we have Web locks API as a single and simple abstraction for all needs. It is already available in browsers and can be simply ported to node.js with a hope to reuse it for multi-threading as well with known limitations.

Тимур Шемсединов
Metarhia, Kiev Polytechnic Institute
  • Дослідник, викладач, open-source ентузіаст, 25 років в галузі ІТ
  • 3 місце в Україні по підписникам на Github
  • CTO Salucyber, chief architect технологічного стеку Metarhia
  • Безкоштовні відеолекції > 200
  • Організатор Metarhia ком’юніті, спікер на > 40 конференціях
  • Експерт у створенні розподілених корпоративних додатків, архітектури систем, кібернетики, системного програмування, СУБД, автоматизації виробництва, телеметрії, мережевих серверів та протоколів, системного аналізу
  • Twitter
Увійти
Або поштою
Увійти
Або поштою
Реєстрація через e-mail
Реєстрація через e-mail
Забули пароль?