Re: gwt-comet - CometException: EventSource error

2016-03-09 Thread gichuhi
Hi Did you get a solution to this problem i have a similar problem

On Friday, November 16, 2012 at 1:32:58 PM UTC+3, Magnus wrote:
>
> Hello,
>
> I would like to use "gwt-comet":
> http://code.google.com/p/gwt-comet/
>
> To get started, I tested the chat application provided with on the project 
> site:
> http://code.google.com/p/gwt-comet/wiki/ChatExample
>
> I also got the example running: It works fine within eclipse and with GWT 
> development mode.
>
> Then, I deployed it as a war file to my tomcat 6 server, and I receive 
> this error repeatedly within the chat window:
> error false net.zschech.gwt.comet.client.CometException: EventSource error
>
> Does anyone have an idea what could be the cause?
> How are your experiences with gwt-comet?
>
> Thanks
> Magnus
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Usage of gwt-comet on gwt RequestFactory?

2013-09-16 Thread Jamel Hamas


1- I have already used the following frameworks (Event based client-server) 
on GWT projects, and works fine with RPC call architecture.

   - 
   
   GWT-Comet https://code.google.com/p/gwt-comet/
   - 
   
   GwtEventService https://code.google.com/p/gwteventservice/
   
After searching, i found a lot of frameworks that treat the client server 
messaging exchange problem:

*2- Jboss Errai framework http://errai.github.io/*

Great messaging service but i've not used it. I searched for only errai bus 
usage with gwt but nothing founded.

*3- Atmosphere Framework https://github.com/Atmosphere/atmosphere*

Seem to do same thing like comet but i've not used it. 
http://async-io.org/tutorial.html

*4- WebSocket http://www.websocket.org/*

*5- 
Spring-Integration-Cometdhttp://cometd.org/documentation/cometd-java/server/services/integration-spring
*

*6- Spring 
WebSockethttp://spring.io/blog/2013/07/24/spring-framework-4-0-m2-websocket-messaging-architectures/
*

NOW :

I want to develop a project with Spring roo and GWT. As Spring roo gwt 
based on RequestFactory architecture.

I think that we can use Comet or gwteventservice with RequestFactory 
architecture, but we 
needAutoBeanhttps://code.google.com/p/google-web-toolkit/wiki/AutoBean to 
generate client side Entity interface on server side.

*My question concern GWT RequestFactory :*

How to integrate one of the frameworks above in gwt projects based on 
RequestFactory architecture? Is there any example ?!

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.


Re: gwt-comet issue with GWT 2.5

2013-02-15 Thread Takapa
I'm having the exact same problem.

I went further and downloaded the source, but its not documented at all and 
seems to reference several classes underneath com.sun.* packages which are 
not available to modern JDKs.

