Saturday 16 June 2012

Trading and Finance application on .Net platform for performance benefits

Real time trading and finance applications have to be performance oriented in order to allow the real time updating process along with automatic sorting. The .Net performance enhances this performance for the real time trading and finance applications with the use of many available features. .Net performance features allow techniques like grid update of the real time data which can be sorted based on the needs. Even the .Net performance benefits allow high amount of data to be inserted directly in the rows for further sorting techniques. In trading applications every minute there might be millions of rows which are being updated. Tips and tools of the .Net performance features enable perfect insertion of the data into the rows and the columns of the grid view in the application. Though the general rate of .Net performance might vary for various trading applications in multiple configurations, the general concept of performance enhancement remains the same.
For example while updating the data in a non event model based development might use the .Net performance feature as listed below.
grid.Rows.Add(new object[]{"val1", 153, true, DateTime.Now});
//The required data is updated by calling the Cell.Value property.
Row r1 = ...;
Cell c1 = r1 [0];
c1.Value = "val2";

There are other .Net performance features too which allows multiple different types of data objects to be updates on the grid in real time. For example the .Net performance feature ThreadSafeBindingList is used in place of general BindingList in order to make the application a thread safe one.

grid.Sort.Enabled = false;
grid.DataSource = _datasource_;
//Add one object to the launch of the grid
grid.Nodes.Insert(0, _new_object_);

//Add one object to the start of the binding list
IBindingList bl = ...;
bl.Insert(0, _new_object_);

If in the above .Net performance case “grid.Sort.Enabled = true;” is used then the data is supposed to be automatically updated and sorted. But the .Net performance case is not used in order to avoid issues with large volumes of data. While developing .Net performance based applications not only performance but security of the data also needs to be kept in mind by the developers to avoid disastrous results.
For example it is not a good idea to format the values of the data in .Net performance based applications, directly into the object. 

class DateEx1
{
    ...

    // Not a good idea   
     public string FormattedD1
    {
        get { return string.Format("{0:yyyy-MM-dd}", _date); }
    }

    //Better idea: the property must return a non formatted value
    [Format("yyyy-MM-dd")]
    public DateTime D1
    {
        get { return _date; }
    }
}


Large data volumes can be added easily using the .Net performance features like INotifyPropertyChanged and IBindingList. These two .Net performance features allows the real time data update procedure in much safe and interactive way, so that no data is lost form this huge volume.

1 comment:

  1. Dapfor .Net Grid and helps toevaluate its performance and to understand, which modes should be used for specific applications.

    Test configuration:

    Intel Core 2 Quad Q6600 2.40 GHz, Memory : 2 GB, OS Windows Vista SP2, display resolution: 1920 x 1280
    Tested grid dimensions: 1890 x 813. During all tests the grid is always visible on the screen dapfor. com

    ReplyDelete