You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Good day! I know that WebSocket not in your documentation. But I suggest to implement it.
I think that implementation of WebSocket will make connectivity between bots and mtproto better.
For example Discord messenger works on WebSocket for requesting data. And it can realize many features for big servers faster than it can be in longpoll (I'm not sure about webhook).
And don't forget that beautiful implementation of WebSocket is simpler for newbies, than webhook or long polling.
The text was updated successfully, but these errors were encountered:
WebSocket interface would be harder to implement, especially for newbies, because you would need to introduce the whole new protocol atop WebSockets, which has update delivery confirmation. We can't afford to store updates after they are successfully delivered to bots, so there must be an explicit delivery acknowledgement support in the protocol. Discord doesn't have that, so every bot, which doesn't want to lose updates all the time, must have a database to store sequence number of the last processed update. The other WebSocket problem is that you must check the connection aliveness all the time to notice broken connections fast. Discord introduced Heartbeating just for that. Also, to minimize payload size Discord introduced per-payload compression. All of this is available by default through HTTP.
WebSocket protocol also has some advantages, like the absence of request/response headers and absence of ping time latency between updates (only comparing to getUpdates). But the size of the headers is neglible when compared to the payload size and ping time can be easily reduced to a neglible value. More over, you can now run Bot API server on the same server your bot runs, making all this WebSocket advantages completely useless.
Good day! I know that WebSocket not in your documentation. But I suggest to implement it.
I think that implementation of WebSocket will make connectivity between bots and mtproto better.
For example Discord messenger works on WebSocket for requesting data. And it can realize many features for big servers faster than it can be in longpoll (I'm not sure about webhook).
And don't forget that beautiful implementation of WebSocket is simpler for newbies, than webhook or long polling.
The text was updated successfully, but these errors were encountered: