Open tjaskula opened 4 years ago
@VaughnVernon Could you check if described problem is accurate enough ?
It's linked with #55
@tjaskula Seems like what I wrote in Slack.
@VaughnVernon the first part yes. To set up the context. Then followed the discussion I had with Alexandros
How current implementation of
ICompletes
may fail :In fact the clients registration of continuations and server execution may kick in unpredictable times. If we use the same instance (as we curerntly do) the transformations applied by the client, may happen before the transformations applied by the actor which is confusing and complicated to ensure consistent ordering of the transformations to be applied. One of the problems is that this is certainly due to the fact that the same instance of
BasicCompletes
is passed between the client and the server:BasicCompletes
and returns it to the clientLocalMessage
where the server may start executing actions and set resultsThe goal would be to bind the success/error of the completes that the actor method returns to the completes that is handed back to the client by the proxy. This should place in the consumer function that the proxy also creates and put into the actor’s mailbox.
Points to consider:
mailbox.Send(new LocalMessage...
should not require the instance ofBasicCompletes
created in the proxy. Just the consumer function handed to the client should be enough.This may also eliminate the need for the
CompletesEventually
. Today the issue is thatCompletesEventually();
followed byCompletes().AndThen()
orCompletes.Await()
etc. results an exception being thrown (and swallowed later) which leads to hanging, too. That it hangs silently is really bad