On Saturday, 12 January 2013 16:05:42 UTC, Aldo wrote:

 Hi All

 I know this is not a GWT direct issue, but I was not able to find a 
 solution for the problem, so maybe someone out there already dealt with 
 this problem.

 I'm using gwt-comet project and it has been working perfectly so far, but 
 now that I'm upgrading to GWT 2.5 I'm getting an error (
 http://code.google.com/p/gwt-comet/issues/detail?id=33).

 I need to know if there is a solution (a JAR available compiled with GWT 
 2.5) or if anyone suggest a different project so I can replace the 
 gwt-comet.

 Thanks in advance,
 Aldo


-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: gwt-comet issue with GWT 2.5

2013-02-15 Thread Jens
The most easy workaround is probably to download the 
CometSerializerGenerator.java from the issue you have mentioned and put it 
into your app's project into the correct package. 

Then as long as your classes/output folder is before gwt-comet.jar in your 
classpath the GWT compiler should pick up the generator from your app's 
project instead of gwt-comet.jar.

Alternative is to rebuild gwt-comet from source and replace the file 
beforehand.

-- J.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




GWT comet in push server mode?

2013-02-12 Thread Maria Garcia
Hi,

I have used comet 
library http://code.google.com/p/gwt-comet/wiki/GettingStarted to create a 
application. I would like to use comet to server pushes data to my client.
Is it possible?

Regards,

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: GWT comet in push server mode?

2013-02-12 Thread Andy Stevko
Many projects have used comet to push data from server to client. This
library seems stable although no changes in almost a year.
Appengine's channel api uses comet, works really well, and is easy to
implement.
IMO, web sockets are more desirable to comet in terms of resource
utilization.
WS does not have the same Single Origin limitations and provides a more
reliable connection.


On Tue, Feb 12, 2013 at 5:04 AM, Maria Garcia 
maria.garcia.aguirrego...@gmail.com wrote:

 Hi,

 I have used comet library
 http://code.google.com/p/gwt-comet/wiki/GettingStarted to create a
 application. I would like to use comet to server pushes data to my client.
 Is it possible?

 Regards,

 --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to google-web-toolkit+unsubscr...@googlegroups.com.
 To post to this group, send email to google-web-toolkit@googlegroups.com.
 Visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.
 For more options, visit https://groups.google.com/groups/opt_out.






-- 
-- A. Stevko
===
If everything seems under control, you're just not going fast enough. M.
Andretti

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




gwt-comet issue with GWT 2.5

2013-01-12 Thread Aldo Neto
Hi All

I know this is not a GWT direct issue, but I was not able to find a
solution for the problem, so maybe someone out there already dealt with
this problem.

I'm using gwt-comet project and it has been working perfectly so far, but
now that I'm upgrading to GWT 2.5 I'm getting an error (
http://code.google.com/p/gwt-comet/issues/detail?id=33).

I need to know if there is a solution (a JAR available compiled with GWT
2.5) or if anyone suggest a different project so I can replace the
gwt-comet.

Thanks in advance,
Aldo

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: gwt-comet - CometException: EventSource error

2012-11-18 Thread Magnus
Hi,

here is additional information:

The call failed on the server. See the tomcat log below.

I also found somewhere that the version of gwt-comet relates to the GWT 
version.

Magnus


-

Nov 19, 2012 7:30:31 AM org.apache.catalina.core.ApplicationContext log
SEVERE: Exception while dispatching incoming RPC call
com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public 
abstract void cometchat.client.svc.ChatService.send(java.lang.String) throws 
cometchat.client.ChatException' threw an unexpected exception: 
java.lang.IllegalStateException: CometSession has been invalidated
at 
com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:385)
at 
com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:588)
at 
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208)
at 
com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
at 
com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.IllegalStateException: CometSession has been invalidated
at 
net.zschech.gwt.comet.server.impl.CometSessionImpl.ensureValid(CometSessionImpl.java:65)
at 
net.zschech.gwt.comet.server.impl.CometSessionImpl.enqueue(CometSessionImpl.java:77)
at cometchat.server.ChatServiceImpl.send(ChatServiceImpl.java:127)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at 
com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:569)
... 17 more
Nov 19, 2012 7:32:49 AM org.apache.catalina.core.ApplicationContext log
SEVERE: Error sending heartbeat
ClientAbortException:  java.net.SocketException: Broken pipe
at 
org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:319)
at 
org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:288)
at 
org.apache.catalina.connector.CoyoteOutputStream.flush(CoyoteOutputStream.java:98)
at 
net.zschech.gwt.comet.server.deflate.DeflaterOutputStream.flush(DeflaterOutputStream.java:100)
at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:278)
at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:122)
at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:212)
at 
net.zschech.gwt.comet.server.impl.CometServletResponseImpl.flush(CometServletResponseImpl.java:366)
at 
net.zschech.gwt.comet.server.impl.CometServletResponseImpl.heartbeat(CometServletResponseImpl.java:345)
at 
net.zschech.gwt.comet.server.impl.ManagedStreamCometServletResponseImpl.heartbeat(ManagedStreamCometServletResponseImpl.java:100)
at 
net.zschech.gwt.comet.server.impl.BlockingAsyncServlet.suspend(BlockingAsyncServlet.java:92)
at 
net.zschech.gwt.comet.server.impl.CometServletResponseImpl.suspend(CometServletResponseImpl.java:269)
at 
net.zschech.gwt.comet.server.CometServlet.doCometImpl(CometServlet.java:157)
at 
net.zschech.gwt.comet.server.CometServlet.doGet(CometServlet.java:108)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206

