|
When adding a shard we currently create a shard object that is only used to obtain a targeter. Then, we proceed to use this targeter and a helper function to communicate with the shard. We should be able to use the shard object to communicate with the shard instead. Initially this was not possible because the RSM code was intrinsically called, and this causes problems because the RSM automatically do changes in the ShardRegistry. The main problem with this is that we have duplicated code to handle the communication with the shard which is already implemented for example in the ShardRemote class.
We should refactor the addShard code to use a Shard object for communications. This might imply creating a custom Shard object that does not communicate with the RSM nor the ShardRegistry. It is also part of this ticket analyze if we need to use the new async_rpc library.
|