Fork me on GitHub

Store Downloads into Database?  Bottom

  • Hi,

    im usin Postnuke since several years and came from PHP-Nuke, but i still miss a real nice feature.

    What i miss is the possibility to store files - means - downloads into the database (BLOB) instead storing them into the filesystem. this has several plus points ahead of the classic filesystem-method.
    (1) no need for special file/directory permissions anymore
    (2) PN gets more scalable (e.g. for balancing/clustering)
    (3) its more secure

    however, i dont want to start a discussion what is better. everybody has favorite ways and everybody need sumthin different. but i would appreciate if there would be a module which has up/download capabilities AND has an option to store files into the database (e.g. as photoshare for pictures)...

    ideas?!

    Simon
  • IMHO storing BLOBs in the (mysql!) database is no good idea (especially when thinking about backups, session issues and output buffering) - but you can find a nice howto at http://php.dreamwerx.net/forums/viewtopic.php?t=6

    pluses:
    * way easier to insert/retrieve a file from a BLOB field than from the file system. no need of file permissions or anything.

    negatives:
    * size limitation of MySQL.
    * large transfers from the DB server might not be as efficient as opening a local file.

    --
    regards from germany
    ..::[Zikula Application Framework]::.. ..::[SEO-Blog]::.. ..::[CMS Sicherheit]::..
  • larsneo

    negatives:
    * size limitation of MySQL.
    * large transfers from the DB server might not be as efficient as opening a local file.

    what size limitation. mysql has no limitation of size. the only thing what can happen is that sumone uses mysql on a ext2 filesystem which has a 2gb-file limit. but ext3 jfs ... dont have those. ;)
    sessions etcpp are not a problem since replication runs like a charm. i do use replication for backup issues, that way i never lose a single bit when the mainserver crashes/freezes/whatever. :D

    Im goin to follow your suggested link

    thnx

    Simon
  • Well just read the link you ve posted, but this does not help me any further...
    i have no time to continue development another project while i have my own in queue. So i asked gently to enhance that function to the core - download (why not? i dont know a good reason why not) or point to a module which can handle downloads into the database instead on the filesystem.

    to be honest: in my dreams everything (topic gfx etcpp) which is dynamicly would be in the databse and not in the filesystem. only the PHP files and the theme should be on filesystem - the rest should be placed into the DB.

    :)

    but now, i would be glad just about a download module which stores/fetches files to/from the database. :D

    Simon
  • When your DB gets enormous from the files stored in it, it will slow your site down.

    I've written database file storage for PostNuke, but it was only set up to handle images. (ref: OpenRealty)

    The problem that caused me to drop pursuit of DB file storage is that the process of uploading the file initially utilizes copying the file to a temporary directory before storing it in the DB (it has to go somewhere first, so that it can be read in). This works fine on a Unix platform, but half or more of the Windows sites that tried to use it ran into issues with the upload process and how IIS/PWS handles it.
  • there is no architecture reason for slow speed. if you have high load to the database you may cluster it (mysql i capable clustering. the upcoming clustering versions OR via the recommended circle-replication which works great around here (3 machines who replicate eachother).
    The reason id like to have even the downloads into the databse is for 3 reasons:
    data consistency (replication means realtime backup)
    scalable (no limits in space for downloads)
    load balancing/clustering (if all content is in the database INCL downloads, postnuke is finally ultimative! :D

    regards Simon
    PS: im usin photoshare for galleries (stores pictures into database too; together with Pagesetter - awesum!)
    PSS: who needs servers running windows?! *argh* :D
  • Quote

    PSS: who needs servers running windows?! *argh* Very Happy


    Hehe
  • nothing new... but why?! am i the only one who sees the advantages and scale-possibilities with downlaods into database?! imagine 1 or 2 big webservers with high-scalable databaseservers in the back... no limitation of download-space, no limitation of webspace except the code itself.

    increasin webspace is possible without taking the website down, even backups and movements to other websites are possible in a moment. try this with a local-bound filesystem or even nfs (forget it!).

    so, if there is already sum downloads into database version... release them!

    regards

    Simon
    PS: also id like to have a download section whicih supports webdav. :) but that is on a second paper
  • Maybe FileShare would be some assistance...

    :)
  • alarconcepts

    Maybe FileShare would be some assistance...

    :)


    looks nice but as it seems it does not store files into database. ;)
    so its not what i requested or at least recommended...

    why the hell no downloadmodule stores it files into database.. the advantages are huge as mentioned before... :)

    i still hope that one day there is a module like Pagesetter and photoshare for downloads too

    Simon

This list is based on users active over the last 60 minutes.