[web2py] Re: reverse ajax on free hosting like fluxflex / pythonanywhere

2012-05-15 Thread Massimo Di Pierro
You need html5 websockets to do what you want to do. That requires an async 
socket that can keep many connections open for long time. You are right, 
some hosts block that. They do not specifically block tornado.

On Tuesday, 15 May 2012 04:45:24 UTC-5, stefaan wrote:
>
>
> Please correct me if I'm wrong, but as far as I understand tornado cannot 
> be used with free hosting?
> (or can it?)
>


[web2py] Re: reverse ajax on free hosting like fluxflex / pythonanywhere

2012-05-15 Thread stefaan

Please correct me if I'm wrong, but as far as I understand tornado cannot 
be used with free hosting?
(or can it?)


[web2py] Re: reverse ajax on free hosting like fluxflex / pythonanywhere

2012-05-13 Thread Massimo Di Pierro
Look into gluon/contrib/comet_messaging.py. There is an example in there. 
Requires tornado.

On Sunday, 13 May 2012 07:06:49 UTC-5, stefaan wrote:
>
> Hello list, 
>
> Would anyone have an idea on how to accomplish reverse ajax ("server 
> push") on free hosting like fluxflex/pythonanywhere? 
>
> If I'm correct, typical "comet" libraries require special web servers, 
> so that is probably out of the question on typical free hosting sites. 
>
> For my own education I've implemented a little chat application using a 
> "long polling" approach, where the server receives a request, and is 
> looping and sleeping until some timeout occurs or until new info is 
> available, but it very quickly uses up all my CPU quotum on e.g. 
> fluxflex (I suspect that a statement like time.sleep(1) is counted as 
> using 1 second of CPU time) 
>
> Is the only alternative to use GAE with their channel API ? 
>
> Thanks for any insights you may have. 
>
>