[Mongrel] MogileFS handler

Ian C. Blenke ian at blenke.com
Thu Nov 2 12:37:49 EST 2006

Philippe Jayet wrote:

>In the case of MogileFS, it creates a directory structure of its own to
>scale to a large number of files. So serving the files from these
>directories is not the solution I think of. And I plan to use MogileFS
>in HTTP mode (not NFS), so the files may even be unaccessible from the
>filesystem. That is why I think of developing a dynamic component that
>will ask the MogileFS tracker for the URL of the file (which may be
>local or not), get this file and return it to the client.

I see two solutions for you here:
1. Write a Rails application that uses the mogilefs-client stuff to 
save/retrieve files as users create/request them (as MogileFS was 
intended to be used).
2. Use the FUSE mogilefs client to mount it as a filesystem for your 
entire rails project, and have mongrel serve up files as if they were 
static directly from public/.

Knowing the state of the FUSE client the last time I looked at it, I 
would probably go with the former solution rather than the latter.

There are other 
relational-master-metadata-distributed-replicated-datastore GRID style 
filesystems out there somewhat similar to MogileFS (like GFarm, 
CleverSafe, or even Hadoop), but MogileFS is probably one of your better 
bets when it comes to simplicity and a proven track record for Rails 
development/integration at the moment (with mogilefs-client).

I suppose, in theory, you could modify mongrel to use mogilefs as a 
filesystem abstraction layer, but I really don't see the need for that 
code bloat.

Smaller. Simpler. Faster.

- Ian C. Blenke <ian at blenke.com> http://ian.blenke.com/

More information about the Mongrel-users mailing list