dcapwell commented on code in PR #38:
URL: https://github.com/apache/cassandra-accord/pull/38#discussion_r1162155736


##########
accord-core/src/main/java/accord/api/MessageSink.java:
##########
@@ -27,6 +28,6 @@
 public interface MessageSink
 {
     void send(Id to, Request request);
-    void send(Id to, Request request, Callback callback);
+    void send(Id to, Request request, CommandStore commandStore, Callback 
callback);

Review Comment:
   @aweisberg and I spoke in slack, here is the jist of the convo...
   
   We have `AccordCallback` in C* that translates C* callbacks to Accord 
callback
   We have 3 different networking implementations in accord testing (maelstrom, 
MockCluster, BurnTest)
   
   This means we have 4 different places that need to implement callbacks 
correctly, so need to centralize this logic to avoid copy/paste duplication; 
this is what `SafeCallback` does.
   
   
   Now, we "could" move the `Executor` pointer to `Callback` and make this 
`abstract` (which @aweisberg was proposing) but this doesn't lower memory 
costs, and now adds mutable state into the system.
   
   We could also have a `executor()` method, but would need to update all 
implementations... at the money this is figured out when you try to send a 
message, so this inference is centralized; I feel there is more value to 
centralize the inference than having each callback try



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to