> -----Original Message-----
> From: Raphael Luta [mailto:[EMAIL PROTECTED]]
> Sent: Sonntag, 12. November 2000 23:26
> To: JetSpeed
> Subject: Re: Scalability problem in PortletSetFactory ?
>
>
> Santiago Gala wrote:
> >
> > [EMAIL PROTECTED] wrote:
> >
> > > There seems to be a scalability problem in the PortletSetFactory:
> > > For each user, a PortletSetFactory object is created that
> holds a Portlets
> > > tree
> > > representing the user's PSML file. I guess the tree can
> become quite big in
> > > terms
> > > of memory usage.
> > >
> > > The PortletSetFactory object is stored in the SingletonHolder and
> > > apparently
> > > is never removed. If the number of users is large, the
> memory of the server
> > > may
> > > be used up after running for some time.
> > >
> > > Is there a particular reason for not putting the
> PortletSetFactory object
> > > into the
> > > HttpSession ?
> > > This would allow the JVM to garbage-collect the
> PortletSetFactory and the
> > > referenced
> > > Portlets tree after the HTTP session expires.
> > >
> >
> > That were exactly the final conclussion we reached. For a
> small portal with a
> > small number of users, it does not matter. If you are
> developing a portal with
> > hundreds of thousands of users, it is better to have in
> memory only the PSMLs
> > from the users that have active sessions, and reparse the
> file when the user
> > logs in again, than having tens of thousands of dangling
> psml trees in memory
> > after your portal has been up for a couple of months.
> >
> > We will put this as a proposal, it nobody oposes. I'm
> clearly +1 on that.
> >
> > So the PortletSetFactory will disappear, and the user PSML
> will be retrieved
> > from the session if it is there, or else created and put
> there when the session
> > starts or the user logs in.
> >
>
> There's a good reason why the PSML is not in the session : a
> PSML file is not
> necessarily equal to one user. The mapping between PSML files
> and User is done
> by the Profiler, which can be implemented in a lot of
> different ways. For
> example, in my internal setup, I use a kind of profilied
> access where several
> users (grouped by connectivity criteria) share the same PSML
> file. How do you
> efficiently handle this case when using HttpSession ?
>
> I think a more versatile strategy would be to use a FIFO or
> MRU cache with the
> cache size set in the property file, just like Turbine does
> for its modules.
>
+1. We have a similar mechanism inside of the profiler, which would
not work inside of the session. But if one finds a solution I would
be happy.
> > CAVEAT: There is an exception for the default user PSML,
> maybe, but is could be
> > stored in a static var in the PortletSet class, from where
> it could be copied
> > by a special method, if it is not writable. If we want to
> modify it, then the
> > default.psml should be recreated by every "default"
> session. Ideas on this?
> >
>
> I don't think any file should be treated in a specific way.
> The PortletFactory has
> *no way* to guess the use (authenticated/anonymous/something
> else) ofa
> given PSML file, this is all handled by the Profiler.
>
> I would be -1 on any tie between PSML and a user session.
>
> --
> Rapha�l Luta - [EMAIL PROTECTED]
>
>
>
>
> --
> --------------------------------------------------------------
> Please read the FAQ! <http://java.apache.org/faq/>
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Archives and Other: <http://marc.theaimsgroup.com/?l=jetspeed>
> Problems?: [EMAIL PROTECTED]
>
--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://marc.theaimsgroup.com/?l=jetspeed>
Problems?: [EMAIL PROTECTED]