websockets apache server compatibility

后端 未结 2 1234
旧时难觅i
旧时难觅i 2020-12-19 16:59

I want to make an app that displays new data whenever they arrive inside a folder via xml. I want to use html5 web sockets but I am confused on how it should be done. I am u

相关标签:
2条回答
  • 2020-12-19 17:26

    Your options are:

    1. Use something like mod_websocket, as pointed out by Phillip Kovalev. Or pywebsocket. You could also try PHP WebSocket.
    2. Use a dedicated self-hosted realtime web technology for realtime communication between server and client. If you do this you'll also need to define a way of application to realtime web server communications - normally achieved through message queues.
    3. Use a hosted realtime web solution and offload the realtime push aspect of your application.

    There are concerns about using Apache with this type of technology since this technology maintains long-running persistent connections between the server and client and Apache isn't know to be too great at this. So, the best solution may be to:

    1. Go with a 2nd dedicated realtime web server in conjunction with using Apache as your application server
    2. Use a self-hosted realtime web server that has the ability to handle many concurrent connections
    3. Use a hosted service along with your Apache application server.

    If you don't expect many concurrent connections or if you are just trying out the technology then it's possible that Apache alone will be all you need.

    0 讨论(0)
  • 2020-12-19 17:32

    Look at mod_websocket. It supports latest and commonly implemented by browsers vendors protocol version.

    0 讨论(0)
提交回复
热议问题