-
Notifications
You must be signed in to change notification settings - Fork 1.1k
expose RemoteActorRef APIs for extensibility #3304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
expose RemoteActorRef APIs for extensibility #3304
Conversation
/// <param name="actorPath">The remote path of the actor on its physical location on the network.</param> | ||
/// <param name="localAddress">The local path of the actor.</param> | ||
/// <returns>An <see cref="IInternalActorRef"/> instance.</returns> | ||
protected virtual IInternalActorRef CreateRemoteRef(ActorPath actorPath, Address localAddress) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needed to expose a factory method here inside the RemoteActorRefProvider
that for changing the underlying RemoteActorRef
implementation to a version that can be instrumented. This is stuff we're using for remote propagation of tracing information mostly.
@@ -121,6 +121,20 @@ namespace Akka.Remote | |||
void Remove(T resource); | |||
void Reset(); | |||
} | |||
[Akka.Annotations.InternalApiAttribute()] | |||
public interface IRemoteActorRefProvider : Akka.Actor.IActorRefProvider |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Biggest change in this PR is the introduction of the IRemoteActorRefProvider
interface and its adoption throughout the internals of Akka.Remote. This makes it possible to extend Akka.Remote's capabilities (such as, introducing instrumentation) without having to re-implement all of the internals.
This is an InternalApi
and may be subject to change, but most of the consumption of this interface all occurs internally within Akka.Remote, hence why some of the changes to Endpoints.cs
et al don't show up in the API diff. This change is binary compatible with previous versions of Akka.NET.
…ntheweb/akka.net into expose-remoteactorref-api
…ntheweb/akka.net into expose-remoteactorref-api
* expose RemoteActorRef APIs for extensibility * made ClusterActorRefProvider public * created IClusterActorRefProvider marker interface
* expose RemoteActorRef APIs for extensibility * made ClusterActorRefProvider public * created IClusterActorRefProvider marker interface
Implementing this change for reasons similar to #3300
Also, all of the other
IActorRef
implementations such asLocalActorRef
andRepointablActorRef
are similarly extensible.