Re: Server / Client Communication Flipped

2008-09-05 Thread eggsy84

The AMQ idea looks like an interesting one I wonder if anyone has
implemented this through GWT.



On Sep 5, 6:07 am, elliot [EMAIL PROTECTED] wrote:
 their impl is rather like the one thomas described, using a comet-like
 open cnxn coupled with a timeout.

 '
 To avoid the load vs latency tradeoff,AMQuses a waiting poll
 mechanism. As soon as theamq.js script is loaded, the client begins
 polling the server for available messages. A poll request can be sent
 as a GET request or as a POST if there are other messages ready to be
 delivered from the client to the server. When the
 MessageListenerServlet receives a poll it:

    1. if the poll request is a POST, all send, listen and unlisten
 messages are processed
    2. if there are no messages available for the client on any of the
 subscribed channels or topic, the servlet suspends the request
 handling until:
           * A MessageAvailableConsumer Listener is called to indicate
 that a message is now available; or
           * A timeout expires (normally around 30 seconds, which is
 less than all common TCP/IP, proxy and browser timeouts).
    3. A HTTP response is returned to the client containing all
 available messages encapsulated as text/xml.
 '

 On Sep 4, 9:45 pm, Ron Lawrence [EMAIL PROTECTED] wrote:

  I wonder if anyone has tried Active MQ. They seem to have a javascript
  client for JMS

   http://activemq.apache.org/ajax.html
--~--~-~--~~~---~--~~
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: Server / Client Communication Flipped

2008-09-04 Thread kilkenny

Hi Eggsy

Check out these links:
http://code.google.com/p/google-web-toolkit-incubator/wiki/ServerPushFAQ
http://docs.codehaus.org/display/JETTY/GWT

Hope that helps.
Adrian
--
http://traceurl.com

On 3 Sep., 22:05, eggsy84 [EMAIL PROTECTED] wrote:
 Hi all

 I'm just writing to see (may have already been discussed) if anyone
 has used GWT Client/Server communication in a way that the server
 notifies the client?

 At times when developing applications I have found myself thinking it
 would be much easier if the server could simply notify the client(s)
 of a state change?

 Typically GWT works by Async calling the server which is completely
 fine but I was wondering if this can be flipped such as new services
 like MobileMe profess to do - pushing contact to a client!

 Just wondering if anyone has done this?! How did they apporach it?

 Eggsy
--~--~-~--~~~---~--~~
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: Server / Client Communication Flipped

2008-09-04 Thread Thomas Broyer


On 4 sep, 08:51, elliot [EMAIL PROTECTED] wrote:
 holding the cnxn open is SUCH a cool idea, Folke! {and kilkenny, who i
 notice just posted useful links}
 whoever thought of that is a crafty person to trick http like that.

 however, it slows me down considerably, presumably because of the
 large number of other rpc calls my app makes {in parallel}.
 i hate the 2 call per server limit- maybe i can make a separate
 realtime server?

SOP will stop you.

If you have to make many other requests, use the heartbeat solution
(or a mix of both ideas: with timeouts so that your long-standing
requests won't block other RPC calls for too long)

Eventually, you could manage your own request queue, and automatically
cancel() your pending comet request when you need to use the second
connexion.
...but keep in mind that IE8 brings up the limit to 6 connexions per
server ;-)

Another solution: make your RPC calls only accept (in the sense of
the 202 HTTP status code) the request and send the response back into
the comet feed. That way, your RPC calls would be very fast (the
server answers without any processing) and could be queued up into the
one connexion left usable without slowing the application that much.
...but this means making your own generators for GWT-RPC services or
changing your application architecture (well, if you have DAOs, only
this layer would have to be changed ideally...)
--~--~-~--~~~---~--~~
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: Server / Client Communication Flipped

2008-09-04 Thread Ron Lawrence

I wonder if anyone has tried Active MQ. They seem to have a javascript
client for JMS

  http://activemq.apache.org/ajax.html

--~--~-~--~~~---~--~~
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: Server / Client Communication Flipped

2008-09-04 Thread elliot

their impl is rather like the one thomas described, using a comet-like
open cnxn coupled with a timeout.

'
To avoid the load vs latency tradeoff, AMQ uses a waiting poll
mechanism. As soon as the amq.js script is loaded, the client begins
polling the server for available messages. A poll request can be sent
as a GET request or as a POST if there are other messages ready to be
delivered from the client to the server. When the
MessageListenerServlet receives a poll it:

   1. if the poll request is a POST, all send, listen and unlisten
messages are processed
   2. if there are no messages available for the client on any of the
subscribed channels or topic, the servlet suspends the request
handling until:
  * A MessageAvailableConsumer Listener is called to indicate
that a message is now available; or
  * A timeout expires (normally around 30 seconds, which is
less than all common TCP/IP, proxy and browser timeouts).
   3. A HTTP response is returned to the client containing all
available messages encapsulated as text/xml.
'


On Sep 4, 9:45 pm, Ron Lawrence [EMAIL PROTECTED] wrote:
 I wonder if anyone has tried Active MQ. They seem to have a javascript
 client for JMS

  http://activemq.apache.org/ajax.html
--~--~-~--~~~---~--~~
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: Server / Client Communication Flipped

2008-09-03 Thread elliot

the only way i know of to accomplish this is to use a heartbeat.
every 5s or so, fetch all important notifications from the server.
process them in the client, possibly making more calls to do so.

i cant imagine that there exists a secure way to trigger events
directly from afar.

On Sep 3, 4:05 pm, eggsy84 [EMAIL PROTECTED] wrote:
 Hi all

 I'm just writing to see (may have already been discussed) if anyone
 has used GWT Client/Server communication in a way that the server
 notifies the client?

 At times when developing applications I have found myself thinking it
 would be much easier if the server could simply notify the client(s)
 of a state change?

 Typically GWT works by Async calling the server which is completely
 fine but I was wondering if this can be flipped such as new services
 like MobileMe profess to do - pushing contact to a client!

 Just wondering if anyone has done this?! How did they apporach it?

 Eggsy
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---