[PHP] Re: Re: Upload File (binary files?)
Am 2006-05-15 17:25:05, schrieb Rory Browne: Bullshit. there are multiple tools for copying files from host to host, including ftp, scp, sftp, rsync, nfs, etc. Planning ahead, is a better way to avoid breaking links than using MySQL to store your images. Right, currently I am using a php5 script which generate temporary tables and references where to find the binaries and the I dump the temporary table. After this I put the dump plus the images into a tar-ball and transfer it. The receiver has an equivalent script which can import the table dump and install the binaries correctly. I notice you've misspelt the most important word there. He says the lookup _MAY_ become slow. This behavour is dependent on the filesystem you are using. You will encounter this problem with ext3 if you have too many files in the same dir. You're less likely to encounter it with reiser. This comes down to the competance of the administrator. An incompetantly setup mysql table ( without indexes ) would have the same problem. Right, I have had to create a filesystem with directory structure where I use the md5sum of the binary and split the 32 Bytes it up into several subdirectories (e.g. 4 Byte wise) Now this has speed up my binary-server over the factor 3-5 Oh yes, one thing: For some years as I begun to use PostgreSQL (I think it was 6.5) I have stored *.doc, *.xls and such stuff into the PostgreSQL which gaved me a performance as the hell... Since I do not realy like the hell and found many usefull *NIX-Tools I have extracted the Data into text/plain of for the *.xls stuff into XLM-Tables which can very good stored into the Database and searching is working perfectly... The original are always stored on my binary-server. Having infos about JPEG's? I extract teh EXIF data and store it in the Database... Greetings Michelle Konzack -- Linux-User #280138 with the Linux Counter, http://counter.li.org/ # Debian GNU/Linux Consultant # Michelle Konzack Apt. 917 ICQ #328449886 50, rue de Soultz MSM LinuxMichi 0033/6/6192519367100 Strasbourg/France IRC #Debian (irc.icq.com) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Re: Upload File (binary files?)
Am 2006-05-11 13:40:34, schrieb tedd: Plus, moving images from one system to another was much easier because you just moved the dB and you don't have to worry about the file system and breaking links. This can be done from a script to... In addition, if you are using multiple hosts, who require the same images, then using mySQL is far superior than trying to keep all the images in different file systems synchronized. This can be donw from filesystem too http://pics.your-domain.tld/path/to/pic.png Furthermore, according to Paul DuBois (author of MySQL Cookbook, great book btw) who says If you store images on the file system, directory look-up my become slow in his comparing file system to mySQL for image storage. ??? It depends, how many pics you have. But if you install a dedicated Server for the pics with, e.g. 1 GByte of memory and apache 1.3. It is fast as the heaven... My Linux-Box hold all pics in memory. Granted, if you use mySQL for storing images, then you bloat the tables and approach your system limits faster than using a file system. But for a limited amount of images, there isn't any real problems. Hmmm, My PostgreSQL is around 370 Gbyte now and if I import all Pics, it would be around 1,8 TByte... Good night... And for goodness sake NO, Google is NOT always right -- it's only a collection of everyone's view. When did Google replace valid research? I can see tomorrow's mother's saying to their children If Google jumped off a bridge, would you do it? Yes, because I like Bungee-Jumping... (Paraglideing too) ;-) Greetings Michelle Konzack -- Linux-User #280138 with the Linux Counter, http://counter.li.org/ # Debian GNU/Linux Consultant # Michelle Konzack Apt. 917 ICQ #328449886 50, rue de Soultz MSM LinuxMichi 0033/6/6192519367100 Strasbourg/France IRC #Debian (irc.icq.com) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Re: Upload File (binary files?)
Am 2006-05-12 09:28:36, schrieb tedd: But, at some point (and I forgot to mention this in my previous post) all programmers start thinking in collections of data and a dB becomes a well suited solution (record holder and organizer) for that. As such, all data connected to a record, including images, are better suited if organized and saved in one place. And if your database like mine crashs then you have lost all... Restoring a Database of 1,8 TByte takes some hours!!! No one restore a database of 1,8 TByte in less then one hour. I have my database and currently 1 FileServer with the binary files. (I will switch to 3 FileServers of 2U insteed of one 6U) I did the same thing including merging a copyright on the image. I believe that saving all related data in a dB is really the right way to go. From there, you can do anything you want with the data. Served from a filesystem too The overhead form getting a pic from the database is bigger then from a filesystem. I had allready tried it. I can resize on the fly too. Now, where is the problem, if a php script get the pic from a filserver using http or ftp? My system is pgsql.example.com / (maybve a cluster) client - www.example.com \ bin1.example.com bin2.example.com Greetings Michelle Konzack -- Linux-User #280138 with the Linux Counter, http://counter.li.org/ # Debian GNU/Linux Consultant # Michelle Konzack Apt. 917 ICQ #328449886 50, rue de Soultz MSM LinuxMichi 0033/6/6192519367100 Strasbourg/France IRC #Debian (irc.icq.com) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Re: Upload File (binary files?)
At 12:18 AM +0200 5/14/06, Michelle Konzack wrote: Am 2006-05-12 09:28:36, schrieb tedd: But, at some point (and I forgot to mention this in my previous post) all programmers start thinking in collections of data and a dB becomes a well suited solution (record holder and organizer) for that. As such, all data connected to a record, including images, are better suited if organized and saved in one place. And if your database like mine crashs then you have lost all... Restoring a Database of 1,8 TByte takes some hours!!! How does a dB crash? Is it a hardware or software crash? If it's software, then have you published the problem? Does mySQL have a bug? If it's hardware, then it doesn't make any difference if the data is stored in a file-system or in a dB -- it's just so much binary on a hard drive that's no longer accessible. Redundancy helps. While I've never done it, but from what I've read there are metrologies using multiple servers (like RAID) to keep things current on-the-fly so that you virtually eliminate lose everything crashes. While one may crash, the others live on in real-time. If I was working with investments as large as that, then I would be looking for ways to protect it other than inspecting the overhead. tedd -- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Re: Upload File (binary files?)
At 12:18 AM +0200 5/14/06, Michelle Konzack wrote: Am 2006-05-12 09:28:36, schrieb tedd: But, at some point (and I forgot to mention this in my previous post) all programmers start thinking in collections of data and a dB becomes a well suited solution (record holder and organizer) for that. As such, all data connected to a record, including images, are better suited if organized and saved in one place. -snip- The overhead form getting a pic from the database is bigger then from a filesystem. I had allready tried it. I can resize on the fly too. Now, where is the problem, if a php script get the pic from a filserver using http or ftp? Well... if you define the problem in terms of If it can be done then there's no real problem. But the purpose of programming is to gather, organize, process, and display data. We do this under the paradigm of keep it simple -- the simpler is usually the better. I only said that from a programming perspective -- of collecting and placing data into organizable groups -- keeping things in one system is preferable (simpler) than dividing things up into different organizational elements (i.e., file system v dB). Plus, a dB has search capabilities that a file system doesn't -- that's probably the reason why dB's came into existence, right? As for overhead and time to process stuff -- that's just a current observation and the problem (if there is one) will most certainly pass. I think the future on this is pretty clear as to what regime will be preferable for data organization. Not that I'm implying such to you, I remember DOS types saying What moron will ever use a mouse? and now they're saying Only Idiots and Morons place images in dB's. To each their own. tedd -- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Re: Upload File (binary files?)
On 5/15/06, tedd [EMAIL PROTECTED] wrote: At 12:18 AM +0200 5/14/06, Michelle Konzack wrote: Am 2006-05-12 09:28:36, schrieb tedd: But, at some point (and I forgot to mention this in my previous post) all programmers start thinking in collections of data and a dB becomes a well suited solution (record holder and organizer) for that. As such, all data connected to a record, including images, are better suited if organized and saved in one place. -snip- The overhead form getting a pic from the database is bigger then from a filesystem. I had allready tried it. I can resize on the fly too. Now, where is the problem, if a php script get the pic from a filserver using http or ftp? Well... if you define the problem in terms of If it can be done then there's no real problem. But the purpose of programming is to gather, organize, process, and display data. We do this under the paradigm of keep it simple -- the simpler is usually the better. I only said that from a programming perspective -- of collecting and placing data into organizable groups -- keeping things in one system is preferable (simpler) than dividing things up into different organizational elements (i.e., file system v dB). Plus, a dB has search capabilities that a file system doesn't -- that's probably the reason why dB's came into existence, right? Last time I checked we had tools to search the filesystem. locate, find and awk spring to mind. As for overhead and time to process stuff -- that's just a current observation and the problem (if there is one) will most certainly pass. I think the future on this is pretty clear as to what regime will be preferable for data organization. Not that I'm implying such to you, I remember DOS types saying What moron will ever use a mouse? and now they're saying Only Idiots and Morons place images in dB's. To each their own. lets just hope I never have to maintain your code. tedd -- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Re: Upload File (binary files?)
Plus, a dB has search capabilities that a file system doesn't -- that's probably the reason why dB's came into existence, right? Last time I checked we had tools to search the filesystem. locate, find and awk spring to mind. So, you are claiming that those file-system tools match all the functionally that MySQL offers? Interesting -- when was the last time you looked into that claim? As for overhead and time to process stuff -- that's just a current observation and the problem (if there is one) will most certainly pass. I think the future on this is pretty clear as to what regime will be preferable for data organization. Not that I'm implying such to you, I remember DOS types saying What moron will ever use a mouse? and now they're saying Only Idiots and Morons place images in dB's. To each their own. lets just hope I never have to maintain your code. We're not talking about my code, nor did I make this thread personal. Attacks on me do nothing to support your argument. tedd -- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Re: Upload File (binary files?)
On Mon, May 15, 2006 10:18 am, tedd wrote: crash It DOES make a difference as to how fast you can restore the DB and the images, and more importantly, the PERCEIVED time for your site to be back up If you can get your DB up fast, but the images aren't available, MOST sites, other than, like, flickr or whatever it is, are considered by most visitors to be up Plus, a dB has search capabilities that a file system doesn't -- that's probably the reason why dB's came into existence, right? After you start working for the CIA and actually write a function that *DOES* something with the blob data to search for common facial features or something, you can use this argument... Until then, it's really rather empty. :-) :-):-) As for overhead and time to process stuff -- that's just a current observation and the problem (if there is one) will most certainly pass. The DB adds layers of overhead, almost always. The only time it doesn't, is when you've got teeny tiny images, and not very many of them, such as, say, the nav buttons on your site, and that's from caching in the DB layer more than anything else. I think the future on this is pretty clear as to what regime will be preferable for data organization. Not that I'm implying such to you, I remember DOS types saying What moron will ever use a mouse? and now they're saying Only Idiots and Morons place images in dB's. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php