Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Implement Object Persistence (II)

by Joost (Canon)
on Apr 29, 2005 at 10:35 UTC ( [id://452619]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Implement Object Persistence (II)

(a bad boy can substitute one object file with somethins like system ("rm -rf /") and destroy my server).

If anyone you don't trust has write access to the dumps you're in trouble whatever the data format and I guess that anyone with write access to the dumps can run any code he/she wants anyway.

The fact that you're using DBM::Deep only removes the risk of running code from the dump - it doesn't stop anyone from breaking your application.

Also, IIRC DBM::Deep doesn't really support objects, so if your probeset object contains references to other objects, they won't be blessed back. You might want to consider FreezeThaw or Storable.

update: I should probably point out that neither FreezeThaw nor Storable do automatic updates to the storage if the data in the object changes, so that could be a problem. As far as I know there is no direct DBM::Deep equivalent for objects.

Replies are listed 'Best First'.
Re^2: Implement Object Persistence (II)
by tucano (Scribe) on Apr 30, 2005 at 15:14 UTC
    My ObjectOriented software actualy doesn't implement references to objects
    I will consider to add this feature (using Storable).
    But...
    Actualy I try to implments an easy way to send my DATA to other Perl scripts and Applications (like R statistical package)
    For this reason I try to make an easy_to_read DATA STRUCTURE (in this case4 is an HASH with reference to strings, array and other hash)
    Data::Dumper is OK (from HASH to FILE).
    DBM::Deep could be ok cause a file.db could be a reasonable solution
    Make other tables into my MySQL server is nota good idea cause is really overheat (I use SQL to create the object)
    Regards

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://452619]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.