#1 2017-09-07 08:51:30

M477h13u
Member
Registered: 2017-08-08
Posts: 11

Degraded TSQLHttpServer

Hello AB! (:

I am actually working on a project which is a client/server TSQLHttpServer using WebSockets, useBidirSocket and a TSQLRestServerFullMemory.

For a test purpose, we would like to know if it is possible to 'degrade' the server in order to make him not multi-thread, is that possible ? If so, what do you advise ?

Offline

#2 2017-09-07 09:17:27

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: Degraded TSQLHttpServer

Currently, WebSockets connections have their own thread per connection... So it is not easy to make it mono-threaded globally...

But you can force the execution to be locked on the server side, so that all process will be serialized.
See https://synopse.info/files/html/Synopse … #TITLE_288

Offline

#3 2017-09-07 12:48:10

M477h13u
Member
Registered: 2017-08-08
Posts: 11

Re: Degraded TSQLHttpServer

Thank you for the very quick answer mister mORMot! (:

I tried what you advice, but I did not find any 'AcquireExecutionMode' property for TSQLHttpServer .. but it is implemented in TSQLRest class .. Am I missing something ? yikes

Offline

#4 2017-09-07 13:11:38

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: Degraded TSQLHttpServer

You will define this property on TSQLRestServer level, not TSQLHttpServer.
As I wrote, at TSQLHttpServer level, you have no way to disable the multiple threads created by useBidirSocket...

Offline

Board footer

Powered by FluxBB