This protocol inherits from Protocol Default and it's useful if you want to broadcast dataset changes over clients connected to this protocol. It can be used in 2 modes:
1. Replicate database: the database changes are replicated to all client databases, example: a server has a database with stock quotes and all connected clients receive quotes changes. There is a single database (in server) and every client has its own database. Every time a quote is updated, this change is broadcasted to all connected clients and every client updates its own record database. Use UpdateMode: upWhereAll or upWhereChanged for this mode type.
2. Database updates: here there is a single database shared by server and clients, and every time there is a client that updates a record in a database, all other clients want to be notified about this update. Use UpdateMode: upRefreshAll for this mode.
It uses "JSON-RPC 2.0" Object, and every time there is a dataset change, it sends all field values (* only fields supported) using Dataset Object.
To allow the component to search records on the dataset, you need to specify which fields are the Key, example: if in your dataset, ID field is the key you will need to write a code like this
procedure OnAfterOpenDataSet(DataSet: TDataSet);
begin
DataSet.FieldByName('ID').ProviderFlags :=
Dataset.FieldByName('ID').ProviderFlags + [pfInKey];
end;
TsgcWSPServer_Dataset: Server Protocol Dataset VCL Component.
TsgcWSPClient_Dataset: Client Protocol Dataset VCL Component.
Javascript Component: Client Javascript Reference.
If you want to test this protocol with your favourite Web Browser, please type this URL (you need to define your custom host and port)
http://host:port/dataset.esegece.com.html