The difference between Agent and Actor

  • An agent has a value that can be retrieved directly with deref,However an Actor encapsulates state but provides no direct means to access it.
  • An Actor encapsulates behavior; an agent does not(the function that implements an action is provided by the sender)
  • Actors provide sophisticated support for error detection and recovery, Agents' error reporting is much more primitive.
  • Actors can be remote; Angents provide no support for distribution
  • Composing actors can deadlock; composing agents cannot.
posted @ 2015-03-27 15:54  Justin.cn  阅读(260)  评论(0编辑  收藏  举报