views:

95

answers:

2

Hello

This is my very first question in stack overflow and I am quite excited. Liked a lot the interface of this site and the buoyant community!

I am building a rails app that receives text as an email and creates a post.

I ask or your expert opinion on which is the best option to receive the mail message and process it?

To send the mail to the application:

  • A1: X accesses a POP/IMAP account periodically (30s cronjob?) and processes the message
  • A2: the message is piped from the mailserver to the application X

To process the application

  • B1: rails with MMS2R
  • B2: PHP that processes the message and sends a POST in rails
  • B3: PERL that processes the message and sends a POST to rails

Which combination A+B would you recommend for a big volume of mails?

Any other A or B option?

Thank you very much and good luck with all your scripting!

+1  A: 

if you are concerned about volume, I would just use perl + db (bypass rail app).

Mohammad
+1  A: 

Any of them that doesn't then perform an HTTP POST to the web app, it's an unnecessary middle man and will only slow you down under volume. Having said that, the upside is one location for any business logic if necessary. So, weigh those two points before making a decision.

Now, for this personally, I'd probably go Perl over the others, though PHP would be a closer option. That, of course, is because I don't know Ruby. For you, though, I'd probably suggest Ruby so that your language is consistent across the application. That makes maintenance a lot easier in the long run and it probably allows for sharing of business logic with the web app without needing to specific use the web app.

John Cavan
+1 on this answer. I would create a rake task that fetches and saves directly to the DB - run over cron.
hgimenez