[fpc-devel] Android native application with local webserver

Dariusz Mazur darekm at emadar.com
Thu Apr 14 14:55:08 CEST 2011


  W dniu 2011-04-14 11:35, Michael Schnell pisze:
> On 04/14/2011 10:36 AM, Dariusz Mazur wrote:
>>
>>> Did you already succeed in managing the usual obstacles of this: 
>>> creating timers,
>> yes
> Great ! How ?
What is the problem when pthreads works?
>
>>> notifying the main thread from worker threads, 
>> yes
> Great ! How ?
server work in own thread, each request in own, each session (whole 
application for one user) in own
communication between request thread and session threads are done via 
FIFO queue

my old demo webapp
http://www.emadar.com/fpc/xwebdemo.zip


>>> doing application initiated "active" user notifications on the 
>>> web-page ?
>>>
>> I'm not sure I understand
>> when I need this, web page (by Javascript) sequentially ask server
> This is what I meant. So you do polling in the Java script, killing 
> the performance of the whole device. There are Java script based 
> algorithms (such as "Comet") that might or might not help and might or 
> might not introduce additional problems.

I don't think so
But when browser send request, server don't response at now, only wait 
30s and then (if its nothing to respond) send message to browser with 
order to repeat request.



-- 
   Darek







More information about the fpc-devel mailing list