-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a cougar client batch interface #9
Comments
Been thinking about this recently. Should offer sync and async interfaces. Suggested pattern: On client have a call: void createNewBatchCall():BatchClient[Async](ExecutionContext, Timeout [, Observer]). Returned BatchClient interface has method for each method on interface, which either accepts an observer (async interface), or returns a typed future (sync interface). It also has a makeBatchCall() method which fires off the batch call as an operation key with the Cougar service name (c.f. json rpc identity resolution) and the makeBatchCall method name (or some special key on the interface). The call returns an exception if the client executable doesn't support batch calls (e.g. rescript). The client then makes the calls and then calls observers/futures as responses are deserialised. We make no atomicity/transactional guarantees about batch calls, we make no promises on the order of completion of the individual method calls, except that all will have completed by the time the makeBatchCall() call returns (via async call back or sync callback). If we make promise that all calls will go to the same Cougar endpoint then we will implement in socket and json-rpc clients (see #90), if not then we can mimic batch call in current socket client (might be able to do this anyway). Suggest we make that guarantee. |
Hi Simon, Have I understood correctly - you're saying that you can only address a Richard. On 1 December 2014 at 13:13, Simon Matic Langford [email protected]
|
Yep
|
Thing this is perfectly reasonable then! On 1 December 2014 at 13:59, Simon Matic Langford [email protected]
|
Think* On 1 December 2014 at 14:12, Richard Mason [email protected] wrote:
|
To me this is a reasonable step along one of the original design goals - On 1 December 2014 at 14:12, Richard Mason [email protected] wrote:
|
No description provided.
The text was updated successfully, but these errors were encountered: