Skip to content

Conversation

@mamciek
Copy link

@mamciek mamciek commented Mar 20, 2015

Batching request concurrently

@FabioBatSilva
Copy link
Member

Hi @mamciek

I'd love to get batching support into.
But it does not make sense for all the commands.

I can see only a couple of commands where bulk operations can/should be used.
Adding it to the cluster/client would just make it confusing.

Can you change it to be command based instead ?

$fetch  = MultiFetchCommand::builder()
    ->withOption(RiakOption::NOTFOUND_OK, true)
    ->withOption(RiakOption::R, 1)
    ->withLocation($location1)
    ->withLocation($location2)
    ->withLocation($location3)
    ->build();

/** @var $response MultiFetchResponse */
/** @var $result FetchValueResponse */
$response = $this->client->execute($fetch);
$result   = $response->getResult(0);

To implement a new MultXXXCommand changes should be minimal,
and no changes to cluster/client/node it self are required..

Components required should be :

@mamciek mamciek closed this Sep 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants