Re:Why you should never use Socket.IO
by josephg on Wednesday November 09, 2016 @01:56AM
(#12906875)
You're talking about a light layer on top of websockets to implement a request/response protocol. This can be done pretty trivially on top of websockets in dozens of ways, though if what you want is request/response you should consider using HTTP directly.
You never have to "build it again for every project" if you put your code in npm. But I guarantee you there are dozens of libraries like this in npm already. (Just like there are dozens of libraries to do exponential reconnect backoff.)
The right approach is to build / use light layers on top of websockets to solve these problems. Socket.io is the wrong solution. Its the wrong solution for every problem.
You never have to "build it again for every project" if you put your code in npm. But I guarantee you there are dozens of libraries like this in npm already. (Just like there are dozens of libraries to do exponential reconnect backoff.)
The right approach is to build / use light layers on top of websockets to solve these problems. Socket.io is the wrong solution. Its the wrong solution for every problem.