kalix-javascript-sdk icon indicating copy to clipboard operation
kalix-javascript-sdk copied to clipboard

Convenience APIs for calling other components in the same service

Open johanandren opened this issue 3 years ago • 2 comments

Currently you have to do some hoops to call other components in the same service, especially if calling it from typescript.

If possible we'd want the same automatic enumeration of other components in the same deployed service like in the Java/Scala SDK: https://docs.akkaserverless.dev/java/actions-as-controller.html#_composing_calls

johanandren avatar Feb 17 '22 14:02 johanandren

For the record on how this is implemented in the Java SDK the proxy informs the service of selfHostName upon discovery so that it knows where to talk to "itself" without a host name, for running locally/testing we manually set localhost and port 9000 so that it can reach the local proxy.

johanandren avatar Feb 17 '22 14:02 johanandren

For the record this is an example of the TS hoops needed when doing this manually as currently needed:

image

johanandren avatar Feb 17 '22 14:02 johanandren