We have implemented Suzuki Kasami’s Mutual Exclusion algorithm’s as a way to prevent two or more people from talking over one another in a video call.
Try it out - https://zoomutex.herokuapp.com/
Please find the algorithm implemented in the following files
client/scripts/room.ts
This is the main function to create a room, connect and disconnect peers' audio and video. Room.ts makes use of Suzukasa.ts and token.ts to ensure Mutual Exclusion between peers.
client/Scripts/mutex.ts
Holds the girth of the algorithm, it will makes use of token.ts for it’s data structures
client/scripts/token.ts
Data structures for the Suzuki Kasami algorithm
npm run dev:server
Run server in development mode
npm run dev:client
Live compile typescript files.