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.
- Researcher and lecturer at University "Kiev Polytechnic Institute"
- Chief Software Architect at Metarhia Technology Stack
- 25 years in IT, expert in building distributed corporate applications, systems architecture
- NodeUA, KievNodeJS and HowProgrammingWorks meetups organizer
- Specialties: cybernetics, programming, DBMS, system analysis, production automation, telemetry, system software, network servers and protocols
- The author of the Impress application server for Node.js, JSTP and multiple other open source projects