Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Re: Perl Project Ideas

by jeorgen (Pilgrim)
on Oct 31, 2002 at 12:37 UTC ( [id://209398]=note: print w/replies, xml ) Need Help??


in reply to Re: Perl Project Ideas
in thread Perl Project Ideas

rcaputo writes:

A Zope-like content management server, or at least a wiki.

I hear you. A starting point would be to make a perl equivalent or mini-equivalent of ZODB, the object persistence engine, which is really just one big file and an index file. Make a server that takes an object, serializes it with Data::Dumper or something else and appends it to the big file, and makes a note in an index file of the byte offset for that object id.

Then add some higher level functions on that as rollback (find older version of object id in file and copy that to end) and compact (write new file with latest unique object ids, chosing the one last in file, overwrite old file with new file).

Sounds very doable...?

/jeorgen

Replies are listed 'Best First'.
Re: Re: Re: Perl Project Ideas
by rcaputo (Chaplain) on Oct 31, 2002 at 15:54 UTC

    jeorgen writes:

    A starting point would be to make a perl equivalent or mini-equivalent of ZODB, the object persistence engine, which is really just one big file and an index file.

    The CPAN has several distributions that handle persistent objects. I'm not familiar with ZODB, so I can't say which would be most appropriate.

    On the home-grown side of things, I have a DB_File wrapper that uses DB_BTREE to provide multiple keys for a DB_RECNO list of records. It's old, pre-Storable code, though, so I haven't been eager to show it off. It's also incomplete: It doesn't support dropping keys or tables, it doesn't handle adding keys to a table with existing records, and it doesn't have undelete or pack.

    Speaking of pack, I also have part of a paged b-tree database driver that makes extensive use of pack() and unpack(). It was inspired by the note at the end of the pack() description in the first edition Programming Perl:

    Note that, although all of our examples use literal strings as templates, there is no reason you couldn't pull in your templates from a disk file. You could, in fact, build an entire relational database system around this function.

    They're right, but it's not as easy as that casual remark would make it seem. As key pages fill up, they must be split into smaller ones. That was just too much for me, and that's where the project sits today.

    These remind me of yet another project idea: A web catalog of all the little bits of code I've accumulated over time. I have a lot of half-baked ideas (see above), test cases, benchmark programs, and code doodles. Currently they're rotting in a directory without an index or any way for the rest of the world to see.

    If there's any one idea that could save the world, that last one would be it. I think there are a lot of good ideas rotting on coders' drives. A system to publish them would connect that stuff with the people who have the inspiration and time to develop it.

    -- Rocco Caputo - troc@pobox.com - poe.perl.org

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://209398]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (2)
As of 2024-04-20 06:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found