Does Xdata/Sparkle allows thick callbacks?

I would like to be able to inform my XData clients that there is change in the underlying data on the server by means of a push notification.
Embarcadero promotes the use of Thick (or heavy) callbacks for this purpose (see e.g.
Is a simular mechanism possible with XData? I read the topic on Events in the Aurelius manual. It would be great to promote these events to the client.

There is no such concept in Rest/json servers. The example you provided is a DataSnap server using TCP/IP. It's a different protocol and require permanent connection with the server. It's just different things.

I thought so too and you're right about the example. But it can be done with Datasnap and TDSRestClientCallback ( and I was hoping there was a way to do this with XData as well.
Some more about thick clients and REST here:
But maybe these solutions only work with a Delphi client?

As far as I know that requires a stateful server (single instance for all requests) which is not the case for XData (and most Rest servers). What kind of callback you want to receive from the server? You can always poll the server from time to time to check for some status.

I would like the server to tell me when the underlying Aurelius objects on the server have changed.
If that is not possible I have to poll the server, that is correct. But a serverside push is much more conveniant.

I might be more convenient but maybe you are adding server overhead without much need. The changes concern to the client, I'm not sure but I think a client poll is might lighter than adding monitoring and notifying from the server side.

1 Like

Ok, thanks for the answers.

Warner, I'm sorry that I have to ask so many questions, but here is another one :-) :

I implemented the Eventsystem as described in the Aurelius documentation in my XData server. That works ok. I can now see on the server which classes have been changed.
I now would like to see that on my XData client too, but that's not possible, because every client operates in its own Connection....
Is it possible to get information from the Server that is shared between clients, without having to ask the database?
E.g.: Client1 changes something in TmyClass and the Eventsystem signals that. When Client2 polls the Server to see if there are changes in TmyClass, the server says 'Yes' and Client2 reloads its data from the server.

Ronald, I don't see how it can be done without using the database since the server is starless. After a change in the server, you have to persist it somewhere, so that other clients can know what's going on. If you don't save it (either in database or anywhere), how can you be sure such information will be available when other clients ask?

So you should implement some logging using the events and then use that log to provide such info to clients. But one note: what you are describing is a kind of replication system. Are you looking for such tool? we're almost finishing a replication system based on Aurelius/XData so if that's your intention maybe it's interesting to wait and see if our solution fits your needs.

I just wanted to use the mechanism to tell the clients something has changed (by another client) and that they needed to reload there data. As it is not possible to do this with a Callback, I was looking for another way. If this is not hte way, please tell me how I can do it, using XData and Aurelius?

Replication is not what I am looking for now, but it may be interesting for our mobile applications in the near future.

Just save a log of what's changed using the events, and when a client asks for it, you query the log and return the proper info for the client.

Not really a satisfactory way to track or trigger changes.
I guess I'll have to think of another way to do this if it is not possible with an XData server.

If you need online, instant callback to clients, then you need a different communication protocol indeed. If clients just need to get the changes at some point, I don't see why such system is not desired?

I think I'll wait for your replicationsystem to appear. Maybe that could be a solution.
Do you have any idea when this will emerge? And will it be compatible with XData / Aurelius? Is it part of the business suite or separate?

It will be based on XData and Aurelius, and be part of TMS Business Subscription.

Ok, thank you, I'll wait for it to appear.