Why Targets?
Posted by Craig Sutherland on 17 August, 2009
This post is the answer to a question I was asked recently.
The Question
Looking at the add server window, there is an address field and a target server field:
The question was why are both necessary?
The Answer
The answer to this question lies in the way the different components of CruiseControl.NET (CC.NET) communicate. The following picture shows the components and their interactions:
What we are really interested in monitoring is the CC.NET. However, the server is not always what is connected to. It is only a direct connection if .NET Remoting is used (or a custom protocol). If someone is connecting via the web dashboard, the address they enter is the address of the dashboard, not the CC.NET server.
Since we want to monitor the actual server, not the dashboard, the target server field is required. This tells the dashboard that although it has received a request, the request for for an actual CC.NET server and needs to be passed on.
Now, in CCTray this field is not needed. But then a lot of the functionality in CCTray is only available for a .NET Remoting connection – they will fail on a HTTP connection. And this is exactly the reason why they fail – the dashboard guesses which server the request should be sent to, and it can’t always get the right server!
Related Questions
This leads to a few other questions:
1: What is the target server for a dashboard connection?
In the dashboard, it displays the available target servers:
The available servers are listed on the left under the heading “Servers”.
2: What is the target server for a .NET Remoting connection?
Currently this is ignored, but in future CC.NET may handle routing to other servers (i.e. in a farm scenario). Therefore, this should be left as “local”. This will tell CC.NET that the request is for the local server and should not be passed on.
3: Is there a way of listing the servers in the monitor?
At the moment CC.NET does not provide a list of possible target servers. This needs to be added to CC.NET first (i.e. in the dashboard) and then I can add the listing to the monitor.
This is on the to-do list, but first I need to resolve some of the other issues in FastForward.NET.
4: If I want to monitor multiple CC.NET servers that are on one dashboard, do I need to add them individually?
Yes. FastForward.NET monitors the individual servers – not the dashboard.
In future I may add the ability to monitor a dashboard instead of the individual servers – but this means the interactions that are currently provided will be more limited (i.e. to what is allowed by the dashboard).
RSS - Posts