Lines Matching refs:to

5 processing of requests (sent in parallel to the cluster), which can have a 
9 called the "multi interface". This functionality allows languages like PHP to
10 gain concurrency by providing a batch of requests to process. The batch is
12 batch of responses is then returned to PHP.
14 In a single-threaded environment, the time to execute `n` requests is the sum of
15 those `n` request's latencies. With the multi interface, the time to execute `n`
17 available to execute all requests in parallel).
19 Furthermore, the multi-interface allows requests to different hosts
29 the client options to `'lazy'`:
49 _resolve_ the future. If the future has already resolved (due to some other
56 requests will be sent in parallel to the cluster and return asynchronously to
59 This sounds tricky, but it is actually simple thanks to RingPHP's `FutureArray`
77 $doc = $future['_source']; // This call blocks and forces the future to resolve
81 response, causes the future to resolve that particular value (which in turn
109 execution. Batch size defaults to 100 requests/batch.
111 If you wish to force future resolution, but don't need the values immediately,
112 you can call `wait()` on the future to force resolution, too:
140 forces futures to begin resolving (for example, initiate a `curl_multi` call).
157 This changes the behavior to wait on 500 queued requests before sending the
158 batch. Note, however, that forcing a future to resolve causes the underlying
159 curl batch to execute, regardless of if the batch is "full" or not. In this
160 example, only 499 requests are added to the queue, but the final future
161 resolution forces the batch to flush anyway:
197 It is possible to queue up heterogeneous batches of requests. For example, you
253 ==== Caveats to Future mode
255 There are a few caveats to using future mode. The biggest is also the most
256 obvious: you need to deal with resolving the future yourself. This is usually
259 For example, if you resolve manually using `wait()`, you may need to call
261 introduces another layer of wrapped futures, and each needs to be resolved to
266 and fully resolves the future to provide values.
273 When operated in future mode, the unwrapping of the future is left to your
276 will have to take action appropriately.
278 This also applies to `ping()`