Hi, I have built the web application that keep track about tools and personnel. When one user changes data of the database, I want this app can broadcast (to announce) about this event to other users who currently working on the same project and has the current
open internet connection. Is there anyone can give me your advice about this problem? Thank you very much for your help. Brian
While the idea isn't perfect, and certainly not applicable in numerous settings, an iframe used to poll a page can do the trick. Depending on your requirements, the iframe can be hidden or visible, either triggering an event via JavaScript or simply displaying
a message to the user. You might want to investigate XMLHTTP as well, although I believe its support is limited.
web aplications != broadcast. You HAVE to poll. Period. You are not running an application on the client. Maybe you run script, but this is limited. Plus in the majority of cases you can not reach the client computer. You know, firewall, NAT, proxy servers,
all get in you way. Best you could do is a "permanently open page", bu this kills server performance. Have seen it in chat servers, though. THe idea is that you have, in an iframe, a page that basically from the server is never ended- every new chat line is
added to is. The browser keeps loading it. Works, but not something iis etc. like.
You can avoid polling by using MSMQ and MSMQ event notification. When ever you want to broadcast something, send a message to MSMQ which can trigger another application to send mails to users. Have a look at Windows Services also. We are using Microsoft Asynchronus
block from that purpose
While the idea isn't perfect, and certainly not applicable in numerous settings, an iframe used to poll a page can do the trick. Depending on your requirements, the iframe can be hidden or visible, either triggering an event via JavaScript or simply displaying
a message to the user. You might want to investigate XMLHTTP as well, although I believe its support is limited.
Speaking of XMLHTTP, I have a sample included with a SIG presentation a few months back where I backported the ClientCallback feature of .NET 2.0 to 1.1. All source for the sample can be found at
http://www.bennettadelson.com/technicalresources/presentations.aspx for "ASP.NET 2.0: I want it now!"
XMLHTTP/Client Callbacks work in IE, Firefox, Opera, and Safari (the last two SHOULD work but I did not directly test them, no warranty or guarantee implied here, its only a sample). Callbacks/XMLHTTP are usually a bit cleaner than a refreshing IFRAME (for
one, no "click" sound from IE when the IFRAME refreshes here). You could write a simple polling control that implements the ICallbackEventHandler interface and polls either a singleton object in the AppDomain or a database for notification information.
I've created a similar function (vb on ASP.NET 1.x ) but it is very funky and inefficient. I use the 'broadcast' function to 1) enable user chat 2) synchronize viewed page 3) update user controls on the page such as a textbox or image.
I need high-level tools for simultaneous, multi-user, user-to-user shared interaction (a live MEETING!) rather than user-to-server interaction ( a dead web page).
I use the HTML page refresh at 5 second intervals (too slow) to check for 'MEETING' updates which I store in application objects. I use frames and only refresh a page which has minimum size to keep within my host's monthly bandwidth limits.
My 'MEETINGS' would be more efficient if Internet traffic was generated only when a user made a change to the 'MEETING' state such as making a text, chat comment.
My small 'MEETINGS' of about 10 users works with the inefficient and arbitrary time interval method but will prevent me from boosting my 'MEETINGS' size to a goal of 100 simultaneous users.
Ideally, I should be able to BROADCAST to ALL Internet users that are online simultaneously!
It seems to be possible using lower level code but it would be nice if ASP.NET X.X included functionality something like :
BROADCAST _TO_MEETING_ROOM(MyRoom)
MyRoom would have 'occupied chairs' which are online, authorized users.
Of course, it would be nice to offer voice, video and data during the MEETING using the functionality of ASP.NET x.x!
vuduynguyen
Member
40 Points
8 Posts
Broadcast data change.
Mar 16, 2005 08:07 PM|LINK
Derek Simon
Participant
1285 Points
257 Posts
Re: Broadcast data change.
Mar 17, 2005 01:02 AM|LINK
thona
Member
20 Points
2923 Posts
Re: Broadcast data change.
Mar 17, 2005 06:08 AM|LINK
vick93
Participant
1786 Points
358 Posts
Re: Broadcast data change.
Mar 17, 2005 12:32 PM|LINK
rbuckton
Member
547 Points
124 Posts
Re: Broadcast data change.
Mar 28, 2005 03:57 AM|LINK
Speaking of XMLHTTP, I have a sample included with a SIG presentation a few months back where I backported the ClientCallback feature of .NET 2.0 to 1.1. All source for the sample can be found at http://www.bennettadelson.com/technicalresources/presentations.aspx for "ASP.NET 2.0: I want it now!"
XMLHTTP/Client Callbacks work in IE, Firefox, Opera, and Safari (the last two SHOULD work but I did not directly test them, no warranty or guarantee implied here, its only a sample). Callbacks/XMLHTTP are usually a bit cleaner than a refreshing IFRAME (for one, no "click" sound from IE when the IFRAME refreshes here). You could write a simple polling control that implements the ICallbackEventHandler interface and polls either a singleton object in the AppDomain or a database for notification information.
Senior Consultant
Microsoft
southbayray
Member
230 Points
46 Posts
Re: Broadcast data change.
Jul 01, 2005 08:19 PM|LINK
I've created a similar function (vb on ASP.NET 1.x ) but it is very funky and inefficient. I use the 'broadcast' function to 1) enable user chat 2) synchronize viewed page 3) update user controls on the page such as a textbox or image. I need high-level tools for simultaneous, multi-user, user-to-user shared interaction (a live MEETING!) rather than user-to-server interaction ( a dead web page).
I use the HTML page refresh at 5 second intervals (too slow) to check for 'MEETING' updates which I store in application objects. I use frames and only refresh a page which has minimum size to keep within my host's monthly bandwidth limits.
My 'MEETINGS' would be more efficient if Internet traffic was generated only when a user made a change to the 'MEETING' state such as making a text, chat comment.
My small 'MEETINGS' of about 10 users works with the inefficient and arbitrary time interval method but will prevent me from boosting my 'MEETINGS' size to a goal of 100 simultaneous users. Ideally, I should be able to BROADCAST to ALL Internet users that are online simultaneously!
It seems to be possible using lower level code but it would be nice if ASP.NET X.X included functionality something like :
BROADCAST _TO_MEETING_ROOM(MyRoom)
MyRoom would have 'occupied chairs' which are online, authorized users.
Of course, it would be nice to offer voice, video and data during the MEETING using the functionality of ASP.NET x.x!
Take Care,
SBR