TROLocalServer multithread

Hi,

I need to extend an exist delphi REST application server to access to a Server DB. My idea is to use a TROLocalServer to expose remote methods and DataAbstract Datasets. Every resource REST create a client data module (with a TROLocalClient) and call the services exposed by TROLocalServer.
My Questions are: Is it a viable idea? TROLocalServer is multithread?

I would like to have the whole logic within the REST service and not create a dedicated server (tcp or http).

Thank you very much and best regards

Hi,

yes, TROLocalServer is multithread.

for DA access I’d recommend to use TDALocalDataAdapter.
it will work more faster in comparing with TROLocalServer because data shouldn’t be serialized/deserialized to/from TROMessage.

finally you can use service’s methods as is, i.e.

var1 := (lda.ServiceInstance as IMyService).method(param1);
1 Like

Great!!

Many thank’s EvgenyK!

1 Like