On Thu, Feb 26, 2009 at 1:03 AM, Bertrand Delacretaz <[email protected] > wrote:
> Hi David, > > On Wed, Feb 25, 2009 at 6:38 PM, David Pollak > <[email protected]> wrote: > > ...The reason for sessions has to do with long polling and the general > cost of > > setting up the machinery related to a User. If we were to implement long > > polling without sessions, we would have to construct the entire listener > > mechanism on each long poll request rather than at the beginning of the > > session.... > > Do I understand correctly that the need for HTTP sessions comes from > the mechanisms used by the Lift/Scala backend to implement long > polling? Just trying to understand the issues. Sessions set up listeners. Listeners are stateful. Stateful means sessions so that even if after the HTTP request is serviced, the listener can receive updates and respond with those updates immediately upon the next HTTP request for new messages. The requirement is neither a Lift nor a Scala requirement, but an ESME design requirement. More broadly, trying to force ESME into a REST/CRUD model because REST/CRUD is the design pattern du jour is a bad thing. ESME is a messaging system. I've been working on micro-messaging systems for nearly two years now. See http://blog.lostlake.org/index.php?/archives/55-Prance-with-the-Horses,-Skittr-with-the-Mice.html Prior to that, I spent many, many years working with real time data feeds and spreadsheets in the financial sector. I invented the worlds first real-time spreadsheet as well as the first browser-based multi-user spreadsheet. I have a pretty good handle on messaging systems. ESME is a messaging system. It would make a lot more sense to try to adapt the JMS APIs to ESME than REST/CRUD APIs. So, I've got the Lift 1.0 launch today, a book on Scala to finish, a week full of meeting next week, QCon London the following week and TSS the week after that, so I'm not going to have a lot of time to go through another round of "REST is the only way to go" debates. David > > > -Bertrand > -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp
