Skip to content
This repository has been archived by the owner on Aug 8, 2019. It is now read-only.

Allow messages to be created with attachments in a single HTTP request #14

Open
sodabrew opened this issue Aug 9, 2013 · 1 comment
Assignees

Comments

@sodabrew
Copy link
Collaborator

sodabrew commented Aug 9, 2013

No description provided.

@ghost ghost assigned tjk Aug 9, 2013
@drudru
Copy link
Contributor

drudru commented Sep 5, 2013

No objection as long as it works :-) and is atomic. The old behaviour must work as well.

I did it the existing way for a few reasons, but I'm not against this.

  1. Why did it end up the way it did? This is mostly due to the wonderful restriction of the Ruby HTTP lib. It didn't have the ability to handle multipart posts !! (I don't know if the current one handles it either). Do a search for Ruby HTTP multipart and you will see the many libraries people ended up creating to solve this. I knew about the problem prior to building RQ. When I got to that part of the problem, I decided to use 'curl'. The solution worked any I heard zero complaints. Sometimes constraints give you a good solution.

Also, if you have multiple attachments, you have the opportunity to create the message without stressing all the http systems in the path (timeouts, bad tcp (Europe), etc). It might be a good pattern to break up attachments into chunks prior to sending (future feature) If the queue cannot even handle the message without the attachment, you reduce the stress on the receiving system by learning that quickly before sending massive attachments. Kind of a small DOS prevention.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants