ps/brpc/dist_brpc_ps_client.h
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #pragma once | ||
| 2 | |||
| 3 | #include "base/json.h" | ||
| 4 | #include "ps/base/dist_sharded_client.h" | ||
| 5 | #include "brpc_ps_client.h" | ||
| 6 | |||
| 7 | using json = nlohmann::json; | ||
| 8 | |||
| 9 | namespace recstore { | ||
| 10 | |||
| 11 | /** | ||
| 12 | * @brief Distributed bRPC parameter-server client | ||
| 13 | * | ||
| 14 | * Many-to-many connections; routes keys to shards via a hash function. | ||
| 15 | * Server list and hash method come from JSON config. All logic lives in | ||
| 16 | * DistributedShardedClient<BRPCParameterClient>. | ||
| 17 | */ | ||
| 18 | class DistributedBRPCParameterClient | ||
| 19 | : public DistributedShardedClient<BRPCParameterClient> { | ||
| 20 | public: | ||
| 21 | 10 | explicit DistributedBRPCParameterClient(json config) | |
| 22 | 10 | : DistributedShardedClient<BRPCParameterClient>(std::move(config), | |
| 23 |
1/2✓ Branch 3 taken 10 times.
✗ Branch 4 not taken.
|
10 | "BRPC") {} |
| 24 | }; | ||
| 25 | |||
| 26 | } // namespace recstore | ||
| 27 |