DataSource.NET
8.0.3.290770-7760911e
|
DataSource.NET is a .NET assembly that provides an implementation of the Caplin DataSource 5 API and protocol for use by .NET applications. With Caplin DataSources, you can create applications that use Caplin's DataSource protocol to send financial market data in the form of structured records to other DataSource-enabled applications.
It is recommended that you read the DataSource Overview to gain an understanding of:
DataSource.NET provides the following capabilities
You typically use the DataSource API to integrate an external entity that provides data, into a DataSource network. The basic steps for doing this are:
The code example below shows all these steps, apart from the first one.
The API includes several types of Publisher that implement the IPublisher interface. For example, there is a Broadcast Publisher (IBroadcastPublisher), which sends updates to all connected peers regardless of whether they have requested the subject. You create an instance of a particular Publisher by calling a CreateXXXPublisher() method on the DataSource.
A namespace determines which particular subjects can have their data published by a given IPublisher. The rules defining what subjects are in a particular namespace are determined by implementations of the INamespace interface. An INamespace instance is associated with an IPublisher when you call the CreateXXXPublisher() method on the DataSource. The IPublisher uses the INamespace to ensure that its associated IDataProvider only receives requests for subjects in a specified namespace.
You can write your own implementation of INamespace, but the API provides some ready-made implementations that should be suitable for most situations - see PrefixNamespace and RegexNamespace
For example, PrefixNamespace ensures that data is only published if its subject matches the specified prefix. So, if the prefix supplied in the constructor for an instance of PrefixNamespace is " /I/ ", data with the subject " /I/VOD.L " will be published, whereas data with the subject "/R/VOD.L " will not be published.
In this example, the implementation of IDataProvider is called ExampleDataProvider, and the INamespace class used is PrefixNamespace.
DataSource.Net comprises 4 DLLs: the DataSource.NET.dll, datasrc.dll, pthreadVC.dll and hs_regex.dll. All 4 DLLs must be available to a DataSource.NET application.