SmartClient Version v9.1p_2014-05-27/Enterprise nightly build of (2014-05-27)
Chrome (not relevant)
We have a ListGrid bound to a server-side custom datasource.
The datasource overrides executAdd, executeFetch, executeUpdate and executeDelete methods following the SmartClient example for hard-coded datasource.
We also have a custom server-side validator that also follows the example code in the SmartClient SDK.
The reason for this solution is that the data is stored to a 3-rd party noSQL store that uses custom socket layer communications protocol. The data store also has a separate validation protocol, which we plug to our custom validator.
Everything works well when we add or update small number of records.
But if we want to add big number of records at once, on the client side we do:
All records are properly validated and added to the data store and displayed in the grid, but:
The problem is that the 3-rd party system has significant communications latency. On the other hand it can validate multiple records at once if provided as an array or list of records.
But when you validate the records one by one the communications latency is added to each validation request. The latency can reach up to a second, where the actual validation is almost instant - couple of milliseconds. Because of that, it takes almost the same time if you validate and add 100 records in a batch or you validate and add just 1 record.
Because of the specific SartClient implementation of the RPCRequest processing on the server side, we receive separate validation call for each individual request in the queue and after that separate executeAdd or executeUpdate call for each request in the RPCManager queue.
Than because of the communications latency with the 3-rd party system - if we try add for example 50 or 100 records, it takes too long and sometimes the RPC call times out while the server-side RPCManager is still processing the queue.
The question: Is there any hook in the RPCManager processing that we can use and perform the validation for all requests in the queue as a single call to the 3-rd party system instead of processing them one by one. The same applies for the following add or update operation - perform a single add/update request with the entire list of requests in the queue instead of separate call for each item in the queue?
I though about using "custom" operation on the datasource, but than the question is how to perform the client cache synchronisation which happens automatically with the standard operations?
Chrome (not relevant)
We have a ListGrid bound to a server-side custom datasource.
The datasource overrides executAdd, executeFetch, executeUpdate and executeDelete methods following the SmartClient example for hard-coded datasource.
We also have a custom server-side validator that also follows the example code in the SmartClient SDK.
The reason for this solution is that the data is stored to a 3-rd party noSQL store that uses custom socket layer communications protocol. The data store also has a separate validation protocol, which we plug to our custom validator.
Everything works well when we add or update small number of records.
But if we want to add big number of records at once, on the client side we do:
Code:
isc.RPCManager.startQueue();
recordList.forEach(function(record){
theGrid.addData(record);
});
isc.RPCManager.sendQueue();The problem is that the 3-rd party system has significant communications latency. On the other hand it can validate multiple records at once if provided as an array or list of records.
But when you validate the records one by one the communications latency is added to each validation request. The latency can reach up to a second, where the actual validation is almost instant - couple of milliseconds. Because of that, it takes almost the same time if you validate and add 100 records in a batch or you validate and add just 1 record.
Because of the specific SartClient implementation of the RPCRequest processing on the server side, we receive separate validation call for each individual request in the queue and after that separate executeAdd or executeUpdate call for each request in the RPCManager queue.
Than because of the communications latency with the 3-rd party system - if we try add for example 50 or 100 records, it takes too long and sometimes the RPC call times out while the server-side RPCManager is still processing the queue.
The question: Is there any hook in the RPCManager processing that we can use and perform the validation for all requests in the queue as a single call to the 3-rd party system instead of processing them one by one. The same applies for the following add or update operation - perform a single add/update request with the entire list of requests in the queue instead of separate call for each item in the queue?
I though about using "custom" operation on the datasource, but than the question is how to perform the client cache synchronisation which happens automatically with the standard operations?