gwt-comet - CometException: EventSource error

2012-11-16 Thread Magnus
Hello,

I would like to use gwt-comet:
http://code.google.com/p/gwt-comet/

To get started, I tested the chat application provided with on the project 
site:
http://code.google.com/p/gwt-comet/wiki/ChatExample

I also got the example running: It works fine within eclipse and with GWT 
development mode.

Then, I deployed it as a war file to my tomcat 6 server, and I receive this 
error repeatedly within the chat window:
error false net.zschech.gwt.comet.client.CometException: EventSource error

Does anyone have an idea what could be the cause?
How are your experiences with gwt-comet?

Thanks
Magnus

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/D-EFHGm8HLoJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Errai Bus or GWT-comet

2011-03-12 Thread Kathiravan Tamilvanan
We are evaluating the Errai Bus and Gwt-comet for adding server push to our 
applications. Has anyone used any of the two? 

Can you provide your thoughts on the two libraries?. Greatly appreciate it.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



GWT Comet Processor Implementation

2009-06-13 Thread Kousikraj

Hi,

I am trying to implement CometProcessor in GWT 1.6. I got a sample for
the same from

http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/ee2f9207de953fc0d886f73f7dd17388?lnk=raot

But still that implementations was for older versions of GWT.

Does anyone got a sample for CometProcessor Implementation in GWT?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT Comet Processor Implementation

2009-06-13 Thread Mark

The link you posted doesn't work for me, I don't know what
CometProcessor is but if you just need a Comet implementaton for GWT
you can try GWTEventService.

On Jun 13, 5:29 am, Kousikraj kousik...@gmail.com wrote:
 Hi,

 I am trying to implement CometProcessor in GWT 1.6. I got a sample for
 the same from

 http://groups.google.com/group/Google-Web-Toolkit/browse_thread/threa...

 But still that implementations was for older versions of GWT.

 Does anyone got a sample for CometProcessor Implementation in GWT?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT + comet?

2008-09-29 Thread [EMAIL PROTECTED]

I hate to say it but you've got me wondering now.  I mean, it would be
a whole lot easier to do considering you can see the source code of
your competitor a lot easier these days...

On Sep 7, 5:29 pm, Reinier Zwitserloot [EMAIL PROTECTED] wrote:
 Glad you liked the missive. I've saved a bookmark for future reference
 in case someone else comes in and asks (Comet usually comes up once a
 month or so).

 For game development: Just screw IE. There's no way to do halfway
 decent graphics on IE, period. Go flash, or tell people to switch to
 firefox/opera/safari/comet.

 All 3 non-IE browsers are trying to speed up javascript. Opera 9.5 has
 a fairly spiffy javascript engine already, and both firefox and webkit
 are on the verge of shipping custom very smart and very fast VMs for
 javascript (tracemonkey for firefox, and squirrelfish for safari).
 Then there's V8, which you can see at work today in Google Chrome. It
 looks like V8, Tracemonkey, and squirrelfish will all be roughly as
 fast as one another (can you say meep meep?) - should do wonders for
 attempts to write games in canvas.

 Which brings us back to IE. F!*k IE.

 There's future hope though:

 I believe apple has rescinded copyright/patent claims on canvas, or
 they ran out, so in theory nothing is stopping IE from implementing
 them now - though as I understand it, Microsoft never expressed
 interest in supporting them.

 Microsoft is part of the W3C and evidently they have not been able to
 use their considerable weight there to stop the latest news at W3C.

 W3C's own home-grown XHTML 2.0 effort has effectively been mothballed
 indefinitely, and instead HTML5 has been adopted (HTML5 started as
 something from the WHAT-WG, which is a much less officious entity
 compared to W3C, and consists of the developers of Opera, WebKit
 (Safari), and Gecko (Firefox/mozilla). - e.g. the anti-IE league, and
 the main reason stuff like canvas has seeded so quickly to the other
 non-IE browsers) HTML5 has been dollied up with some lip service to
 XHTML but make no mistake: Few really expected the W3C to 'fold' to
 the clearly superior HTML5 work in progress. HTML5 includes Canvas
 (seehttp://www.whatwg.org/specs/web-apps/current-work/multipage/the-canva...
 for proof). The question now becomes: Does Microsoft break even more
 from the W3C than they already have (remember, IE isn't exactly
 standards compliant). So far betas ofIE8indicate that Microsoft is
 seriously attempting to build a more compatible browser, so there's
 hope. Then again, armchair analysts (like myself ㋛) believe that
 Microsoft is still trying to prevent the web from becoming the host of
 virtually every computer app out there, in order to keep their own OS
 (Windows) in a safe market leader position. Microsoft's stranglehold
 on the web community by way of IE is one of the things holding web
 apps back, so there are plenty of pessimists who believe that the
 final version ofIE8will be a big disappointment.

 On Sep 7, 9:41 pm, markww [EMAIL PROTECTED] wrote:

  Thanks for the excellent response, that was very helpful. Everything
  makes sense, I was taking a look at Jetty and it seems easy to use for
  what I want to do. I had been writing my own java nio server for a
  class I was taking, it's cool to see how Jetty has taken advantage of
  the nio stuff to support 'comet'.

  From a game development point of view, this is great because we can
  wait for the server to send us data instead of constantly polling it.

  One thing that still seems to be missing is fast graphics support, to
  actually render dynamic game data. I was working with the gwt canvas
  intensively a few months ago, but was disappointed to find out that
  IE's support for it was just horrible. Firefox and Safari (and
  probably Chrome now) can do a decent job of rendering simple
  primitives fast in a canvas. In fact, my iPhone could render
  primitives faster than IE! I wonder if there is any development on
  this (providing a fast canvas for direct pixel manipulation) by the
  browsers. Right now it seems like the only way to do it is by using
  Flash.

  Anyway thanks again for all those answers, definitely got me in the
  right direction,

  Mark

  On Sep 7, 6:30 am, Reinier Zwitserloot [EMAIL PROTECTED] wrote:

   As you said, comet is a complex problem on the server side. On the
   client it's relatively straightforward.

   Some issues:

   1) You either need an async webserver (such as something based on the
   fairly new java Simple, or the continuation support available in
   jetty), or you need an OS + VM combo which can handle tons of threads
   without a high overhead (the latest linux + the latest java 6 seems
   capable of this). Be especially careful if you've got a frontloader
   (such as Apache) that merely redirects to your actual java stuff.
   Apache, out of the box, will probably not use the new worked thread
   mechanism to communicate with the java server at the backend, and by
   default 

Re: GWT + comet?

2008-09-08 Thread Thomas Broyer


On 7 sep, 05:50, markww wrote:

 Is there any 'comet' support via GWT at the moment? I'm not completely
 up to speed with javascript / browser technologies, I believe comet
 was the practice of having the browser keep a connection open to the
 server so the server could push data to the browser whenever it
 wanted, instead of the client browser always polling for new data.

 I'm not sure where GWT would fit into that as it would require some
 logic server-side to work. Has there been any development with this,
 where can I start?

Completing Reinier's wonderful overview:
http://code.google.com/p/google-web-toolkit-incubator/wiki/ServerPushFAQ
http://code.google.com/p/rocket-gwt/wiki/Comet

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT + comet?

2008-09-08 Thread markww

Ok so after doing some reading it seems there are quite a few viable
options on how to get started with comet. I can choose any setup I
want for the backend, right now I'm leaning towards Jetty but it's
hard to decide. There seem to be articles dating from 2007 / GWT 1.4
which give conflicting reports on the state of support Jetty and
Tomcat offer:

  Go with Jetty:
  -easy to setup and supports continuations
  -should I go with version 6, or version 7 though? Version 6
seems to use continuations
   which are a way of imitating comet (bad explanation) but as I
understand it, version 7
   will have a new 'real' continuation system for 'servlet 3'? So
which to choose?
  -can you debug your webapp using Jetty as the server, I thought
GWT uses Tomcat
   by default?
  -need a GWT hack to get it to work: 
http://docs.codehaus.org/display/JETTY/GWT
   because GWT marked some class methods final which Jetty can't
work with (v6)
   for RPC, don't know if that's different with v7.

  Go with Tomcat:
  -GWT uses this as the server for debugging? that's a plus.
  -Seems more difficult to configure to work with comet than
Jetty, though most
   of the articles I find on this date to pre GWT 1.5 in 2007, not
sure what the
   current state of support is.

In terms of the GWT side of things, it seems like the chat example
here:

http://groups.google.com/group/gwtapps/files

is a good one to use as a comet example. Though it is GWT 1.4, I don't
know how much needs to be ported.

Thanks for any comments,

Mark

On Sep 8, 6:23 am, Thomas Broyer [EMAIL PROTECTED] wrote:
 On 7 sep, 05:50, markww wrote:



  Is there any 'comet' support via GWT at the moment? I'm not completely
  up to speed with javascript / browser technologies, I believe comet
  was the practice of having the browser keep a connection open to the
  server so the server could push data to the browser whenever it
  wanted, instead of the client browser always polling for new data.

  I'm not sure where GWT would fit into that as it would require some
  logic server-side to work. Has there been any development with this,
  where can I start?

 Completing Reinier's wonderful 
 overview:http://code.google.com/p/google-web-toolkit-incubator/wiki/ServerPushFAQhttp://code.google.com/p/rocket-gwt/wiki/Comet
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT + comet?

2008-09-08 Thread Thomas Broyer



On Sep 8, 7:49 pm, markww [EMAIL PROTECTED] wrote:

       -can you debug your webapp using Jetty as the server, I thought
 GWT uses Tomcat
        by default?

GWTShell embeds Tomcat, but you can use the -noserver mode and use
whatever server software you want. You just lose the ability to debug
both your client and server code at the same time (i.e. in one click;
I suppose you can debug more than one app at the same time within e.g.
Eclipse)



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT + comet?

2008-09-07 Thread Reinier Zwitserloot

As you said, comet is a complex problem on the server side. On the
client it's relatively straightforward.

Some issues:

1) You either need an async webserver (such as something based on the
fairly new java Simple, or the continuation support available in
jetty), or you need an OS + VM combo which can handle tons of threads
without a high overhead (the latest linux + the latest java 6 seems
capable of this). Be especially careful if you've got a frontloader
(such as Apache) that merely redirects to your actual java stuff.
Apache, out of the box, will probably not use the new worked thread
mechanism to communicate with the java server at the backend, and by
default apache will start serving up 'busy' pages if more than 50
simultaneous connections are already running. You get to 50 very
quickly when using comet. If this is your setup, google around for how
to implement apache+comet+java properly. Personally I just run jetty
only, no apache.

2) The only safe way to do comet is to make a request from the client
to the server, then the server returns NOTHING, not a single byte, it
just waits, and then, once data is available, it sends it, and then
closes the connection. In response, the client should open another
connection and this whole song and dance number is repeated. The
reason you can't just keep sending data across a single HTTP
connection, is because the HTTP standard has no concept of 'flush'. A
proxy or even the webclient itself (IE and Safari both do some limited
caching, for example) will simply assume more will come very shortly,
and never forward the data to the endpoint (your GWT app). In order to
do this concept right, you need some sort of tracking number.

