diff --git a/src/io/thrift/thrift_handle.hpp b/src/io/thrift/thrift_handle.hpp
index d28cab204..834d81070 100644
--- a/src/io/thrift/thrift_handle.hpp
+++ b/src/io/thrift/thrift_handle.hpp
@@ -11,11 +11,14 @@
#pragma once
+#include "io/message_conversion.hpp"
#include "io/transport.hpp"
namespace memgraph::io::thrift {
using memgraph::io::Address;
+using memgraph::io::OpaqueMessage;
+using memgraph::io::OpaquePromise;
class ThriftHandle {
// the responses to requests that are being waited on
@@ -24,16 +27,27 @@ class ThriftHandle {
// messages that are sent to servers that may later receive them
std::map
> can_receive_;
+ // TODO(tyler) thrift clients for each outbound address combination
+ std::map clients_;
+
public:
template
void SubmitRequest(Address to_address, Address from_address, uint64_t request_id, Request &&request, Duration timeout,
- ResponsePromise &&promise);
+ ResponsePromise &&promise) {
+ // TODO(tyler) simular to simulator transport, add the promise to the promises_ map
+
+ Send(to_address, from_address, request_id, request);
+ }
template
- requires(sizeof...(Ms) > 0) RequestResult Receive(const Address &receiver, Duration timeout);
+ requires(sizeof...(Ms) > 0) RequestResult Receive(const Address &receiver, Duration timeout) {
+ // TODO(tyler) block for the specified duration on the Inbox's receipt of a message of this type.
+ }
template
- void Send(Address to_address, Address from_address, uint64_t request_id, M message);
+ void Send(Address to_address, Address from_address, uint64_t request_id, M message) {
+ // TODO(tyler) call thrift client for address (or create one if it doesn't exist yet)
+ }
};
} // namespace memgraph::io::thrift