Skip to content

Conversation

Aaronontheweb
Copy link
Member

Implementing this change for reasons similar to #3300

Also, all of the other IActorRef implementations such as LocalActorRef and RepointablActorRef are similarly extensible.

/// <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)
Copy link
Member Author

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
Copy link
Member Author

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.

@Aaronontheweb Aaronontheweb merged commit 5e80ee4 into akkadotnet:dev Feb 1, 2018
@Aaronontheweb Aaronontheweb deleted the expose-remoteactorref-api branch February 1, 2018 17:08
@Aaronontheweb Aaronontheweb added this to the 1.3.4 milestone Feb 1, 2018
Aaronontheweb added a commit that referenced this pull request Feb 1, 2018
* expose RemoteActorRef APIs for extensibility

* made ClusterActorRefProvider public

* created IClusterActorRefProvider marker interface
Aaronontheweb added a commit that referenced this pull request Feb 19, 2018
* expose RemoteActorRef APIs for extensibility

* made ClusterActorRefProvider public

* created IClusterActorRefProvider marker interface
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants