Hi Jacob, Thanks for the quick reply.
Jacob Helwig wrote: > A common approach used for something like this is to have a "current" > symlink, and update it, whenever you have a newer file. > > Eg: > $ touch some-file-v1 > $ ln -s some-file-v1 current-version > $ touch some-file-v2 > $ ln -sf some-file-v2 current-version > > If you give people the URL to "current-version", and only update the > symlink after you've created the new version, then they won't be > downloading a file before it's completely written out to disk. > This seems simple enough! Would this approach also work if someone was already accessing the older file when we try to do the second set of steps: $ touch some-file-v2 $ ln -sf some-file-v2 current-version Can I update a symlink while someone is already reading a file? > We use the "store the files in the DB" approach for a few of our > projects at $work, and that works pretty well for us. It's not really > a waste, especially if you plan on having multiple "physical" > webservers. Actually, I do use this for one of our solutions. The only concern is that you need many more Mongrels if your files are very large - since sending the file from database locks up the Mongrel for a longer period of time... with small files, it works quite well. Cheers, Mohit. 10/18/2009 | 4:42 PM. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

