You are not logged in.
Great work @mpv and ab, many thanks !!!
i am waiting for a THttpWebSocketServer of poll/epoll version under Unix/Linux...
Offline
EMartin wrote:Just for curiosity, why not just to use a function for readonly access in https://synopse.info/fossil/info/1ff1e5b5c276dcb5 ?
Indeed: see [6b4cc8c]. Thanks!
And function with 1 line of code should be marked as inline if it's possible.
Offline
We finish a implementation of WebSockets using HTTP API 2.0 and commit it to branch "WinWebSocket" (BTW merge operation on fossil is very good).
The sample `31 - WebSockets\Project31WinHTTPEchoServer.dpr` give a basic usage.We test out implementation using synthetic tests and successfully create a 50 000 concurrent webSocket connections. One server-side connection required 5kb of memory (and do not create a separate thread)
Also we deploy a solution based on the THttpApiWebSocketServer to one of our production. The average load is 3000 concurrent WS connection with up to 5000 sometimes. It work 1 week w/o problems (but we use WS only to notify a client about something happens, all other communication is done using HTTP).
https://blog.synopse.info/?post/2014/08 … they-scale : Here, AB mentioned:
As a conclusion, I would recommend the following, for any project:
- Use WebSocket for client notifications only (with a fallback mechanism to long-polling - there are plenty of libraries around);
- Use RESTful / JSON for all other data, using a CDN or proxies for cache, to make it scale.
At the same time, in this post, mpv also mentioned:
but we use WS only to notify a client about something happens, all other communication is done using HTTP
I am quite curious about the above perspective, how is it implemented? Could you provide some example code?
Last edited by zen010101 (2024-10-20 08:31:51)
Offline