One comment I would make about Parallelizer is that it creates a new thread
pool every time it's invoked.  This isn't very efficient but more
importantly, it's somewhat reckless.  Imagine if your home page or your
search function are invoked simultaneously by 10 users (or more).   The
application will try to create 10*20 threads at once and will likely run
into OutOfMemoryErrors. Users will be left with ugly HTTP 500 error pages.

I would probably use a single thread pool (either fixed size or cached with
an upper limit)  and, since you were asking about periodically running on
task(s), you should probably look into making it a
ScheduledThreadPoolExecutor and run your tasks with, e.g.,
scheduleWithFixedDelay().

Great app, btw! :)

alex

On Sun, Dec 13, 2009 at 3:52 PM, Dave Briccetti <[email protected]> wrote:

> I discovered I need a way to perodically reload certain cached data
> from Flickr. What sort of timer/actor/thread should I use. Every hour
> or so I want to call a method from Flickr.scala on each FlickrUser
> object.
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<liftweb%[email protected]>
> .
> 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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.


Reply via email to