Skip to content

IgniteUI/finjs-web-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SignalR Real-time ASP.NET

The finjs-web-api is a Real-time ASP.NET API built with SignalR

Demo location

Both Financial Grid and DockManages with dynamic creation of Grids can be found here.

Usage

  • The updated records count is based on the requested data volume (10% of the requested data). The point of this functionality is to mimic as close as possible a real-time data update.
  • Two models FinancialData and PercentChange
  • There is a fallback logic for the case when the end point API is not reachable. In that case a local data would be used.

Establish hub connection

this.hubConnection = new signalR.HubConnectionBuilder()
    .configureLogging(signalR.LogLevel.Trace)
    .withUrl('https://www.infragistics.com/angular-apis/webapi/streamHub')
    .build();
this.hubConnection
    .start()
    .then(() => {
        this.hasRemoteConnection = true;
        this.registerSignalEvents();
        this.broadcastParams(interval, volume, live, updateAll);
    })
    .catch(() => {
    ...

Use updateparameters service method in order to change the data update frequency, the data volume and whether to stop the live feed.

this.hubConnection.invoke('updateparameters', frequency, volume, live, updateAll)
    .then(() => console.log('requestLiveData', volume))
    .catch(err => {
        console.error(err);
    });

Another way to stop the live feed is by using the StopTimer service method

this.hubConnection.invoke('StopTimer')
    .catch(err => console.error(err));

...

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages