Mickey Shine
Mickey Shine

Reputation: 12549

What way of client should I choose for Comet chat?

I am going to implement a Comet chat. It is easy to make a choice for the server side but for the client side--I am really confused: long polling, callback polling, hidden iframe, http streaming, persistent http connection....

I don't know much about the conceptions, and who can help me to make it more clear? I just want to choose the best way to implement a Comet chat client~

Upvotes: 2

Views: 1347

Answers (3)

Jerod Venema
Jerod Venema

Reputation: 44642

Once you have selected a server side component, you'll know what client-side component to use.

For example, if you use WebSync (for ASP.NET/IIS) you'll use an implementation of the Bayeux protocol as a client - either the built in one, or one of the other available implementations (dojo, jquery, etc) according to what your needs are.

If you use something like StreamHub, they'll have a client available for their package as well.

The various items you mentioned - long polling, callback polling, etc - are going to be hidden away from you in the various implementations. In WebSync, we've got support for long-polling and callback-polling, but you don't need to know anything about that when using the client, as it'll take care of that according to the browser being used.

Upvotes: 2

Corehpf
Corehpf

Reputation: 550

I don't think the technique matters as long as it works in all browsers. StreamHub Comet server now have a free community edition - it works cross-browser, so you don't have to worry about implementing different techniques such as long-polling. Why do all the work when someone's already done it for you... I recommend reading the tutorial: Building a Comet chat application with StreamHub.

Upvotes: 1

wolffiex
wolffiex

Reputation: 482

I think long polling is the technique that most of the commercial services seem to use. It's the only option that works in every browser.

Upvotes: 1

Related Questions