[Melbourne-pm] An article on session storage in perl weekly newsletter

Toby Corkindale toby.corkindale at strategicdata.com.au
Mon Feb 17 20:19:42 PST 2014


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?


More information about the Melbourne-pm mailing list