Dragonfly and complicated generator jobs

39 views
Skip to first unread message

Tom Coleman

unread,
Feb 14, 2012, 3:53:38 AM2/14/12
to Dragonfly
Hey,

I have a complex generator that requires quite a bit of data (it
generates a collage out of a bunch of image uids + placement data).

The urls (/media/xxx) end up being quite long (maybe 1.5k chars). This
is triggering a Errno::ENAMETOOLONG in ActionDispatch::Static when it
tries to find the file /path-to-rails/public/media/xxx. I'm not sure
why this would be happening when my rake middleware reports:

...
use Dragonfly::Middleware
use ActionDispatch::Static
...

So,

1. Any ideas what's going on there?

2. Is it a bad idea to use a generator like this? I figure the URL
will serve as a sort of digest if the position / images change, but I
am a little fearful that such long URLs might trip up a few things
(specifically caches). Can anyone think of a better way?

Cheers,
Tom

Shawn Drost

unread,
Feb 14, 2012, 4:18:52 AM2/14/12
to dragonf...@googlegroups.com
Hey Tom,

This happens because the jobs are serialized by Marshal.dump.  There are probably more compact storage mechanisms, and I might be working on a plugin or pull request in the next month.  Ping me if you'd like to talk more.

-Shawn

Tom Coleman

unread,
Feb 14, 2012, 5:44:44 PM2/14/12
to dragonf...@googlegroups.com
Hi Shawn,

No doubt. Also I'm sure I could be more efficient in the data that I pass to the method call, so it compresses smaller.

On the other hand, certainly the URLs are going to have to be very long -whatever I do- if I go with this approach. So at this point I am more trying to work out if in general it is a bad idea to use such long URLs. 

If I do go with this approach, I will be interested, certainly.

Tom
Reply all
Reply to author
Forward
0 new messages