I partially found a solution to my question, but I'm not really satisfied with the result.
My application consists of ASP.NET MVC + MS SQL Server.
The case is as follows:
- An external application saves data periodically to the SQL Database. In one tenth of a second, 20 to 100 records can be saved.
- SQL should be polled from the back-end, or there should be push notifications after each save, in order to update (for example) a running total of saved items.
- The back-end will push notifications to the UI (this will be done using SignalR)
I followed this tutorial http://venkatbaggu.com/signalr-database-update-notifications-asp-net-mvc-usiing-sql-dependency/ to set it up.
SqlDependency with broker service is used to get push notifications from SQL firing the OnChange Event. The problem is that this solution is very slow. There is only one record saved every second for a small database, and the events fire with pretty big delays.
Is there another technology to get data changes from SQL? Or maybe the solution I'm using requires some kind of optimization?