I'm learning websockets and wanted to make a websocket onmessage logger which writes the received data in a mongodb.
//maybe a reconnect attempt ?
I made this script so far and it works.
When there is an onmessage Event I'm getting a small JSON like this.
I was just wondering if this is might be enough in terms of scalability of the received onmessage Events.
I mean there is no problem when I receive three times of small-JSON's in 10 seconds. What will happen when I'm receiving 1000 small-JSON's in 10 seconds ?
Can I improve this code ?