A posting on Lift 2.2-M1's stateless mode

13 views
Skip to first unread message

David Pollak

unread,
Nov 2, 2010, 12:33:33 AM11/2/10
to liftweb
Folks,

For those of you building high volume CMS systems around Lift... please read: https://liftweb.assembla.com/wiki/show/liftweb/Stateless_Requests

It describes how to mark pages in your site as "stateless".  Those pages will render normally, but will not allow any session state modifying operations.  They will "do the right thing" if there is an existing session (all the SessionVars will be available for reading), but they will prohibit the setting of SessionVars, accessing CometActors or using most of SHtml.

Thanks,

David

--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Blog: http://goodstuff.im
Surf the harmonics

Derek Chen-Becker

unread,
Nov 2, 2010, 12:13:26 PM11/2/10
to lif...@googlegroups.com
Very nice!

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

Graham Tackley

unread,
Nov 2, 2010, 1:29:59 PM11/2/10
to lif...@googlegroups.com
Excellent!

My 100% stateless webapp I'm working on (well, 100% of the state is stored in the URL :) works just great with     

LiftRules.statelessTest.append {
  case _ => true
}

in my Boot and my container set with sessions disabled.  And, as expected, if I use something that requires session state (such as SHtml.text) I get a clear error message.

Thanks,
g
Please consider the environment before printing this email.
------------------------------------------------------------------
Visit guardian.co.uk - newspaper website of the year
www.guardian.co.uk  www.observer.co.uk

To save up to 33% when you subscribe to the Guardian and the Observer
visit http://www.guardian.co.uk/subscriber

---------------------------------------------------------------------

This e-mail and all attachments are confidential and may also
be privileged. If you are not the named recipient, please notify
the sender and delete the e-mail and all attachments immediately.
Do not disclose the contents to another person. You may not use
the information for any purpose, or store, or copy, it in any way.

Guardian News & Media Limited is not liable for any computer
viruses or other material transmitted with or as part of this
e-mail. You should employ virus checking software.

Guardian News & Media Limited

A member of Guardian Media Group plc
Registered Office
PO Box 68164
Kings Place
90 York Way
London
N1P 2AP

Registered in England Number 908396

David Pollak

unread,
Nov 2, 2010, 1:34:34 PM11/2/10
to lif...@googlegroups.com
On Tue, Nov 2, 2010 at 10:29 AM, Graham Tackley <graham....@guardian.co.uk> wrote:
Excellent!

My 100% stateless webapp I'm working on (well, 100% of the state is stored in the URL :) works just great with     

LiftRules.statelessTest.append {
  case _ => true
}

in my Boot and my container set with sessions disabled.  And, as expected, if I use something that requires session state (such as SHtml.text) I get a clear error message.

Does that mean you're buying the first pint next time I'm in London? ;-)
 

Graham Tackley

unread,
Nov 3, 2010, 6:36:31 AM11/3/10
to lif...@googlegroups.com
On 2 November 2010 17:34, David Pollak <feeder.of...@gmail.com> wrote:

Does that mean you're buying the first pint next time I'm in London? ;-)

Of course ;)  Maybe even stretch to the second too... 

Giovanni Ruggiero

unread,
Nov 3, 2010, 7:40:31 AM11/3/10
to Lift
I'm not building stateless apps and we're not famous for beer, but if
you like good wine, the next time you'll be in Rome (Italy), you've
found who'll buy the first glass :)

