GWT - Client Data Recieving in a parallel way ?

83 views
Skip to first unread message

Alp Yilancioglu

unread,
Nov 23, 2012, 11:02:53 AM11/23/12
to google-we...@googlegroups.com
Hi,
i am using comet to push data from server to client, ( sending and recieving in intervals of 30 sec )
when something is up, threads are raised on server side ( pushes the data to client immediatly )
in this life cycle, i want to get the pushed data parallelly recieved  at the client side,
unfortunetly even if i create a ScheduledCommand at runtime(  with dynamic parameters ) by using it in a class ( like a java thread constructor ).
 
GWT behaves; like
       The first pushed data recived in the callback function --> callback  function fully processes  the data ( passes it to a Dynamic ScheduledCommand for parsing it), 
         than ( when the callback has finished )  the scheduledcommand executes
   during all this process the next pushed data  waits for this cycle to end.. ( even  if i used a  dynamicly created  ScheduledCommand during runtime )
 
what should i do to Recieve data  in a parallel way  ?
  

Oliver Krylow

unread,
Nov 23, 2012, 2:38:48 PM11/23/12
to google-we...@googlegroups.com
As far as I can tell JavaScript engines are inheritly single threaded. Maybe simulate threads on your own using IncrementalCommand

Don't know if it is worth the effort though.


  

--
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/-/SGmnuj2L-MEJ.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Alp Yilancioglu

unread,
Nov 24, 2012, 5:15:34 AM11/24/12
to google-we...@googlegroups.com
what about iFrames ? would it be a solution do you think?

Thomas Broyer

unread,
Nov 24, 2012, 5:49:58 AM11/24/12
to google-we...@googlegroups.com

On Saturday, November 24, 2012 11:15:34 AM UTC+1, Alp Yilancioglu wrote:
what about iFrames ? would it be a solution do you think?

No, there's no way to make things happen concurrently in JS without using WebWorkers (or possibly multiple windows, talking through postMessage –frames do not count as windows–)

I'm not sure I understand your problem to begin with, but maybe you spend too much time client-side processing the data. Try speeding your data processing to increase throughput; or move that processing to a WebWorker (but there's no built-in way to deal with WebWorkers in GWT; Google seems to have something in the works but they haven't open-sourced it (yet))

Alp Yilancioglu

unread,
Nov 24, 2012, 4:38:41 PM11/24/12
to google-we...@googlegroups.com
parsing the data take time, and i might have 1 to 10.. may be more..  data pushes from the server at the same time interval,
and i want to parse the data in a parallel way..   will try Html5 WebWorkers JS  
 
Thanks..
 

Thomas Broyer

unread,
Nov 24, 2012, 6:10:39 PM11/24/12
to google-we...@googlegroups.com


On Saturday, November 24, 2012 10:38:41 PM UTC+1, Alp Yilancioglu wrote:
parsing the data take time,

Can't you offload it to the server?

Oliver Krylow

unread,
Nov 24, 2012, 6:09:54 PM11/24/12
to google-we...@googlegroups.com
Shoudn't the WebWorkers API be exposed through Elemental ? 


 

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.

Alp Yilancioglu

unread,
Nov 24, 2012, 8:21:38 PM11/24/12
to google-we...@googlegroups.com
purpose is to parse the data on client

Alp Yilancioglu

unread,
Nov 24, 2012, 8:44:26 PM11/24/12
to google-we...@googlegroups.com
Html5 features are fully supported with in elemental ? But it says the lib is experimental ?
Reply all
Reply to author
Forward
0 new messages