Hi,
First, I'd like to announce the release of File::Cache 0.04, the first
public release of another perl library that caches data to be shared
between processes, this time via the filesystem:
The uploaded file
File-Cache-0.04.tar.gz
has entered CPAN as
file: $CPAN/authors/id/D/DC/DCLINTON/File-Cache-0.04.tar.gz
size: 11270 bytes
md5: 48257c5dd296339b54e4bca4f03624a5
Second, I'd like to explain why I wrote it. As some of you know, and
some are even using, I put IPC::Cache out on CPAN last month. Well,
it turns out that while IPC::Cache is very easy to use, it has some
severe performance limitations when it is pushed beyond a handful of
cached objects. Essentially, IPC::Cache relies on the Storable module
to persist and de-persist complex perl datatypes. However, due to
the complexity of splitting that data across shared memory segments,
even with the help of IPC::ShareLite, the entire cache must be frozen
or thawed at once. There is definitely room for someone to figure out
a better way to do this.
However, since our site needed a solution quickly, I wrote
File::Cache. This module shares the exact same interface as
IPC::Cache, but does not suffer the performance penalties associated
with a moderate number of objects. File::Cache simply stores the data
on the filesystem and relies on the underlying OS caching and
buffering to keep performance high.
For those using IPC::Cache, I encourage you to check out File::Cache.
You will be able to switch your code over simply by a global find and
replace of IPC::Cache with File::Cache.
I wrote a benchmarking script that illustrates these issues, and have
attached the results to this mail. Quite revealing.
BTW, if Sam Tregar reads this list, I wonder if he might be interested
in benchmarking his IPC::SharedCache code, too. I made an honest
attempt to benchmark it, but didn't want to do SharedCache a
disservice and give inaccurate results. I can send over the benchmark
script to anyone interested.
Happy caching,
-DeWitt
First, I'd like to announce the release of File::Cache 0.04, the first
public release of another perl library that caches data to be shared
between processes, this time via the filesystem:
The uploaded file
File-Cache-0.04.tar.gz
has entered CPAN as
file: $CPAN/authors/id/D/DC/DCLINTON/File-Cache-0.04.tar.gz
size: 11270 bytes
md5: 48257c5dd296339b54e4bca4f03624a5
Second, I'd like to explain why I wrote it. As some of you know, and
some are even using, I put IPC::Cache out on CPAN last month. Well,
it turns out that while IPC::Cache is very easy to use, it has some
severe performance limitations when it is pushed beyond a handful of
cached objects. Essentially, IPC::Cache relies on the Storable module
to persist and de-persist complex perl datatypes. However, due to
the complexity of splitting that data across shared memory segments,
even with the help of IPC::ShareLite, the entire cache must be frozen
or thawed at once. There is definitely room for someone to figure out
a better way to do this.
However, since our site needed a solution quickly, I wrote
File::Cache. This module shares the exact same interface as
IPC::Cache, but does not suffer the performance penalties associated
with a moderate number of objects. File::Cache simply stores the data
on the filesystem and relies on the underlying OS caching and
buffering to keep performance high.
For those using IPC::Cache, I encourage you to check out File::Cache.
You will be able to switch your code over simply by a global find and
replace of IPC::Cache with File::Cache.
I wrote a benchmarking script that illustrates these issues, and have
attached the results to this mail. Quite revealing.
BTW, if Sam Tregar reads this list, I wonder if he might be interested
in benchmarking his IPC::SharedCache code, too. I made an honest
attempt to benchmark it, but didn't want to do SharedCache a
disservice and give inaccurate results. I can send over the benchmark
script to anyone interested.
Happy caching,
-DeWitt