tomcat or glassfish as comet server?

不打扰是莪最后的温柔 提交于 2020-01-01 00:43:30

问题


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?


回答1:


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).




回答2:


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



来源:https://stackoverflow.com/questions/2023076/tomcat-or-glassfish-as-comet-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!