On Nov 2, 6:34 pm, David Pollak <feeder.of.the.be...@gmail.com> wrote:
> On Tue, Nov 2, 2010 at 10:29 AM, Graham Tackley <
>
> graham.tack...@guardian.co.uk> wrote:
> > Excellent!
>
> > My 100% stateless webapp I'm working on (well, 100% of the state is stored
> > in the URL :) works just great with
>
> > LiftRules.statelessTest.append {
> >   case _ => true
> > }
>
> > in my Boot and my container set with sessions disabled.  And, as expected,
> > if I use something that requires session state (such as SHtml.text) I get a
> > clear error message.
>
> Does that mean you're buying the first pint next time I'm in London? ;-)
>
>
>
>
>
>
>
> > Thanks,
> > g
>
> > On 2 November 2010 16:13, Derek Chen-Becker <dchenbec...@gmail.com> wrote:
>
> >> Very nice!
>
> >> On Mon, Nov 1, 2010 at 10:33 PM, David Pollak <
> >> feeder.of.the.be...@gmail.com> wrote:
>
> >>> Folks,
>
> >>> For those of you building high volume CMS systems around Lift... please
> >>> read:https://liftweb.assembla.com/wiki/show/liftweb/Stateless_Requests
>
> >>> It describes how to mark pages in your site as "stateless".  Those pages
> >>> will render normally, but will not allow any session state modifying
> >>> operations.  They will "do the right thing" if there is an existing session
> >>> (all the SessionVars will be available for reading), but they will prohibit
> >>> the setting of SessionVars, accessing CometActors or using most of SHtml.
>
> >>> Thanks,
>
> >>> David
>
> >>> --
> >>> Lift, the simply functional web frameworkhttp://liftweb.net
> >>> Beginning Scalahttp://www.apress.com/book/view/1430219890
> >>> Follow me:http://twitter.com/dpp
> >>> Blog:http://goodstuff.im
> >>> Surf the harmonics
>
> >>> --
> >>> You received this message because you are subscribed to the Google Groups
> >>> "Lift" group.
> >>> To post to this group, send email to lif...@googlegroups.com.
> >>> To unsubscribe from this group, send email to
> >>> liftweb+u...@googlegroups.com<liftweb%2Bunsu...@googlegroups.com >
> >>> .
> >>> For more options, visit this group at
> >>>http://groups.google.com/group/liftweb?hl=en.
>
> >>  --
> >> You received this message because you are subscribed to the Google Groups
> >> "Lift" group.
> >> To post to this group, send email to lif...@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> liftweb+u...@googlegroups.com<liftweb%2Bunsu...@googlegroups.com >
> >> .
> >> For more options, visit this group at
> >>http://groups.google.com/group/liftweb?hl=en.
>
> > Please consider the environment before printing this email.
> > ------------------------------------------------------------------
> > Visit guardian.co.uk - newspaper website of the yearwww.guardian.co.uk www.observer.co.uk
>
> > To save up to 33% when you subscribe to the Guardian and the Observer
> > visithttp://www.guardian.co.uk/subscriber
>
> > ---------------------------------------------------------------------
>
> > This e-mail and all attachments are confidential and may also
> > be privileged. If you are not the named recipient, please notify
> > the sender and delete the e-mail and all attachments immediately.
> > Do not disclose the contents to another person. You may not use
> > the information for any purpose, or store, or copy, it in any way.
>
> > Guardian News & Media Limited is not liable for any computer
> > viruses or other material transmitted with or as part of this
> > e-mail. You should employ virus checking software.
>
> > Guardian News & Media Limited
>
> > A member of Guardian Media Group plc
> > Registered Office
> > PO Box 68164
> > Kings Place
> > 90 York Way
> > London
> > N1P 2AP
>
> > Registered in England Number 908396
>
> > --
>
> > You received this message because you are subscribed to the Google Groups "Lift" group.
>
> > To post to this group, send email to lif...@googlegroups.com.
>
> > To unsubscribe from this group, send email to liftweb+u...@googlegroups.com <liftweb%2Bunsu...@googlegroups.com>.
>
> > For more options, visit this group athttp://groups.google.com/group/liftweb?hl=en.
>
> --
> Lift, the simply functional web frameworkhttp://liftweb.net
> Beginning Scalahttp://www.apress.com/book/view/1430219890

David Pollak

unread,
Nov 4, 2010, 12:26:05 AM11/4/10
to lif...@googlegroups.com
On Wed, Nov 3, 2010 at 4:40 AM, Giovanni Ruggiero <giovanni...@gmail.com> wrote:
I'm not building stateless apps and we're not famous for beer, but if
you like good wine, the next time you'll be in Rome (Italy), you've
found who'll buy the first glass :)

Gotta plan a trip to Rome... can't pass up an offer like this!!
 
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.




--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890

Paul Dale

unread,
Nov 4, 2010, 1:33:32 PM11/4/10
to lif...@googlegroups.com
On Wed, Nov 3, 2010 at 10:26 PM, David Pollak
<feeder.of...@gmail.com> wrote:
> On Wed, Nov 3, 2010 at 4:40 AM, Giovanni Ruggiero
> <giovanni...@gmail.com> wrote:
>>
>> I'm not building stateless apps and we're not famous for beer, but if
>> you like good wine, the next time you'll be in Rome (Italy), you've
>> found who'll buy the first glass :)
>
> Gotta plan a trip to Rome... can't pass up an offer like this!!

If you do a liftoff Rome, I'll come down from Frankfurt :-)

Reply all
Reply to author
Forward
0 new messages