XData Server

Hi,
Is there a "safe" way to shutwdown a XData Server?

On before shutdown(Close) of the App Service do the following.
1. Stop accepting new conections.
2. Wait for all service operations calls are completed.

Is there a way to synchronize data access between connections?
I need to access and update data to be synchronizend between connections, something like using TCriticalSection, On ISAPI I used a CriticalSection using a global datamodule.

Any hints,

Thanks in advance,
Omar Zelaya
Hi,

Question 2 I have done it creating a global DataModule at ServerStart on sever.pas. is the correct way?

Thanks in advance,
Omar Zelaya

Just calling Stop on the dispatcher will not receive further requests and will finish existing ones. There is a timeout for it, after such timeout, if there are still pending requests being processed, the server will terminate no matter what.


I didn't understand your question on data synchronize? Can you please be more specific?

XData follows the REST principle, i.e. every request is stateless. Thus, every request does not know if there was a request before or after. That also means there is nothing to synchronize.