Today, we have Actor for Dapr implemented in 3 languages: C#, Java and Python. Each language has their own convention in how a method should be named. Then, actor method invocation does not work cross language without the caller breaking the language's convention when defining the Actor's interface.
Example of Actor interface in the service side in C#:
public interface IMyActor : IActor
{
Task<int> IncrementAndGetAsync(int delta);
}
Now, the same interface could be represented at the caller's side in Java:
@ActorType(name = "MyActor")
public interface MyActor {
@ActorMethod(name = "IncrementAndGetAsync")
int incrementAndGet(int delta);
}
Instead of:
@ActorType(name = "MyActor")
public interface MyActor {
int IncrementAndGetAsync(int delta);
}
This feature should also work the other way around, where the Java service would accept "IncrementAndGetAsync" instead of the native method name.
Note: The SDK already contains the @ActorMethod annotation but it does not have the name attribute.
Relates to: dapr/dapr#1165
Today, we have Actor for Dapr implemented in 3 languages: C#, Java and Python. Each language has their own convention in how a method should be named. Then, actor method invocation does not work cross language without the caller breaking the language's convention when defining the Actor's interface.
Example of Actor interface in the service side in C#:
Now, the same interface could be represented at the caller's side in Java:
Instead of:
This feature should also work the other way around, where the Java service would accept "IncrementAndGetAsync" instead of the native method name.
Note: The SDK already contains the
@ActorMethodannotation but it does not have thenameattribute.Relates to: dapr/dapr#1165