[sf-perl] Catalyst question - sharing data between sessions

Stefan Amshey parallax99 at hotmail.com
Wed Mar 25 10:34:25 PDT 2009


Actually, I was merely stating fact that the stash is cleared after every request.  I also understand the concept of a user session, but what I'm looking for is a way of sharing data between users, each of whom is involved in a separate session, but concurrently.  I'm not worried about clearing the data out, only sharing it so that we don't have to re-load it for each session.
    /S

-
Stefan Amshey
parallax99 at hotmail.com



> Date: Wed, 25 Mar 2009 10:27:12 -0700
> From: garth.webb at gmail.com
> To: sanfrancisco-pm at pm.org
> Subject: Re: [sf-perl] Catalyst question - sharing data between sessions
> 
> So I'm not clear about a few things.  You say that you want to share
> some context between sessions.  Is this between two different user
> sessions, or reload the same session for one user with all its data
> more than once?  You also say that you clear the stash after every
> request.  Does this mean you want to clear all the data?  This
> wouldn't make sense for reloading the same session for a single user,
> and if its multiple users they would only be able to share data if the
> requests were happening simultaneously.
> 
> I *think* what you're asking for is the concept of persistent session
> data that is available for a single user on every request they make.
> This is pretty easy to setup on Catalyst:
> 
>   http://search.cpan.org/dist/Catalyst-Plugin-Session/lib/Catalyst/Plugin/Session/Tutorial.pod
> 
> If you want to share data between processes and don't want to incur
> hits to your DB, maybe you want Memcached.
> 
> Garth
> 
> 2009/3/25 Stefan Amshey <parallax99 at hotmail.com>:
> > Hi all-
> >
> > I realize that this may not be the best list to ask this question on since
> > it involves a specific Perl technology, but does anyone out there have some
> > experience writing web-apps in Catalyst that could give me a basic point in
> > the right direction regarding the following:
> >
> > I'm writing a web-app that needs to hold some large data structures, and
> > instead of incurring the cost of loading those structures for each user
> > session we'd like to store them in some context that is shared between
> > sessions and possibly locked/unlocked/synchronized to avoid collisions.  The
> > stash is cleared after every request, and the session object is
> > user-specific.  Is there some concept of a "global session", or can we tie
> > variables to the top-level Catalyst object, or something like that?  Anyone
> > solved this problem before without resorting to writing files?
> >
> > Thanks!
> >     /S
> >
> > - Stefan Amshey parallax99 at hotmail.com
> >
> >
> > ________________________________
> > Express your personality in color! Preview and select themes for Hotmail®.
> > See how.
> > _______________________________________________
> > SanFrancisco-pm mailing list
> > SanFrancisco-pm at pm.org
> > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm
> >
> >
> _______________________________________________
> SanFrancisco-pm mailing list
> SanFrancisco-pm at pm.org
> http://mail.pm.org/mailman/listinfo/sanfrancisco-pm

_________________________________________________________________
Express your personality in color! Preview and select themes for Hotmail®.
http://www.windowslive-hotmail.com/LearnMore/personalize.aspx?ocid=TXT_MSGTX_WL_HM_express_032009#colortheme
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/sanfrancisco-pm/attachments/20090325/71eba73f/attachment.html>


More information about the SanFrancisco-pm mailing list