The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

fabions (3) [Avatar] Offline
#1
Hello,

I have just started studing SCA but it seems that services are always wired to references manually during application assembling or automatically during deployment time (using autowire attribute). I would like to "rewire" references to services dinamically based on non-funtional requirements (like performance, for example), is it possible?

Thank you very much,

Fábio
simon.laws (19) [Avatar] Offline
#2
Re: Dinamic Bind
Hi

In 1.x we don't support dynamic rewiring of references out of the box. However, depending on what environment you want to run in and what you are trying to achieve there are ways round this. For example, imagine you want to load balance you services across a cluster of web containers sitting behind an IP sprayer. To make this you you could start a a node on each cluster member all running the same application. However you configure the domain as though the application is running once and provide the ip address of the ip sprayer. References to the services in the cluster will then point to the sprayer and not the individual services. Hence the Tuscany runtime itself doesn't do any dynamic rewiring but relies on the sprayer to re-route messages.

In 2.x we do have some ability to detect when an endpoint has moved and rewired it. It works at a basic level but early days for 2.x at the moment .

Simon