简体   繁体   中英

tomcat or glassfish as comet server?

they are both free but i think glassfish has some limitation or when you reach up to a certain nr of users (comet) then you have to pay? is that correct?

if true, could you use tomcat as a comet server?

if not, then which free comet servers are there supporting long polling and iframe?

They are both free but i think glassfish has some limitation or when you reach up to a certain nr of users (comet) then you have to pay? is that correct?

No, GlassFish doesn't have such limitation (where did you hear that?). You only have to pay if you want official support through a subscription.

if not, then which free comet servers are there supporting long polling and iframe?

Jetty has support for comet-style programming. Tomcat has a Comet Implementation (but I find more complains than positive feedback about it on Google). You could also embed StreamHub . But I'm not sure about what they support exactly.

Personally, I'd go with GlassFish v3 / Grizzly. The main reason is that you'll find lots of samples, tutorials, etc (not mentioning that you already have downloaded GlassFish and NetBeans). For example this one .

UPDATE: While googling a bit more on this topic, I discovered Atmosphere , a portable AjaxPush/Comet Framework for everyone (wasn't aware of this framework and wanted to mention it). Quoting its website:

Atmosphere is a POJO based framework using Inversion of Control (IoC) to bring push/Comet to the masses! Finally a framework which can run on any Java based Web Server, including Google App Engine, Tomcat,Jetty, GlassFish,Weblogic, Grizzly, JBossWeb and JBoss,Resin, etc. without having to wait for Servlet 3.0 Async support or without the needs to learn how Comet support has been differently implemented by all those Containers.

But still, I'd go the GlassFish v3 / Grizzly way (and let Atmosphere mature a bit).

Have a look at Jetty. Free to use and has a lot of Comet support.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM