Only the browser can have initiative to evaluate ajaxian updaters?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Only the browser can have initiative to evaluate ajaxian updaters?

Sebastian Sastre-2
Hi there,
 
    I wonder if one can make the server to take the initiative on an ajaxian update of a component in seaside.
    All the updates I'm using until now are triggered by some javascript event or other browser initiative (which off course has a lot of sense because is coming from the user). But beside that I also find very valuable that the server can somehow say to the browser to execute an update on X component at any time.
 
    Any clue on how to do it?
 
    cheers,
 

Sebastian Sastre

PD: I think this helps to make the web UI experience more complete


_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Only the browser can have initiative to evaluate ajaxian updaters?

Lukas Renggli
>     Any clue on how to do it?

Yes, this technique is called Comet.

See this video and load the package called Comet from the Seaside repository:

http://www.lukas-renggli.ch/smalltalk/seaside/videos/comet.mov

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: Only the browser can have initiative to evaluateajaxian updaters?

Sebastian Sastre-2
Lukas,

        I've installed Comet.mb-18.mcz package in an 3.9 image with seaside
2.7 and I see that WAListener must be used instead of WAKomEncoded39 as I'm
using for an app.
       
        I'm looking the counter and the chat demos. This is so good! Now I'm
enthusiasted I have  questions perhaps you can help with
        a) now that the pros are known what are the cons of Comet in Seaside
(in general)? Why you won't use Comet?
        b) is ready for production? is somebody using it in production?
        c) how can I use the WAListener and have my "normal" applications
also working
        d) how can I use Comet and the WAKomEncoded39 encodind features as
well?
        e) an aap which uses Comet should be horizontally scaled the same
way as normal seaside applications? The techniques of Boris P. and Ramon
Leon to scale Seaside apps are still valid with Comet?
       
        thanks!
       
Sebastian
       

 

> -----Mensaje original-----
> De: [hidden email]
> [mailto:[hidden email]] En nombre
> de Lukas Renggli
> Enviado el: Domingo, 27 de Mayo de 2007 15:32
> Para: Seaside - general discussion
> Asunto: Re: [Seaside] Only the browser can have initiative to
> evaluateajaxian updaters?
>
> >     Any clue on how to do it?
>
> Yes, this technique is called Comet.
>
> See this video and load the package called Comet from the
> Seaside repository:
>
> http://www.lukas-renggli.ch/smalltalk/seaside/videos/comet.mov
>
> Lukas
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Only the browser can have initiative to evaluateajaxian updaters?

Lukas Renggli
>         a) now that the pros are known what are the cons of Comet in Seaside
> (in general)? Why you won't use Comet?

Resource and cpu hungry. Requires a special server. Probably doesn't
work trough Apache and Proxies. Potentially insecure (I was told so).
Have a look at the following links:

    http://ajaxpatterns.org/HTTP_Streaming
    http://en.wikipedia.org/wiki/Comet_(programming)

>         b) is ready for production? is somebody using it in production?

For me it was more an experiment with Seaside and it worked out pretty
well. I don't know of anybody using it in production.

>         c) how can I use the WAListener and have my "normal" applications
> also working

There is no way around WAListener. WATask and all code that sends
#returnResponse: during the rendering does not work. This can be
easily avoided though, so I don't see much of a problem there. These
two limitations have been slightly improved in 2.8, but I don't know
if the Comet package is working there yet.

>         d) how can I use Comet and the WAKomEncoded39 encodind features as
> well?

Probably.

>         e) an aap which uses Comet should be horizontally scaled the same
> way as normal seaside applications? The techniques of Boris P. and Ramon
> Leon to scale Seaside apps are still valid with Comet?

Yes, but take care some load-balancer/proxies might not like open connections.

After all this is a hack that does a lot of bad things with HTTP that
this protocol was never designed for.

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: Only the browser can have initiative to evaluateajaxianupdaters?

Sebastian Sastre-2
Lukas,

        is good to know. Anyway I think the future is over there so better
we keep an eye on that fish.

        Looking in the Seaside repository I saw SeasideAsync. What is for?
Is related?

        cheers,

Sebastian Sastre

> -----Mensaje original-----
> De: [hidden email]
> [mailto:[hidden email]] En nombre
> de Lukas Renggli
> Enviado el: Domingo, 27 de Mayo de 2007 17:39
> Para: Seaside - general discussion
> Asunto: Re: [Seaside] Only the browser can have initiative to
> evaluateajaxianupdaters?
>
> >         a) now that the pros are known what are the cons of
> Comet in
> > Seaside (in general)? Why you won't use Comet?
>
> Resource and cpu hungry. Requires a special server. Probably
> doesn't work trough Apache and Proxies. Potentially insecure
> (I was told so).
> Have a look at the following links:
>
>     http://ajaxpatterns.org/HTTP_Streaming
>     http://en.wikipedia.org/wiki/Comet_(programming)
>
> >         b) is ready for production? is somebody using it in
> production?
>
> For me it was more an experiment with Seaside and it worked
> out pretty well. I don't know of anybody using it in production.
>
> >         c) how can I use the WAListener and have my "normal"
> > applications also working
>
> There is no way around WAListener. WATask and all code that sends
> #returnResponse: during the rendering does not work. This can
> be easily avoided though, so I don't see much of a problem
> there. These two limitations have been slightly improved in
> 2.8, but I don't know if the Comet package is working there yet.
>
> >         d) how can I use Comet and the WAKomEncoded39 encodind
> > features as well?
>
> Probably.
>
> >         e) an aap which uses Comet should be horizontally
> scaled the
> > same way as normal seaside applications? The techniques of Boris P.
> > and Ramon Leon to scale Seaside apps are still valid with Comet?
>
> Yes, but take care some load-balancer/proxies might not like
> open connections.
>
> After all this is a hack that does a lot of bad things with
> HTTP that this protocol was never designed for.
>
> Lukas
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Only the browser can have initiative to evaluateajaxianupdaters?

Lukas Renggli
>         is good to know. Anyway I think the future is over there so better
> we keep an eye on that fish.

I didn't want to tell you that you should not use it, just that you
have to be careful and that there are certain risks ;-)

>         Looking in the Seaside repository I saw SeasideAsync. What is for?
> Is related?

That's an AJAX framework. It used to be part of Seaside at a time
where AJAX was not yet a buzz word. Today I suggest to use
Scriptaculous, as it provides a better JavaScript library on is easier
composable.

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: Only the browser can have initiative toevaluateajaxianupdaters?

Sebastian Sastre-2
> >         is good to know. Anyway I think the future is over there so
> > better we keep an eye on that fish.
>
> I didn't want to tell you that you should not use it, just
> that you have to be careful and that there are certain risks ;-)
>
Oh yeah, you was clear enough. Perhaps next version of http protocol include
something to make this less hakish and more safe. Good readings you sent me.

> >         Looking in the Seaside repository I saw
> SeasideAsync. What is for?
> > Is related?
>
> That's an AJAX framework. It used to be part of Seaside at a
> time where AJAX was not yet a buzz word. Today I suggest to
> use Scriptaculous, as it provides a better JavaScript library
> on is easier composable.
>
> Lukas
>
Oh now I get it, that's deprecated stuff. And off course I'm starting to
enjoy this Scriptaculous and Prototype libraries. Thank you a lot Lukas!

Cheers,

Sebastian

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside