[Dancer-users] messed up routes
Matthew Vickers
mvickers at quispiam.com
Thu Oct 20 23:23:35 CEST 2011
>
> Whenever you have more than one context for your data, or more than
> one
> worker operating on it you need to be careful with this sort of
> thing.
>
> There are two different axes you need to think about it:
> lexical scope
> - per function
> - per module
> - per backend
> - global (e.g. session storage, databases)
> temporal scope
> - per request (dancer params)
> - per session (dancer sessions)
> - per backend lifetime (our $var)
> - long-term (databases)
>
> If some value (like layout) isn't in the grid you think it is, you get
>
> unexpected behaviour. Likewise putting information in the wrong grid
> (e.g. "current client" isn't session-based) can cause problems.
>
> You'll get similar unexpected behaviour when you have concurrency
> issues
> with multiple workers operating on shared data. What works fine with a
>
> single worker can intermittently fail with multiple ones.
>
Brilliant advice, thanks Richard !
Matt
--
www.quispiam.com | filtosaur.com
+61 405001707
More information about the Dancer-users
mailing list