#1 2017-11-21 15:11:05

EMartin
Member
From: Buenos Aires - Argentina
Registered: 2013-01-09
Posts: 332

How to use THTTPAPIWebSocketServer with TSQLRestServer ?

Hi @mpv, it is posible to use THTTPAPIWebSocketServer with TSQLRestServer in the same way that TSQLHTTPServer ?

Thanks.


Esteban

Offline

#2 2017-11-21 15:30:41

mpv
Member
From: Ukraine
Registered: 2012-03-24
Posts: 1,231
Website

Re: How to use THTTPAPIWebSocketServer with TSQLRestServer ?

Yes, but a thin layer should be implemented: onAccept, onMessage, onConnect, onDisconnect as in sample
But I don't work with TSQLRestServer in my projects, so - contribution is welcome.

BTW performance of HTTP.SYS is very good - it's our stress test result:
HTTPApi web socket server results

Last edited by mpv (2017-11-21 15:35:10)

Offline

#3 2017-11-21 15:59:01

EMartin
Member
From: Buenos Aires - Argentina
Registered: 2013-01-09
Posts: 332

Re: How to use THTTPAPIWebSocketServer with TSQLRestServer ?

I don't think to have the enough knowledge base to implement this new feature, I'll think about this.

Thanks.


Esteban

Offline

#4 2017-11-22 10:21:28

oz
Member
Registered: 2015-09-02
Posts: 95

Re: How to use THTTPAPIWebSocketServer with TSQLRestServer ?

mpv wrote:

Yes, but a thin layer should be implemented: onAccept, onMessage, onConnect, onDisconnect as in sample
But I don't work with TSQLRestServer in my projects, so - contribution is welcome.

BTW performance of HTTP.SYS is very good - it's our stress test result:
https://unitybase.info/api/server-V41/i … yGraph.png

Those are quite impressive stats! Could you tell some details about the stress test? http.sys thread pool size, use of http or https, how many physical clients or tested on local machine only...

Offline

#5 2017-11-23 16:30:19

mpv
Member
From: Ukraine
Registered: 2012-03-24
Posts: 1,231
Website

Re: How to use THTTPAPIWebSocketServer with TSQLRestServer ?

We did it 2 years ago, unfortunately I lost the sources. But as far as I remember Server: core i7, http.sys thread pool size 12. 3 client. 100 Mb network (all net ports in the same physical router). On the server side a single WebSocket connection take at last 5Kb of memory (on client TWinHTTPWebSocketClient - much more, so we need 2 physical client to create 25000 connection)

Offline

#6 2017-11-24 10:42:47

oz
Member
Registered: 2015-09-02
Posts: 95

Re: How to use THTTPAPIWebSocketServer with TSQLRestServer ?

Thanks for the informations @mpv!

Offline

Board footer

Powered by FluxBB