Developing Data Links and Server Connections

Tracking Server provides two mechanisms to input real-time data into the system: server connections and data links. Each method uses Microsoft Component Object Model technology to communicate with the server. The best tool for developing tracking server data links or server connections is the C++ development language and Microsoft’s Active Template Library. While server connections and data links achieve the same result, they differ architecturally, providing different benefits. The connections are detailed in the following sections. The table below gives a brief summary of the differences between the two.

Regardless of the mechanism selected to communicate with the server, one more step is required for the server to understand the data format of the real-time data. This step requires that a message definition be defined using the Tracking Server Manager. Once a message definition has been created, the server is instructed to publish the data as a service.

Server Connection

Data Link

Debugs application outside server

Debugs within server application space

Low server impact

Interacts closely with server

Simpler development

More complex development

Runs as a separate application

Runs within real-time message server process

Stand-alone application (requires user to be logged in to the host machine)

Lifetime controlled by Tracking Server

Can require an ArcGIS license

Does not require an ArcGIS license

Server Connection

A server connection is a stand-alone application that connects to Tracking Server using the IServerConnection interface.

Benefits

  • Easier debugging. Since the server connection runs outside the process area of Tracking Server, it can be debugged within the development environment.
  • Low impact to server. Since the server connection is outside the Tracking Server process space, if the Server Connection program encounters a problem—for example, if it crashes—it will not affect the server or other connections to the server.
  • Simpler interface. The server connection interacts with Tracking Server through a single interface. However, this places more emphasis on code that needs to be developed.
  • Can be used to easily upgrade an existing application to connect to Tracking Server. The application should run on the host machine, since a remote application will run into issues with Distributed COM (DCOM).

Drawbacks

  • Not integrated with server. A server connection runs as a separate application from Tracking Server. Therefore, Tracking Server does not automatically control a server connection.
  • Requires authenticated user. The server connection application must provide a user name and password to connect to Tracking Server. This user name and password must be a valid and enabled local account on the server on which Tracking Server is running.

Data Link

A data link connects to the server through a series of interfaces including IPlugin and IClientConnection. To make creating a data link easier, use the Tracking Data Link ATL wizard. It will create a base set of C++ classes that have implemented the necessary Tracking Server interfaces, requiring customization in the areas of information required by the data link to perform its task.

Benefits

  • Can run as a service. A data link runs in the same memory space as Tracking Server. When the Tracking Server service is started, it can automatically start the data link.
  • Advanced data management provided. The data link architecture encapsulates data structures to manage the queuing of data internal to the data link, decreasing the amount of custom code that needs to be generated.
  • ATL wizard provided for C++ developers. This wizard runs in Microsoft Visual C++ and creates most of the code required for many of the data link methods.

Drawbacks

  • Difficult to debug. Because the data link runs in the Tracking Server memory space, the debugging methods are more complicated.
  • More complicated development. A data link is made up of two COM objects: the actual data link and a configuration object.
8/21/2012