Hi Isomorphic,
please, can you advice me how to approach processing of the queue of the dsRequests?
1. queue of validation requests
We send 2 validate DSRequests in queue to DS.
DS has DMI with validate server method.
In the validate server method we have to call remote validate service.
Remove validate service validates records in bulk - we must send all records from the queue in one call.
Our first approach was processing on last.
Therefore I strive to do all the processing on first:
2. queue of update requests
(for this one I don't have showcase example prepared, but if you would require it, let me know)
We send 2 update DSRequests in queue to DS.
DS has DMI with update server method.
In the update server method we first call validate.
We can update only when the records is marked as valid in the response from the remote service.
When we are using processing on last approach, then I don't how during the processing of last update request from queue, to see the validation responses of the previous requests.
If I call rpcManager.getResponse(dsRequest), then I will get the dummy update request and not the validate response.
Therefore I think that processing on last approach is not possible to use at all and the only option will be to process on the first.
I suspect that the rpcManager.send() doesn't produce proper queue response and that maybe you will find out that you need to fix something.
Or maybe I don't really understand how to properly handle queue and you can give some hint what to try.
Regards,
Matus
PS: code and requests/response example in next post
please, can you advice me how to approach processing of the queue of the dsRequests?
1. queue of validation requests
We send 2 validate DSRequests in queue to DS.
DS has DMI with validate server method.
In the validate server method we have to call remote validate service.
Remove validate service validates records in bulk - we must send all records from the queue in one call.
Our first approach was processing on last.
- In the validate server method acquire all dsRequests.
- If the currently processed dsRequest is not last in the queue then return dummy success dsResponse.
- If the currently processed dsRequest is last in the queue, then call remote service with records from the whole queue.
- Then get dummy success response from the rpcManager and set it up with proper response data and status.
Therefore I strive to do all the processing on first:
- In the validate server method acquire all dsRequests.
- If the currently processed dsRequest is first in the queue, then call remote service with records from the whole queue.
- Then for call rpcManager.send() for every dsRequest from queue and provide proper dsResponse built from the remote service answer.
- If the currently processed dsRequest is not first in the queue then return already set dsResponse in the rpcManager.
2. queue of update requests
(for this one I don't have showcase example prepared, but if you would require it, let me know)
We send 2 update DSRequests in queue to DS.
DS has DMI with update server method.
In the update server method we first call validate.
We can update only when the records is marked as valid in the response from the remote service.
When we are using processing on last approach, then I don't how during the processing of last update request from queue, to see the validation responses of the previous requests.
If I call rpcManager.getResponse(dsRequest), then I will get the dummy update request and not the validate response.
Therefore I think that processing on last approach is not possible to use at all and the only option will be to process on the first.
I suspect that the rpcManager.send() doesn't produce proper queue response and that maybe you will find out that you need to fix something.
Or maybe I don't really understand how to properly handle queue and you can give some hint what to try.
Regards,
Matus
PS: code and requests/response example in next post
Comment