Data Service is the gateway between each application (Cockpit, Data Collect, etc.) and the database it wants to connect to.
Let's say that a single station needs to be able to connect to three different databases using WCF Data Service as follows.
● The station connects to three Data Services split over two separate servers.
● The Data Services then link to databases on another three separate servers.
If needed it would also be possible to have all three Data Services and Databases on the Station.
The station links to the Data Services using the config files for the applications. For instance, in Cockpit.exe.config it would say:
<dataServices>
<add name="Data01" server="ServerWest" bindingType="NetTcp" basePort="8500"/>
<add name="Data02" server="ServerWest" bindingType="NetTcp" basePort="8510"/>
<add name="Data03" server="ServerEast" bindingType="NetTcp" basePort="8500"/>
</dataServices>
The basePort number must be unique for each service on the same server. This number is set when the service is installed but can be modified later in the config file for the service.
The name field does not need to correspond to the name of the database. However, it will be the name presented to the operator in the list of databases when they log in so it should be informative.
The Data Service is linked to a database during installation and the information in the Data Service config file is encrypted.
To change the database that a Data Service calls to you must reinstall the Data Service.
By default the WCF services use the Net.TCP protocol. However, if required, it's possible to change this to use the http protocol. In that case it may be necessary to configure a name space reservation in order for the service to run. Please see the following article which describes how to do this:
http://msdn.microsoft.com/en-us/library/ms733768(v=vs.100).aspx