Hi i am a .net web developer, currently working on a project which needs to retrieve market data from database may be called
Tick Data, something like
Forex Market Dynamic Price which(which dynamically updates every milliseconds)
As i said i am a .net developer so to retrieve data i am using MSSQL DB with suitable
Stored Procedure and
WebMethods inside ASMX for
AJAX and i am calling the WebMethod from Ajax every 1000 ms.
My question is?
I have more than 50 such ajax calls with 1000 ms intervals in one page, will it not create any problem on our client's end.
As my developer pc is strong so till now i am not facing any browser sucking problems, but once or twice i kept that page idle over the browser for more than 2 hrs and it becomes irresponsible for 1 or 2 minutes after any click.
I already used signalR earlier but not satisfied so using it this way.
Here is one small ajax code sample
<pre><script>
$(document).ready(function () {
GetBalance();
function GetBalance() {
$.ajax({
type: "POST",
url: 'Default.aspx/GetBalance',
data: "{'UserId' : '" + $("#Clientid").val() + "'}",
dataType: "json",
contentType: "application/json; charset=utf-8",
success: function (response) {
$('#signalBalance').html('$' + response.d);
setTimeout(function () {
GetBalance();
}, 1000);
},
error: function (response) {
alert('Balance err: ' + response);
}
});
}
});
</script>
Suggest me if you have any important suggestion.
Regards
What I have tried:
I already used microsoft signalR with some hug classes