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 7003857
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:07:26+00:00 2026-05-27T21:07:26+00:00

My problem doesn’t seem like a unique one. Basically I have a fairly expensive

  • 0

My problem doesn’t seem like a unique one. Basically I have a fairly expensive process that needs to run regularly but only if a user triggers a certain state.

For example, I have a “questionnaire” system and I analyze the results and provide recommendations from the analysis. The analysis and making the recommendations is an expensive process, sometimes 10-20s and could increase as the data set increases. By the way, I’m currently looking at ways to improve the performance of this algorithm.

My thoughts on this are to implement a state for that user that says that the analysis/recommendations are expired, poll this state and if it is expired run the expensive process. I would then set this state to expired when the user completes a questionnaire.

My current system is rails 3.0, ruby 1.9.2, and MySQL running on EC2 servers. I’m currently using DelayedJob to push this process to a background job but I haven’t implemented the state/trigger.

So in summary my question is 1) Is this even the correct architecture given the scenario? and 2) Is there any gem or implementation of this that I can use that works with Rails?

  • 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-27T21:07:26+00:00Added an answer on May 27, 2026 at 9:07 pm

    You could build a quick rake task to check for questionnaires that need analysis and queue jobs for processing with DJ. Then you can run the rake task at pre-defined intervals with Clockwork.

    Because you’re on EC2, you won’t have to pay anything additional to run the lightweight Clockwork process, and your rake task can easily inherit the same environment as your application without any risk of being triggered by an HTTP request.

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

Sidebar

Related Questions

I am running into a problem that just doesn't seem right. I've got a
I have the following problem that the standard library doesn't solve well, and I'm
The problem is, that my XSLT-Transformation process ( called by .NET ), doesn't leave
I've encountered an odd problem that doesn't make any sense to me. I am
I drew a little graph in paint that explains my problem: But it doesn't
I got the problem that the if-statement doesn't work. After the first code line
Seems like cuke doesn't show the full error message (at least when problem occurs
I have a problem with IE causing two errors: 1. Object doesn't support this
I have this fragment that demonstrates the problem: <html> <head> <title>height query demo</title> <script
This problem doesn't seem browser specific and generally applies to style in the webkit/gecko/mozilla

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.