Closed marotili closed 8 years ago
Don't agree with these points. I have dis-allowed the use of call! in the design. It is a blocking call and really impacts performance (this seems to contradict your point about using blocking calls in your other posts)
It is a common design pattern in actors to return the results of processing to the requesting actor, which is designated as the 'from' ref. This pattern is used in many places in the design.
Your approach is one possibility but I would be concerned about the volume of spawned fibres required to support the volume of concept requests, it could potentially be 10's of thousands per second.
not an issue.
If the initial
cast!
to theconcept-creator
did not origin from a server, thecast!
will fail. It also introduces implicit knowledge (that from is the task-dispatcher).As an alternative, the
:create-concept-msg
could be changed to acall!
and return the concept as a response. Thetask-dispatcher
can then spawn a fiber that calls:create-concept-msg
and sends the:task-msg
to the return value of thecall!