Client side part of my application needs to process WebSocket messages in strict order. Unfortunately each message is processed quite long (about 3 seconds), so another appears before the first one has ended. After few messages the order is totally different. How to solve this problem in JavaScript.
I thought about a task queue, but I don't know how to implement it to not block GUI of my web app.