[Melbourne-pm] An article on session storage in perl weekly newsletter
Bron Gondwana
brong at fastmail.fm
Tue Feb 18 02:25:14 PST 2014
On Tue, Feb 18, 2014, at 03:19 PM, Toby Corkindale wrote:
> On 18/02/14 15:06, Tim Connors wrote:
> > On Tue, 18 Feb 2014, Toby Corkindale wrote:
> >
> >> On 18/02/14 14:22, Tim Connors wrote:
> >> [snip]
> >>> (I still don't get the point of databases. perl storables were always
> >>> good enough for me and my tens of millions of objects in galaxy simulations)
> >>
> >> How did you manage multiple processes simultaneously wanting access to update
> >> different parts of the same file?
> >>
> >> How did you handle cases where you wanted a process to guarantee that either
> >> all of none of its changes were stored, but never some? (Whilst still allowing
> >> simultaneous access by multiple processes)
> >
> > Filesystem is a database, and atomic renames :P
>
> So a file per row?
> That must perform amazingly when you want to do something like this
> across a million tiny files:
> SELECT SUM(x) WHERE y > z
>
> I guess you have to open every single file in order to flock() them so
> you get an internally consistent view. How many file handles are your
> processes allowed?
Nah, just flock a single global lock file for writes.
Bron ( think inside the box )
--
Bron Gondwana
brong at fastmail.fm
More information about the Melbourne-pm
mailing list