tag:blogger.com,1999:blog-2557671457352222943.post7351624968598766718..comments2023-10-10T11:24:47.869+01:00Comments on Neil Mosafi: COMET: The Bayeux Protocol and ASP.NET supportNeil Mosafihttp://www.blogger.com/profile/15344599241111572695noreply@blogger.comBlogger26125tag:blogger.com,1999:blog-2557671457352222943.post-41228523117626963562011-10-06T15:42:18.998+01:002011-10-06T15:42:18.998+01:00Gi,
How can I reach the session id during handsha...Gi,<br /><br />How can I reach the session id during handshake or subscription?Rockyhttps://www.blogger.com/profile/15578334754306363980noreply@blogger.comtag:blogger.com,1999:blog-2557671457352222943.post-84309175162706378272010-07-17T17:52:29.936+01:002010-07-17T17:52:29.936+01:00@elstefanito There's nothing especially diffic...@elstefanito There's nothing especially difficult about that. Handle the Publishing event, from there, cancel it and store it.<br /><br />Then, once a message is approved, you publish to the clients which are subscribed to the channel using clientRepository.WhereSubscribedTo("channel").Enqueue(message)Neil Mosafihttps://www.blogger.com/profile/15344599241111572695noreply@blogger.comtag:blogger.com,1999:blog-2557671457352222943.post-87215788466855258902010-07-16T14:14:52.523+01:002010-07-16T14:14:52.523+01:00Hi,
we are evaluating the promising solution for u...Hi,<br />we are evaluating the promising solution for usage in one of our projects.<br />We need to implement a chat functionality where a moderator has to evaluate and preselect the messages and to forward them to the channel.<br /><br />How would a possible solution look like?<br /><br />Regards<br />StefanUnknownhttps://www.blogger.com/profile/01094056847833267445noreply@blogger.comtag:blogger.com,1999:blog-2557671457352222943.post-59553344121641742632010-05-21T05:12:39.830+01:002010-05-21T05:12:39.830+01:00Neil,
any benchmarks/guestimates on the scalabilit...Neil,<br />any benchmarks/guestimates on the scalability of this (# of open connections)? i'm considering this for a project at work, but we need to support in the region of a few thousand.Unknownhttps://www.blogger.com/profile/06583259210940493674noreply@blogger.comtag:blogger.com,1999:blog-2557671457352222943.post-56665477803457240052010-02-23T12:21:04.520+00:002010-02-23T12:21:04.520+00:00Yes, mvc is definitely the way to go. Aspcomet sho...Yes, mvc is definitely the way to go. Aspcomet should already support this as its just an http handler. In fact I am using it in an mvc app of my own. What do you mean to port it to an mvc app?Neil Mosafihttps://www.blogger.com/profile/15344599241111572695noreply@blogger.comtag:blogger.com,1999:blog-2557671457352222943.post-38702228303194250512010-02-23T10:33:56.970+00:002010-02-23T10:33:56.970+00:00Hi Neil
The latency issue I had seemed to be rela...Hi Neil<br /><br />The latency issue I had seemed to be related to my dev server (using VS2010), when I ran a locally deployed site didn't have the same problem. Bit strange, but didn't worry too much about it after that...<br /><br />I haven't had a lot of time to spend on this yet, but one thing I was planning on doing was porting it to an MVC app. I really like to MVC framework & find I write all my apps in this now. <br /><br />Not sure if you would see value in this for your project??<br /><br />Regards<br /><br />JoeUnknownhttps://www.blogger.com/profile/11873938747265251986noreply@blogger.comtag:blogger.com,1999:blog-2557671457352222943.post-8734727320516641332010-02-18T23:18:02.961+00:002010-02-18T23:18:02.961+00:00Hi Joe did you have any luck with aspcomet? Inter...Hi Joe did you have any luck with aspcomet? Interested in your feedbackNeil Mosafihttps://www.blogger.com/profile/15344599241111572695noreply@blogger.comtag:blogger.com,1999:blog-2557671457352222943.post-10943465095867115022010-02-08T14:52:42.410+00:002010-02-08T14:52:42.410+00:00@Joe thanks for the praise, it makes me feel good!...@Joe thanks for the praise, it makes me feel good! Now that's the first ever time I've heard of IE behaving better than Chrome or Firefox. Off the top of my head, I am not sure what the problem can be. I will investigate when I get some time. If you do look into this and find anything out, let me know. Perhaps create an issue on our googlecode website to track this?<br /><br />Thanks<br />NeilNeil Mosafihttps://www.blogger.com/profile/15344599241111572695noreply@blogger.comtag:blogger.com,1999:blog-2557671457352222943.post-34927202794346109062010-02-08T12:36:33.389+00:002010-02-08T12:36:33.389+00:00Just come across your blog - awesome work!
I'...Just come across your blog - awesome work!<br /><br />I've been looking to integrate Comet into an app that's been developing & maturing over the past year - around some collaborative tools... <br /><br />I've just had a bit of a play with your sample chat app - one hing I've noticed is that with IE, messages are posted & pushed out in essentially real time. However with Firefox & Chrome there'a a delay of around 1sec. I haven't had a good look around the code yet, but do you have any idea why this is??<br /><br />I've definitely be watching your progress with this - there's not many people working on asp.net Comet solutions that I can see,<br /><br />Keep up the great work!<br /><br />JoeUnknownhttps://www.blogger.com/profile/11873938747265251986noreply@blogger.comtag:blogger.com,1999:blog-2557671457352222943.post-46930515380340291222009-11-26T18:31:18.723+00:002009-11-26T18:31:18.723+00:00The thought crossed our minds :) We're still d...The thought crossed our minds :) We're still discussing. If we did, it would be probably GPL + commercial licensing. Drop me a line sometime, I'd love to discuss it with you, and hear what you've worked on as well. You can reach me at jerod.venema at frozenmountain dot com.Jerod Venemahttps://www.blogger.com/profile/11060925834933148447noreply@blogger.comtag:blogger.com,1999:blog-2557671457352222943.post-28363558862258202832009-11-23T23:16:36.068+00:002009-11-23T23:16:36.068+00:00Hi Jerod that looks very interesting! Have you guy...Hi Jerod that looks very interesting! Have you guys considered open sourcing any of it?Neil Mosafihttps://www.blogger.com/profile/15344599241111572695noreply@blogger.comtag:blogger.com,1999:blog-2557671457352222943.post-49630658684325431972009-11-23T22:59:23.066+00:002009-11-23T22:59:23.066+00:00ASP.NET does indeed allow you to build a comet ser...ASP.NET does indeed allow you to build a comet server. Check out our implementation:<br /><br />www.frozenmountain.com/websyncJerod Venemahttps://www.blogger.com/profile/11060925834933148447noreply@blogger.comtag:blogger.com,1999:blog-2557671457352222943.post-37277470644537023692009-11-04T18:06:19.863+00:002009-11-04T18:06:19.863+00:00Neil,
I'll certainly look at both the things ...Neil,<br /><br />I'll certainly look at both the things you suggest; I think a patch should be quite easy from what I remember of the code (not to hand atm). Is there a way I can contact you off-blog, to stop filling it up with various discussion that probably don't belong there?<br /><br />Tx,<br /><br />GregGreghttps://www.blogger.com/profile/05463101481514964671noreply@blogger.comtag:blogger.com,1999:blog-2557671457352222943.post-74056396776127500422009-11-04T15:18:41.024+00:002009-11-04T15:18:41.024+00:00Hi Greg
Thanks for getting in touch... I guess I ...Hi Greg<br /><br />Thanks for getting in touch... I guess I really need to make a small user-guide for the library with answers to all the questions I've received!<br /><br />You want to be looking at the AspComet.Eventing.EventHub class... this allows you to be notified of various events coming into the message bus. I usually configure this in my Global.asax after configuring the message bus.<br /><br />So to respond to messages being sent to a channel, you need to use the PublishingEvent. Call EventHub.Subscribe<PublishingEvent>(handler) and in your handler you can do as you please in there. You can also use this handler to prevent the message being delivered to the channel by setting Cancel = true if you want, although note that in the Bayuex protocol, messages which are intended to be sent to the server and not passed to clients should be sent to a /service/* channel.<br /><br />There is currently no way to prevent a client subscribing to a channel. That is something I can add, shouldn't be too hard... we would need a similar cancellable SubscribingEvent which would be handled in the same way. If you want to send me a patch for that it would be more than welcome!<br /><br />This is a fairly immature project and I welcome suggestions on how to improve the API or the code.<br /><br />Cheers<br />NeilNeil Mosafihttps://www.blogger.com/profile/15344599241111572695noreply@blogger.comtag:blogger.com,1999:blog-2557671457352222943.post-35672611317442035182009-11-02T14:39:41.385+00:002009-11-02T14:39:41.385+00:00I can see how to post a message to a client (or cl...I can see how to post a message to a client (or clients), but is there a way to subscribe to messages /from/ clients at the server side? I don't see an API to do that server side - am I missing something?<br /><br />e.g. client sends a message to a channel, we want to the <b>server</b> to respond based on the contents of that message, rather than having it broadcast to other clients.<br /><br />Similarly, is there a way to prevent subscription to certain channels?<br /><br />Thanks for any help offered,<br /><br />GregGreghttps://www.blogger.com/profile/05463101481514964671noreply@blogger.comtag:blogger.com,1999:blog-2557671457352222943.post-5790042303296619532009-09-30T06:54:04.108+01:002009-09-30T06:54:04.108+01:00Neil, after playing with the library over the past...Neil, after playing with the library over the past few days I now have a much better understanding of how it works and was able to accomplish sending a message via the server. I initially didn't realize I had to Enqueue() my message to each client.<br /><br />Thanks for the great work.Denny Lovehttps://www.blogger.com/profile/12634298039265399265noreply@blogger.comtag:blogger.com,1999:blog-2557671457352222943.post-32507666700783680502009-09-29T22:21:31.150+01:002009-09-29T22:21:31.150+01:00@Denny I actually explained that in the response t...@Denny I actually explained that in the response to Kasper's question earlier - 2 responses up. Do you need more info? Perhaps post a message with your exact scenario and I will do a post on it<br /><br />Cheers<br />NeilNeil Mosafihttps://www.blogger.com/profile/15344599241111572695noreply@blogger.comtag:blogger.com,1999:blog-2557671457352222943.post-23441767201182496452009-09-26T02:24:50.305+01:002009-09-26T02:24:50.305+01:00Kinda new to this and the samples are great for cl...Kinda new to this and the samples are great for client-side but if I wanted to push a message from server to client how could I do that?Denny Lovehttps://www.blogger.com/profile/12634298039265399265noreply@blogger.comtag:blogger.com,1999:blog-2557671457352222943.post-6671075514247335462009-09-21T15:02:37.624+01:002009-09-21T15:02:37.624+01:00Great.
Thanks for your help!
I got it working (wel...Great.<br />Thanks for your help!<br />I got it working (well for now with an Threading.Timer callback, but the concept works).<br /><br />Now I just need to port your example to an ExtJS component and couple it with an DataStore. To update the grids etc.<br /><br />Thanks again.Kasper Veenvlietnoreply@blogger.comtag:blogger.com,1999:blog-2557671457352222943.post-82795941674928288722009-09-17T03:36:33.705+01:002009-09-17T03:36:33.705+01:00OK so it shouldn't be too hard to do that, all...OK so it shouldn't be too hard to do that, all the infrastucture is there I believe.<br /><br />You can create your background thread to cwait for callbacks from the database in the Application_Start event in your global.asax - same place where you set up the comet message bus.<br /><br />Then, when you detect an event which you want to publish to clients, you can retrieve the clients using an instance of IClientRepository (perhaps create a channel for it and use the WhereSubscribedTo("mychannel") method. You can then call Client.Enqueue(messages)<br /><br />Hope that answers your questions but if you have any more then please write back!<br /><br />Good luck<br />NeilNeil Mosafihttps://www.blogger.com/profile/15344599241111572695noreply@blogger.comtag:blogger.com,1999:blog-2557671457352222943.post-29053228733174024582009-09-14T12:57:47.870+01:002009-09-14T12:57:47.870+01:00Hey,
I was looking for Comet Bayeux implementatio...Hey,<br /><br />I was looking for Comet Bayeux implementation for usage with ASP.Net. <br />Your's looks the most clean way. Including the jQuery example.<br /><br />I'd really like to use Comet with Database events (MS SQL Service Broker, WAITFOR and RECEIVE).<br /><br />Herefor I need a thread waiting for this DB events and then push a message over the lp-comet tunnels that are present/ to the clients that has subscribed.<br /><br />Can you give me a lead how to set this up? Where can I create this thread and publish the results to all subscribed clients?<br /><br />Hope you have some time to help me. I'd like to show it to the rest of the company here. So they will be blown away :). (We still use ASP.Net 2.0 without any AJAX or what ever.)Kasper Veenvlietnoreply@blogger.comtag:blogger.com,1999:blog-2557671457352222943.post-19474991093315432962009-09-02T22:42:51.976+01:002009-09-02T22:42:51.976+01:00Hi Leandro
I have indeed - I am using aspComet f...Hi Leandro<br /><br /><br />I have indeed - I am using aspComet for a small project I am working on and it's going well.<br /><br />Please give it a go and let me know if you have any issues or questions!<br /><br />Cheers<br />NeilNeil Mosafihttps://www.blogger.com/profile/15344599241111572695noreply@blogger.comtag:blogger.com,1999:blog-2557671457352222943.post-43431491621463002752009-09-01T21:41:58.767+01:002009-09-01T21:41:58.767+01:00Neil, had you been able to progress with this proj...Neil, had you been able to progress with this project? I was starting to implement Bayeux, found your project, and I am now interested in knowing how is your project status.<br /><br />Thanks!<br />Leandro.SinStereohttps://www.blogger.com/profile/18124701867546573867noreply@blogger.comtag:blogger.com,1999:blog-2557671457352222943.post-60459349113306206642009-08-22T00:36:20.378+01:002009-08-22T00:36:20.378+01:00Well quite simply ASP.NET's threading model do...Well quite simply ASP.NET's threading model doesn't allow you to do that. You have pre- and post- event handlers and once you write to the response in the post handler the connection is ended. Also afaik IIS will eventually time out the connection if it stays open too long. There may be a way but long polling seems much simplerNeil Mosafihttps://www.blogger.com/profile/15344599241111572695noreply@blogger.comtag:blogger.com,1999:blog-2557671457352222943.post-8797685470615835102009-08-21T16:53:10.229+01:002009-08-21T16:53:10.229+01:00I'm sure you're right on your assertion th...I'm sure you're right on your assertion that ASP.NET can't support streaming COMET; but I'm struggling to understand why.<br /><br />My understanding is that with lp-Comet, the client opens a connection, and the server sends a response when it's ready then closes the connection. You indicate that you can release the thread between receiving the open request and sending the response.<br /><br />With s-Coment, the client opens a connection, and the server sends a response when it's ready, and then doesn't close the connection. Surely you could still release the thread betwen receiving the open request and send the response?<br /><br /><br />Could you explain what I'm missing?<br /><br />Thanks.Greghttps://www.blogger.com/profile/05463101481514964671noreply@blogger.com