ascherbakoff commented on a change in pull request #147:
URL: https://github.com/apache/ignite-3/pull/147#discussion_r640437210
##########
File path:
modules/network/src/main/java/org/apache/ignite/network/MessagingService.java
##########
@@ -61,12 +61,23 @@
* returns a future that will be completed successfully upon receiving a
response.
*
* @param recipient Recipient of the message.
- * @param msg A message.
+ * @param msg The message.
* @param timeout Waiting for response timeout in milliseconds.
* @return A future holding the response or error if the expected response
was not received.
*/
CompletableFuture<NetworkMessage> invoke(ClusterNode recipient,
NetworkMessage msg, long timeout);
+ /**
+ * Sends a message asynchronously with same guarantees as {@link
#send(ClusterNode, NetworkMessage)} and
+ * returns a future that will be completed successfully upon receiving a
response.
+ *
+ * @param addr Recipient network address in host:port format.
+ * @param msg A message.
+ * @param timeout Waiting for response timeout in milliseconds.
+ * @return A future holding the response or error if the expected response
was not received.
+ */
+ CompletableFuture<NetworkMessage> invoke(String addr, NetworkMessage msg,
long timeout);
Review comment:
To clearly separate messaging from discovery.
You don't need a node to be discovered to send a message to it and it's
better fits to raft communication model, code is much cleaner. Moreover,
ClusterNode has the address [1]
[1] org.apache.ignite.network.ClusterNode#address
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]