[PEAK] protocols advice

Duncan McGreggor python at adytumsolutions.com
Mon Aug 16 22:05:26 EDT 2004

Phillip and crew,

Over the past week, I've been pouring over the emails in the list 
archives for the last eight months. I was encouraged to write this 
email due to Phillip's most helpful response to Gabriel regarding his 
basic world modeling questions for PUB.

I am a PEAK/PyProtocols beginner. I'm a professional coder, in the 
sense that there are professional plumbers. You guys are having 
discussions on the order of post-doctoral theses; I am delighted that 
you take the time to talk to us plumbers ;-)

I am working on a project that stores RRD files in a directory 
hierarchy (UNIX). We are doing a small implementation for right now, 
but may be requested to do a larger, more robust implementation -- at 
which point, we will most likely move to some sort of RDBMS storage to 
avoid local file-locking issues and allow for a distributed rollout. We 
also have a little nevow appserver that serves RRD files and RRD 
graphs. For this reason (and others), we need to have pythonic access 
to the data.

My thoughts are these:
* Write an interface that defines how we get at our data
* Write an implementation that actually pulls the data out of 
paths/filenames/file contents
* Write an adaptor for other storage systems as needed

The reason I am asking for help, is that this involves a possible 
mapping between a hierarchy database (filesystem -- similar in concept 
to LDAP? to ZODB?) and a relational one... via an adaptor, am I 
correct? These seems to approach many of the conversations on the list 
about mapping various relational systems...

First, though, we would have to be able to use our interface and its 
implementation. I don't quite know where to start with this, and would 
love some advice:
* Can storage already treat the filesystem as a database (paths, file 
names, and file contents all treated as data)?
* If so, can someone give a quick example or point me to the right 
* If not, is the LDAP implementation mature? Would that be a good place 
to look for inspiration, or am I barking up the wrong tree?
* If I need to start from the ground up, and we need to write our own 
interface/implementation, what would be the best way to start? Are 
there any examples or sandboxes where something like this/analogous to 
this has been done? I learn best by example ;-)

I am not sure what other information to provide, nor how clearly I have 
stated this information. Either way, I find the mail list indispensable 
and look forward to an education on this matter in particular and 
PEAK/Protocols in general.



More information about the PEAK mailing list