Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6800419
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:58:00+00:00 2026-05-26T18:58:00+00:00

I am building an application which will send status requests to users (via email

  • 0

I am building an application which will send status requests to users (via email & sms) on a regular basis. I want to execute the service each hour which will:

  • Query the database for all requests that need to be sent (based on some logic)
  • Send the requests through Amazon’s Simple Email Service (this is already working)
  • Write a record of the status request notification back to the data store

I am considering wrapping up this series of operations into a single controller with an end point that can be called remotely to kick off the process within the rails app.

Longer term, I will break this process out into an app that can be run independently of my rails app, but for now I’m just trying to keep it simple.

My first inclination is to build the following:

  • Controller with the following elements:
    • A method which will orchestrate the steps outlined above (and can be called externally)
    • A call to the status_request model which will bring back a collection of request needing to be sent
    • A loop to iterate through the pending requests, which will:
    • Make a call to my AWS Simple Email Service module to actually send the email, and
    • Make a call to the status_request model to log the request back to the database
  • Model:
    • A method on my status_request model which will bring back a collection of requests that need to be sent
    • A method in my status_request model which will log that a notification was sent

Since this will behave as a service that gets called periodically from an outside scheduler I don’t think I’ll need a view for this operation. (Will, of course, need views to show users and admins what requests have been sent, but that’s later…).

As someone new to Rails, I’m asking for review of this approach and any suggestions you may have.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T18:58:00+00:00Added an answer on May 26, 2026 at 6:58 pm

    Instead of a controller which Jeff pointed out exposes a security risk, you may just want to expose a rake task and use cron to invoke it on an hourly basis.

    If you are still interested in building a controller, look at devise gem and its single access token, token_authenticatable, for securing the methods you are exposing.

    You may also want to look at delayed_job or resque to offload the call to status_request and the loop to AWS simple service to a background worker process.

    You may want a seperate controller and view for the log file so you can review progress on demand.

    And if you want to get real fancy use Amazon SNS to send you alerts when the service reaches some unacceptable level of failures, backlog, etc.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am building an application which will send out custom emails to end users.
We're building a Silverlight application which will be offered as SaaS. The end product
I'm looking at building a Rails application which will have some pretty large tables
I'm building a .NET MVC application which will be deployed on a Windows 2003
We are building an enterprise application in which we will incorporate multiple platforms for
I am currently building a very dynamic table for a list application, which will
I'm building an application which will have dynamic allocated objects of type A each
I am going to be building a application which will be used by people
I'm building an application using C# which will use CATIA COM modules. When I
I am building an application using CoreData which will require me to store an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.