Forum: Ruby-Forum.com DB persisted attachments???

B7e9cc2a1d2dd5da2af3922fcc498b74?d=identicon&s=25 Rocket Johnson (rocket)
on 2006-07-10 03:15
Has anyone implemented attachments persisted in the database? The latest
version of RForum supports file-based attachments that will not work in
a load balance environment without some drive sharing magic.

Rocket
3a83969376c805ef5b6042191fdb0ff3?d=identicon&s=25 Andreas S. (andreas)
on 2006-07-19 11:41
Rocket Johnson wrote:
> Has anyone implemented attachments persisted in the database? The latest
> version of RForum supports file-based attachments that will not work in
> a load balance environment without some drive sharing magic.

Can't you use NFS or something like that? I don't think that keeping big
files in a database is a good idea.
B7e9cc2a1d2dd5da2af3922fcc498b74?d=identicon&s=25 Rocket Johnson (rocket)
on 2006-07-19 18:50
Andreas S. wrote:
> Rocket Johnson wrote:
>> Has anyone implemented attachments persisted in the database? The latest
>> version of RForum supports file-based attachments that will not work in
>> a load balance environment without some drive sharing magic.
>
> Can't you use NFS or something like that? I don't think that keeping big
> files in a database is a good idea.

NFS is how I solved it initially. However, that solution introduces more
complexities in a farmed environment. Nothing hard, but with more moving
parts the more things that can go wrong. Also using a file-based
persistance mechanism means you have another thing to deal with in your
backup/restore strategy.

What are your concerns with keeping big files (FYI, I don't consider
100k to be big) in a db? Sqlite I can see being a problem but the
industrial-strength databases handle binary data fine when implemented
correctly.

FYI, it was pretty simple to switch to db persisted attachments. Also,
great work on RForum. I have learned a lot about Rails and Ruby using
it.
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.