This project includes the source code of the Lightstreamer .NET Remote Adapter. This resource is needed to develop Remote Data Adapters and Remote Metadata Adapters for Lightstreamer Server in a .NET environment.
Each Lightstreamer session requires the presence of an Adapter Set, which is made up of one Metadata Adapter and one or multiple Data Adapters. Multiple Adapter Sets can be plugged onto Lightstreamer Server.
The adapters will run in a separate process, communicating with the Server through corresponding Proxy Adapters embedded in the Lightstreamer server.
This SDK is designed for .NET Standard API Specifications 2.0 and greater. The .NET Standard allows greater uniformity through the .NET ecosystem and works seamlessly with .NET Core, .NET Framework, Mono, Unity, Xamarin and UWP apps.
Lightstreamer Server exposes native Java Adapter interfaces. The .NET interfaces are added through the Lightstreamer Adapter Remoting Infrastructure (ARI).
ARI is simply made up of two types of Proxy Adapters and a Network Protocol. The two Proxy Adapters, one implementing the Data Adapter interface and the other implementing the Metadata Adapter interface, are meant to be plugged into Lightstreamer Kernel.
Basically, a Proxy Adapter exposes the Adapter interface through TCP sockets. In other words, it offers a Network Protocol, which any remote counterpart can implement to behave as a Lightstreamer Data Adapter or Metadata Adapter. This means you can write a remote Adapter in any language, provided that you have access to plain TCP sockets.
But, if your remote Adapter is based on certain languages/technologies (such as Java, .NET, and Node.js), you can forget about direct socket programming, and leverage a ready-made library that exposes a higher level interface. Now, you will simply have to implement this higher level interface.
In this specific project we provide the full source code that makes up the Lightstreamer .NET Standard Adapter API library. So, let's recap... the Proxy Adapter converts from a Java interface to TCP sockets, and the .NET Standard library converts from TCP sockets to a .NET interface.
To build the library, follow below steps:
- Create a new Visual Studio project (we used Visual Studio 2019) for
Class Library (.NET Standard) - Remove auto created class.cs source file
- Add all the existing resources contained in the
DotNetStandardAdapterfolder - Add NuGet references for:
- System.Configuration.ConfigurationManager (>= 4.7.0)
- Build the project
This project includes a simple full implementation of Remote Metadata Adapter in C# made available as sample for inspiration and/or extension.
The LiteralBasedProvider is the .NET Remote equivalent of the LiteralBasedProvider Metadata Adapter in Lightstreamer Java In-Process Adapter SDK. It extends the MetadataProviderAdapter abstract class (which in turn implements the IMetadataProvider interface). It is used in Lightstreamer examples and demos based on the .NET Remote Adapter SDK, in combination with suitable Data Adapters and Clients.
The LiteralBasedProvider can be configured through suitable initialization parameters. See the class documentation for details.
The library is compatible with Adapter Remoting Infrastructure since Server version 7.4.
For a version of this library compatible with earlier versions of Lightstreamer Server see this tag.
Full changelog: CHANGELOG.md
- Lightstreamer - "Hello World" Tutorial - .NET Adapter
- Lightstreamer - Stock-List Demo - .NET Adapter
- Lightstreamer - Portfolio Demo - .NET Adapter
For questions and support please use the Official Forum. The issue list of this page is exclusively for bug reports and feature requests.
