LANThrax
Username: Password:  
Sign In
Remember me
Sign Up Now
Forgot Password

ASP.NET Problem

Last seen 11-Mar-13 23:24:24
Level 1
Lance Corporal
LANThrax Extremist (90 straight daily logins)
3
Log in everyday for 30 consecutive daysLog in everyday for 60 consecutive daysLog in everyday for 90 consecutive days

Hi ppl!! I am a beginner in ASP.NET and web development so I thought that someone might help me...I have a GridView displaying some contents of the database and I need it to update as soon as new data enters the database from an external source. Is it possible to do it without polling the database?? Thanks

1 
Last seen 23-May-13 21:34:28
Level 5
Feldwebel
LANThrax Extremist (90 straight daily logins)
7
Log in everyday for 30 consecutive daysLog in everyday for 60 consecutive daysLog in everyday for 90 consecutive days

What exactly is the external source? If you have control over it (the external source) you could get around it by firing an event as soon as you have inserted your data from the external source.

Last seen 11-Mar-13 23:24:24
Level 1
Lance Corporal
LANThrax Extremist (90 straight daily logins)
3
Log in everyday for 30 consecutive daysLog in everyday for 60 consecutive daysLog in everyday for 90 consecutive days

The external source will be a mobile application connected to a different server which inserts new data to the main (shared) database. The users which are logged on must then be informed that new data is present...preferably in real time :/. 

Last seen 23-May-13 21:34:28
Level 5
Feldwebel
LANThrax Extremist (90 straight daily logins)
7
Log in everyday for 30 consecutive daysLog in everyday for 60 consecutive daysLog in everyday for 90 consecutive days

I would recommend that your client always has to go through your server and never directly to the database. To my knowledge also most systems which claim to be real time are not strictly real time, so depending on your application you can, most of the time, get away with 'old' data. Usually allowing 5-15 minute intervals suffices.

 

Another thing you could do would be to make the entire process event driven, so basically once a mobile device updates the database, through a process which I am assuming you have control on you can fire an event and the server will make the data available and send a notification (another event) to all the logged in clients. You could use multithreading to make this process a bit faster.

 

Laslty, I do not have much experience with web development in .NET, so maybe you could wait a day or two till people with more knowledge can get here and help. I also tend to find http://www.stackoverflow.com very helpful, so you might want to give it a shot.

Last seen 26-May-13 00:41:16
Level 9
Stabsfeldwebel
LANThrax Extremist (90 straight daily logins)
80
Log in everyday for 30 consecutive daysLog in everyday for 60 consecutive daysLog in everyday for 90 consecutive daysVote like the majority 25 times since 24-OCT-2011Vote 50 times since 24-OCT-2011Correctly predict the outcome of the voting game 40 times since 24-OCT-2011Incorrectly predict the outcome of the voting game 15 times since 24-OCT-2011Vote against the trend 25 times since 24-OCT-2011

The easiest way to do is using an ajax timer that triggers a method every couple of seconds. The timer is on the left hand side of visual studio  under the section ajax. drag it on the aspx page and double click on it to create the ontick event.

Last seen 25-May-13 18:55:16
Level 24
Generale d'Armata+
LANThrax Extremist (90 straight daily logins)
970
Get 10/10 in Trivia 3 TimesGet 10/10 in Trivia 6 TimesGet 10/10 in Trivia 9 TimesLog in everyday for 30 consecutive daysLog in everyday for 60 consecutive days50 Boxart GuessesLog in everyday for 90 consecutive days100 Boxart Guesses150 Boxart GuessesSolve the code breakers puzzle 25 timesDonate at least €14 to the LANThrax causeSolve the code breakers puzzle 50 timesSolve the code breakers puzzle 75 timesComplete the sticker albumIncorrectly predict the outcome of the voting game 15 times since 24-OCT-2011Vote like the majority 25 times since 24-OCT-2011Vote 50 times since 24-OCT-2011Vote against the trend 25 times since 24-OCT-2011Correctly predict the outcome of the voting game 40 times since 24-OCT-2011Get suggested polls approved 25 times since 24-OCT-2011

The easiest way to do is using an ajax timer that triggers a method every couple of seconds. The timer is on the left hand side of visual studio  under the section ajax. drag it on the aspx page and double click on it to create the ontick event.

vellarod1

But that would be polling, which, as I understood, is to be avoided. Nevertheless, that is how I would have done it. Maybe as Xeon suggested, StackOverflow would have the answer. I rely on them too.
 

Last seen 23-May-13 21:34:28
Level 5
Feldwebel
LANThrax Extremist (90 straight daily logins)
7
Log in everyday for 30 consecutive daysLog in everyday for 60 consecutive daysLog in everyday for 90 consecutive days

If you will rever to stackoverflow for design pointers (which I recommend) be sure to include what you have thought and/or tried. Keep in mind that these people will provide you with assistance out of their good will, and do not like questions like: I have this problem, please solve it for me...

Last seen 11-Mar-13 23:24:24
Level 1
Lance Corporal
LANThrax Extremist (90 straight daily logins)
3
Log in everyday for 30 consecutive daysLog in everyday for 60 consecutive daysLog in everyday for 90 consecutive days

Thanks for your feedback!! I ended up implementing an AJAX timer to poll the database as there doesn't seem to be  any alternative :/.

1 


You can only post questions and replies when you are logged in. You can enlist for free by clicking here.
Page generated in 2.559 seconds