David -

Thanks a lot for the clear explanation.

Just curious - do you think the previous implementation philosophy of
controllers, sessions and pages as actors with state changes being
done only through messages was a more FP oriented approach ? And that
the actor model broke down since Session is inherently an abstraction
that needs to be more stateful.

Thanks.
- Debasish

On Mar 4, 9:10 pm, David Pollak <[email protected]> wrote:
> On Wed, Mar 4, 2009 at 7:59 AM, debasish <[email protected]> wrote:
>
> > Dear All -
>
> > I have had a look at Lift quite some time ago. I remember referring to
> > this excellent post by David Pollak on the usage of actors in Lift
> > (http://blog.lostlake.org/index.php?/archives/59-How-lift-uses-Scala-
> > actors.html). Now that I am looking at the code base after quite some
> > time, I find lots of changes in it. e.g. the above post refers to
> > implementation of Session, Page, Controller etc. as Scala actors that
> > nicely interacts in the Request / Response cycle of Lift. But the
> > latest snapshot from Github indicates that the usage of actors in Lift
> > is now different. Is there any document or pointer that describes the
> > rationale of this change or explains the current usage of actors in
> > request / response processing ?
>
> Howdy,
>
> As Lift evolved and I did performance analysis, I found that the places
> where Actors were used were not necessary, added complexity to the code, and
> had adverse performance characteristics.  For example, as I added more
> methods to LiftSession, I found that it became increasingly difficult to
> choose between "methods" and "messages".  The problem became acute when
> Snippets and things external to LiftSession had to access LiftSession's
> state during the servicing of a request.  LiftSession needed public methods,
> but those exposed state and thus the Actor model broke down.  Yes, I could
> have created a "CurrentLiftSessionState" object that was exposed only to the
> current request via S (the thread-local state), but that seemed to be way
> too complex.
>
> So, at this point, Actors are used for CometActors and to help service Comet
> requests (event-based actors are used to suspend the long poll.)
>
> Does this help?
>
> Thanks,
>
> David
>
>
>
> > Thanks.
> > - Debasish
>
> --
> Lift, the simply functional web frameworkhttp://liftweb.net
> Beginning Scalahttp://www.apress.com/book/view/1430219890
> Follow me:http://twitter.com/dpp
> Git some:http://github.com/dpp

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to