For example, imagine an IRC (chat) client using comet. You could
simply assign to each chat line in the chat room an index number, and
upon first connect, tell the client the last chat line index number
spoken. From here on out, comet can be done by letting the client
request http://www.mychatserver.com/chats/line?idx=; +
lastReceivedChatLineIdx++ - the server, upon receiving such a request,
first checks if a line with that idx has already been said. If so, it
is returned immediately (no comet). if NOT, it will not return an
error, it will instead just wait and hold the connection open. Your
servlet should register a listener of some sort with the central
repository of chat messages, so it can wake up when the line with the
given idx is actually spoken. You can't just ask for 'the next line'
without a tracker ID of some sort, because in between receiving one
line, processing it on the client, and opening another connection, a
line might have been spoken. Without tracking you'd miss this line.

3) Because proxies, webservers, and web clients all have HTTP
timeouts, and they are all different, you should manually close the
connection after ~50 seconds. In our chat example, you'd send back
something like: [NO CHAT] to indicate to the client that in the entire
50 second span, the chat line with idx '1234' never came up so far. In
response, the client should re-open the connection with the exact same
request (gimme line 1234).

4) For efficiency you may want to let the server respond with all
relevant messages that have a tracker ID equal to or larger than the
requested item. For example, in our chat app, if a client asks for
message #1234, but on the server you already know that we're on
message 1237 (a burst of rapid chats just recently happened, for
example), then you should just send 1234, 1235, 1236, and 1237 in one
go. You'll need a way to delimit each 'packet' of information in the
response in this case. You could use JSON, for example. Or use a GWT-
RPC call, though I don't know the specifics of making that work right
with comet.

5) Web clients internally have a 2 connections limit. This means that,
for any given full server name, if there are already 2 open
connections, and a third thing is requested from this server, the
client will queue up this request instead of sending it. Once one of
those 2 open connections is closed, it will send it. This is perfectly
reasonable when all requests are handled as fast as possible, but in
comet, the whole point is that requests are NOT handled as fast as
possible. If you have multiple comet elements on a single web page
(Let's say, a 'live' stock ticker AND a chat box, each running a
separate comet connection), then you're out of connections, and the
act of requesting a simple image in response to a mouse over or some
such never goes through!

There are two solutions to this:

A) run your non-AJAX calls off a different server. For example, serve
up images from img.yourhost.com instead of just yourhost.com. You
can't do this for your comet connections, because those usually use
AJAX calls, and those must go to the same domain as the web page (Same
Origin Policy, wikipedia that if you don't know what that is). This
won't help you if you have 3 separate comety things going on, and it
won't help 

Re: GWT + comet?

2008-09-07 Thread markww

Thanks for the excellent response, that was very helpful. Everything
makes sense, I was taking a look at Jetty and it seems easy to use for
what I want to do. I had been writing my own java nio server for a
class I was taking, it's cool to see how Jetty has taken advantage of
the nio stuff to support 'comet'.

From a game development point of view, this is great because we can
wait for the server to send us data instead of constantly polling it.

One thing that still seems to be missing is fast graphics support, to
actually render dynamic game data. I was working with the gwt canvas
intensively a few months ago, but was disappointed to find out that
IE's support for it was just horrible. Firefox and Safari (and
probably Chrome now) can do a decent job of rendering simple
primitives fast in a canvas. In fact, my iPhone could render
primitives faster than IE! I wonder if there is any development on
this (providing a fast canvas for direct pixel manipulation) by the
browsers. Right now it seems like the only way to do it is by using
Flash.

Anyway thanks again for all those answers, definitely got me in the
right direction,

Mark

On Sep 7, 6:30 am, Reinier Zwitserloot [EMAIL PROTECTED] wrote:
 As you said, comet is a complex problem on the server side. On the
 client it's relatively straightforward.

 Some issues:

 1) You either need an async webserver (such as something based on the
 fairly new java Simple, or the continuation support available in
 jetty), or you need an OS + VM combo which can handle tons of threads
 without a high overhead (the latest linux + the latest java 6 seems
 capable of this). Be especially careful if you've got a frontloader
 (such as Apache) that merely redirects to your actual java stuff.
 Apache, out of the box, will probably not use the new worked thread
 mechanism to communicate with the java server at the backend, and by
 default apache will start serving up 'busy' pages if more than 50
 simultaneous connections are already running. You get to 50 very
 quickly when using comet. If this is your setup, google around for how
 to implement apache+comet+java properly. Personally I just run jetty
 only, no apache.

 2) The only safe way to do comet is to make a request from the client
 to the server, then the server returns NOTHING, not a single byte, it
 just waits, and then, once data is available, it sends it, and then
 closes the connection. In response, the client should open another
 connection and this whole song and dance number is repeated. The
 reason you can't just keep sending data across a single HTTP
 connection, is because the HTTP standard has no concept of 'flush'. A
 proxy or even the webclient itself (IE and Safari both do some limited
 caching, for example) will simply assume more will come very shortly,
 and never forward the data to the endpoint (your GWT app). In order to
 do this concept right, you need some sort of tracking number.

 For example, imagine an IRC (chat) client using comet. You could
 simply assign to each chat line in the chat room an index number, and
 upon first connect, tell the client the last chat line index number
 spoken. From here on out, comet can be done by letting the client
 requesthttp://www.mychatserver.com/chats/line?idx=; +
 lastReceivedChatLineIdx++ - the server, upon receiving such a request,
 first checks if a line with that idx has already been said. If so, it
 is returned immediately (no comet). if NOT, it will not return an
 error, it will instead just wait and hold the connection open. Your
 servlet should register a listener of some sort with the central
 repository of chat messages, so it can wake up when the line with the
 given idx is actually spoken. You can't just ask for 'the next line'
 without a tracker ID of some sort, because in between receiving one
 line, processing it on the client, and opening another connection, a
 line might have been spoken. Without tracking you'd miss this line.

 3) Because proxies, webservers, and web clients all have HTTP
 timeouts, and they are all different, you should manually close the
 connection after ~50 seconds. In our chat example, you'd send back
 something like: [NO CHAT] to indicate to the client that in the entire
 50 second span, the chat line with idx '1234' never came up so far. In
 response, the client should re-open the connection with the exact same
 request (gimme line 1234).

 4) For efficiency you may want to let the server respond with all
 relevant messages that have a tracker ID equal to or larger than the
 requested item. For example, in our chat app, if a client asks for
 message #1234, but on the server you already know that we're on
 message 1237 (a burst of rapid chats just recently happened, for
 example), then you should just send 1234, 1235, 1236, and 1237 in one
 go. You'll need a way to delimit each 'packet' of information in the
 response in this case. You could use JSON, for example. Or use a GWT-
 RPC call, though I don't know the 

Re: GWT + comet?

2008-09-07 Thread Reinier Zwitserloot

Glad you liked the missive. I've saved a bookmark for future reference
in case someone else comes in and asks (Comet usually comes up once a
month or so).

For game development: Just screw IE. There's no way to do halfway
decent graphics on IE, period. Go flash, or tell people to switch to
firefox/opera/safari/comet.

All 3 non-IE browsers are trying to speed up javascript. Opera 9.5 has
a fairly spiffy javascript engine already, and both firefox and webkit
are on the verge of shipping custom very smart and very fast VMs for
javascript (tracemonkey for firefox, and squirrelfish for safari).
Then there's V8, which you can see at work today in Google Chrome. It
looks like V8, Tracemonkey, and squirrelfish will all be roughly as
fast as one another (can you say meep meep?) - should do wonders for
attempts to write games in canvas.

Which brings us back to IE. F!*k IE.

There's future hope though:

I believe apple has rescinded copyright/patent claims on canvas, or
they ran out, so in theory nothing is stopping IE from implementing
them now - though as I understand it, Microsoft never expressed
interest in supporting them.

Microsoft is part of the W3C and evidently they have not been able to
use their considerable weight there to stop the latest news at W3C.

W3C's own home-grown XHTML 2.0 effort has effectively been mothballed
indefinitely, and instead HTML5 has been adopted (HTML5 started as
something from the WHAT-WG, which is a much less officious entity
compared to W3C, and consists of the developers of Opera, WebKit
(Safari), and Gecko (Firefox/mozilla). - e.g. the anti-IE league, and
the main reason stuff like canvas has seeded so quickly to the other
non-IE browsers) HTML5 has been dollied up with some lip service to
XHTML but make no mistake: Few really expected the W3C to 'fold' to
the clearly superior HTML5 work in progress. HTML5 includes Canvas
(see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas.html
for proof). The question now becomes: Does Microsoft break even more
from the W3C than they already have (remember, IE isn't exactly
standards compliant). So far betas of IE8 indicate that Microsoft is
seriously attempting to build a more compatible browser, so there's
hope. Then again, armchair analysts (like myself ㋛) believe that
Microsoft is still trying to prevent the web from becoming the host of
virtually every computer app out there, in order to keep their own OS
(Windows) in a safe market leader position. Microsoft's stranglehold
on the web community by way of IE is one of the things holding web
apps back, so there are plenty of pessimists who believe that the
final version of IE8 will be a big disappointment.

On Sep 7, 9:41 pm, markww [EMAIL PROTECTED] wrote:
 Thanks for the excellent response, that was very helpful. Everything
 makes sense, I was taking a look at Jetty and it seems easy to use for
 what I want to do. I had been writing my own java nio server for a
 class I was taking, it's cool to see how Jetty has taken advantage of
 the nio stuff to support 'comet'.

 From a game development point of view, this is great because we can
 wait for the server to send us data instead of constantly polling it.

 One thing that still seems to be missing is fast graphics support, to
 actually render dynamic game data. I was working with the gwt canvas
 intensively a few months ago, but was disappointed to find out that
 IE's support for it was just horrible. Firefox and Safari (and
 probably Chrome now) can do a decent job of rendering simple
 primitives fast in a canvas. In fact, my iPhone could render
 primitives faster than IE! I wonder if there is any development on
 this (providing a fast canvas for direct pixel manipulation) by the
 browsers. Right now it seems like the only way to do it is by using
 Flash.

 Anyway thanks again for all those answers, definitely got me in the
 right direction,

 Mark

 On Sep 7, 6:30 am, Reinier Zwitserloot [EMAIL PROTECTED] wrote:

  As you said, comet is a complex problem on the server side. On the
  client it's relatively straightforward.

  Some issues:

  1) You either need an async webserver (such as something based on the
  fairly new java Simple, or the continuation support available in
  jetty), or you need an OS + VM combo which can handle tons of threads
  without a high overhead (the latest linux + the latest java 6 seems
  capable of this). Be especially careful if you've got a frontloader
  (such as Apache) that merely redirects to your actual java stuff.
  Apache, out of the box, will probably not use the new worked thread
  mechanism to communicate with the java server at the backend, and by
  default apache will start serving up 'busy' pages if more than 50
  simultaneous connections are already running. You get to 50 very
  quickly when using comet. If this is your setup, google around for how
  to implement apache+comet+java properly. Personally I just run jetty
  only, no apache.

  2) The only safe way to do 

GWT + comet?

2008-09-06 Thread markww

Hi,

Is there any 'comet' support via GWT at the moment? I'm not completely
up to speed with javascript / browser technologies, I believe comet
was the practice of having the browser keep a connection open to the
server so the server could push data to the browser whenever it
wanted, instead of the client browser always polling for new data.

I'm not sure where GWT would fit into that as it would require some
logic server-side to work. Has there been any development with this,
where can I start?

Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---