逆コンパイルソースコードを研究から、ActorReference.Bindを使用して私には思えるとActorProxy.Createはほぼ同じである:
public object Bind(Type actorInterfaceType)
{
return ActorProxy.DefaultProxyFactory.CreateActorProxy(actorInterfaceType, this.ServiceUri, this.ActorId, this.ListenerName);
}
public static TActorInterface Create<TActorInterface>(ActorId actorId, string applicationName = null, string serviceName = null, string listenerName = null) where TActorInterface : IActor
{
return ActorProxy.DefaultProxyFactory.CreateActorProxy<TActorInterface>(actorId, applicationName, serviceName, listenerName);
}
ので、信頼性もパフォーマンスのどちらも差がありません。
ActorReference
は、直列化をサポートしているため、アクター間をやりとりするのに適しています。
@MaGuと同意します - 両方の方法でプロキシオブジェクトを作成する必要があるため、違いはありません。唯一の問題はシリアライゼーションですアクターIDだけを渡すと、ActorReferenceよりも効率的になります。 – cassandrad