right.  i wasn't talking about instances.  only interfaces and method
calls.  conceptually, if you have a session that is a store of pages
(the page map).  you can ask the session for an interface that gives
you pages.  how that's implemented is probably as you suggest.
although decoupling these two things would give you the flexibility
of easily changing the store's structure.  if you have enough sessions,
it may pay to have a separate folder for each one to store page files in,
for example.


Johan Compagner wrote:
> 
> no there is not a page store per session
> There is only one sessionstore and one pagestore per application.
> 
> what should be refactored a bit is the actual saving
> Previously it was really a simple thing that serialized the page and saved
> to disk
> Now those 2 operations are really divided and a special thread is
> introduced
> So a bit nicer layout so that people can reuse almost everything except
> the
> actual saving to disk (or to db)
> 
> 
> johan
> 
> 
> On 2/14/07, Jonathan Locke <[EMAIL PROTECTED]> wrote:
>>
>>
>>
>> i wonder if it wouldn't pay to stop and refactor this a little.
>> besides repackaging, it seems like there is really a sessionstore
>> which stores sessions and a pagestore which stores pages for
>> a given session (that independently synchronized sublist).
>> i'm not sure that's the best thing, but i am sure that it would be
>> worth stepping back and thinking about how to make the abstraction
>> as minimal and obvious as possible here.
>>
>>
>> Johan Compagner wrote:
>> >
>> > Everything can be restored. Because everything is on disk.
>> >
>> > yes but synching should be looked at. i think i go with jonathans idea
>> > that
>> > i already was thinking of.
>> > use a concurrent hashmap and then one entry is a list for one session.
>> > then concurrency should be almost gone between sessions.
>> >
>> > johan
>> >
>> >
>> > On 2/14/07, Matej Knopp <[EMAIL PROTECTED]> wrote:
>> >>
>> >> But cache is for caching things that are expensive to get, but when
>> they
>> >> are evicted from cache, they can be restored. When you remove wicket
>> >> page (or better said page version) for wicket 2nd level store, it can
>> >> not be restored.
>> >>
>> >> As for performance, the gain could be in finer grained
>> synchronization,
>> >> as imho currently the synchronization is the bottleneck.
>> >>
>> >> -Matej
>> >>
>> >> Johan Compagner wrote:
>> >> > Its EXACTLY a cache
>> >> > What isn't a cache is ehcache
>> >> >
>> >> > At least not in my point of view
>> >> > A cache is something you cache something as good as you can but it
>> can
>> >> > be gone at anytime.
>> >> > ehcache is not a cache. Its a in memory predefined size list. where
>> >> some
>> >> > can drop of and others not
>> >> > thats not caching. Thats pooling
>> >> >
>> >> > And the current caching is because we don't version anything anymore
>> in
>> >> > the undo buffer doesn't make much
>> >> > sense. Except if you really make new pages again for pretty much all
>> >> the
>> >> > clicks/navigation that you do.
>> >> > Maybe we should cache the byte[] instead of the pages. What would
>> cost
>> >> more?
>> >> >
>> >> > Because now if you are on page X version 0
>> >> > and you click and you go to Page X version 1
>> >> >
>> >> > then go back..
>> >> > Previously this was really still an in mem operation. Nowadays it is
>> >> > always a read from disk..
>> >> > maybe we should change that....
>> >> >
>> >> > and i am completely not suprised that ehcache was not performing
>> >> better.
>> >> > How could it do that?? Where should the gain come from?
>> >> > The current impl really grows directly with the hardware you have.
>> >> > ehcache need to be tweaked exactly
>> >> > what your system can handle. What do you say then? 200 page? 2000
>> >> pages?
>> >> > What does that cost?
>> >> >
>> >> >
>> >> > johan
>> >> >
>> >> >
>> >> >
>> >> > On 2/14/07, *Matej Knopp* < [EMAIL PROTECTED] <mailto:[EMAIL 
>> >> > PROTECTED]>>
>> >> wrote:
>> >> >
>> >> >     I've tried writing a IPageStore using ehcache today, the
>> >> performance
>> >> >     wasn't better than what we already have.
>> >> >
>> >> >     And Wicket second level session store is not really a cache,
>> it's
>> >> works
>> >> >     differently.
>> >> >
>> >> >     -Matej
>> >> >
>> >> >     Eelco Hillenius wrote:
>> >> >      > On 2/14/07, Andrew Klochkov < [EMAIL PROTECTED]
>> >> >     <mailto:[EMAIL PROTECTED]>> wrote:
>> >> >      >> I looked at pages second level cache implementation in
>> 1.3and
>> >> >     wonder
>> >> >      >> why not to use ehcache instead?
>> >> >      >
>> >> >      > Exactly what I have advocated, and which is why it is had the
>> >> name
>> >> >      > 'second level cache'. However, I don't think it should be the
>> >> >     default,
>> >> >      > but rather an (easy to configure) option to plugin anything
>> you
>> >> like
>> >> >      > as the 'second level cache', be that an actual caching
>> >> >     implementation,
>> >> >      > a database, (virtual) file system or something else.
>> >> >      >
>> >> >      >> It's much more intelligent, configurable
>> >> >      >> and performant.
>> >> >      >
>> >> >      > Keep in mind that we're still in the early stages of it.
>> We're
>> >> >      > currently tweaking the hell out of it though implementing
>> custom
>> >> >      > serialization, saving changes in a different thread and only
>> for
>> >> >     later
>> >> >      > versions than the last one (which we keep in memory) etc. The
>> >> >     point is
>> >> >      > that by doing it ourselves, we can tweak exactly for what is
>> >> needed
>> >> >      > for Wicket.
>> >> >      >
>> >> >      >> For example, it can have part of cache in memory while
>> >> >      >> swapping less frequently used pages on the disk.
>> >> >      >
>> >> >      > It's the idea that we'll have flow over support as well. I
>> don't
>> >> know
>> >> >      > whether LRU is the best mechanism though. There are probably
>> >> smarter
>> >> >      > ways to do this for Wicket, like basing it on recent
>> activity,
>> >> >      > available memory/ number of active sessions. I don't know
>> just
>> >> yet,
>> >> >      > but it's something that is on our mind for investigating.
>> First
>> >> >     things
>> >> >      > first though.
>> >> >      >
>> >> >      > Eelco
>> >> >      >
>> >> >      >
>> >> >
>> >>
>> -------------------------------------------------------------------------
>> >> >      > Take Surveys. Earn Cash. Influence the Future of IT
>> >> >      > Join SourceForge.net 's Techsay panel and you'll get the
>> chance
>> >> >     to share your
>> >> >      > opinions on IT & business topics through brief surveys-and
>> earn
>> >> cash
>> >> >      >
>> >> >
>> >>
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> >> >     <
>> >>
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV>
>> >> >      > _______________________________________________
>> >> >      > Wicket-user mailing list
>> >> >      > Wicket-user@lists.sourceforge.net
>> >> >     <mailto:Wicket-user@lists.sourceforge.net>
>> >> >      > https://lists.sourceforge.net/lists/listinfo/wicket-user
>> >> >      >
>> >> >
>> >> >
>> >> >
>> >>
>> -------------------------------------------------------------------------
>> >> >
>> >> >     Take Surveys. Earn Cash. Influence the Future of IT
>> >> >     Join SourceForge.net's Techsay panel and you'll get the chance
>> to
>> >> >     share your
>> >> >     opinions on IT & business topics through brief surveys-and earn
>> >> cash
>> >> >
>> >>
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> >> >     <
>> >>
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV>
>> >> >     _______________________________________________
>> >> >     Wicket-user mailing list
>> >> >     Wicket-user@lists.sourceforge.net
>> >> >     <mailto:Wicket-user@lists.sourceforge.net>
>> >> >     https://lists.sourceforge.net/lists/listinfo/wicket-user
>> >> >     <https://lists.sourceforge.net/lists/listinfo/wicket-user>
>> >> >
>> >> >
>> >> >
>> >> >
>> >>
>> ------------------------------------------------------------------------
>> >> >
>> >> >
>> >>
>> -------------------------------------------------------------------------
>> >> > Take Surveys. Earn Cash. Influence the Future of IT
>> >> > Join SourceForge.net's Techsay panel and you'll get the chance to
>> share
>> >> your
>> >> > opinions on IT & business topics through brief surveys-and earn cash
>> >> >
>> >>
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> >> >
>> >> >
>> >> >
>> >>
>> ------------------------------------------------------------------------
>> >> >
>> >> > _______________________________________________
>> >> > Wicket-user mailing list
>> >> > Wicket-user@lists.sourceforge.net
>> >> > https://lists.sourceforge.net/lists/listinfo/wicket-user
>> >>
>> >>
>> >>
>> -------------------------------------------------------------------------
>> >> Take Surveys. Earn Cash. Influence the Future of IT
>> >> Join SourceForge.net's Techsay panel and you'll get the chance to
>> share
>> >> your
>> >> opinions on IT & business topics through brief surveys-and earn cash
>> >>
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> >> _______________________________________________
>> >> Wicket-user mailing list
>> >> Wicket-user@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/wicket-user
>> >>
>> >
>> >
>> -------------------------------------------------------------------------
>> > Take Surveys. Earn Cash. Influence the Future of IT
>> > Join SourceForge.net's Techsay panel and you'll get the chance to share
>> > your
>> > opinions on IT & business topics through brief surveys-and earn cash
>> >
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> > _______________________________________________
>> > Wicket-user mailing list
>> > Wicket-user@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/wicket-user
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/second-level-cache---why-not-to-use-ehcache-tf3227180.html#a8976525
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -------------------------------------------------------------------------
>> Take Surveys. Earn Cash. Influence the Future of IT
>> Join SourceForge.net's Techsay panel and you'll get the chance to share
>> your
>> opinions on IT & business topics through brief surveys-and earn cash
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> _______________________________________________
>> Wicket-user mailing list
>> Wicket-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>>
> 
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> 
> 

-- 
View this message in context: 
http://www.nabble.com/second-level-cache---why-not-to-use-ehcache-tf3227180.html#a8976739
Sent from the Wicket - User mailing list archive at Nabble.com.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to