Websocket API to replace REST API?

后端 未结 10 1662
温柔的废话
温柔的废话 2020-12-02 03:43

I have an application whose primary function works in real time, through websockets or long polling.

However, most of the site is written in a RESTful fashion, which

10条回答
  •  庸人自扰
    2020-12-02 04:13

    Do I want updates from the server?

    • Yes: Socket.io
    • No: REST

    The downsides to Socket.io are:

    • Scalability: WebSockets require open connections and a much different Ops setup to web scale.
    • Learnin: I don't have unlimited time for my learnin. Things have to get done!

    I'll still use Socket.io in my project, but not for basic web forms that REST will do nicely.

提交回复
热议问题