Multithread in-process Sparkle server

I need to have a In-process XData server that simulates exactly a real XData webserver.
I write code that should be the same for one-computer installation and for multiple clients network installation, and I can have simultaneous requests to a real Xdata server.
What do you propose in order to have multiple simultaneous requests to an in-process Sparkle+XData server?
Should I create an in-process Xdata server in a thread in each request?
Should I have a pool of already created in-process servers to be used by a new thread in each request?
Does a mechanism exist already for that?
I apologize for this question, because I just studying and evaluating Sparkle and XData components.

Sparkle in-process server should be thread-safe, you can use it normally.

1 Like

I create a in-process server in the main thread with the following command:
Server := TInProcHttpServer.Get('myserver');

From a different thread can I run the following as I am doing with an external server?
The in-process "code to process the response" aka OnProcessRequest is running inside the main thread (where server instance was created) or inside the calling thread?

Different threads can call simultaneously the above created 'Server' instance?
Thank you in advance

It will be running in the same thread used by the client.


1 Like

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.