Dataset Protocol
Real-time dataset synchronization across multiple connected clients. Broadcast inserts, updates, and deletes automatically as they happen.
Real-time dataset synchronization across multiple connected clients. Broadcast inserts, updates, and deletes automatically as they happen.
Keep datasets synchronized across all connected clients without manual polling or refresh.
The Dataset protocol extends the SGC protocol to broadcast dataset modifications in real time. When a record is inserted, updated, or deleted on one client, the change is automatically propagated to all other connected clients. This is ideal for collaborative applications where multiple users view and edit the same data — point-of-sale systems, inventory management, shared dashboards, and multi-user data entry forms.
Synchronize a dataset across connected clients.
uses
sgcWebSocket_Client, sgcWebSocket_Types,
sgcWebSocket_Protocol_Dataset_Client;
var
WSClient: TsgcWebSocketClient;
DatasetProtocol: TsgcWSPClient_Dataset;
procedure TForm1.FormCreate(Sender: TObject);
begin
WSClient := TsgcWebSocketClient.Create(nil);
WSClient.Host := 'myserver.example.com';
WSClient.Port := 443;
DatasetProtocol := TsgcWSPClient_Dataset.Create(nil);
DatasetProtocol.Client := WSClient;
// Bind to a TDataSet component
DatasetProtocol.Dataset := ClientDataSet1;
WSClient.Active := True;
end;
// Changes to ClientDataSet1 are now automatically
// broadcast to all other connected clients
Deep-link to the component reference, grab the ready-to-run demo project, and download the trial.