-
Notifications
You must be signed in to change notification settings - Fork 55
Description
In the test get-parent-location.ol added in this branch https://github.com/jolie/jolie/tree/enhancement/get-parent-location it is reported the use case where it is necessary to have a getLocalParentLocation@Runtime from an embedded service.
In the proposed scenario, there is an embedded service called JsonSchema imported from json-schema-get-parent-location.ol. This service embeds two private services JsonSchema2 and JsonSchema3 which re-implements a subset of the api of JsonSchema (depending on the json schema version requested).
The problem is that the api of JsonSchema2 and JsonSchema3 require to call back the other operations of the parent JsonSchema.
The solution is solved defining an internal localtion "local://internalJsonSchema" for binding the children to the parent.
BUT
if we import JSonSchema twice, an "Address already used"error is raised because the location "local://internalJsonSchema" has been reserved by the first instance of JsonSchema.
This architecture is very interesting for addressing the Strangler Pattern. I think that having a getLocalParentLocation@Runtime could definitively solve this problem by allowing a child to bind an outputPort to the parent.