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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T19:12:35+00:00 2026-06-17T19:12:35+00:00

In my environment I need to schedule long-running task. I have application A which

  • 0

In my environment I need to schedule long-running task. I have application A which just shows to the client the list of currently running tasks and allows to schedule new ones. There is also application B which does the actual hard work.

So app A needs to schedule a task in app B. The only thing they have in common is the database. The simplest thing to do seems to be adding a table with a list of tasks and having app B query that table every once in a while and execute newly scheduled tasks.

Yet, it doesn’t seem to be the proper way of doing it. At first glance it seems that the tool for the job in an enterprise environment is a message queue. App A sends a message with task description to the queue, app B reads a message from the queue and executes the task. Is it possible in such case for app A to get the status of all the tasks scheduled (persistent queue?) without creating a table like the one mentioned above to which app B would write the status of completed tasks? Note also that there may be multiple instances of app A and each of them needs to know about all tasks of all instances.

The disadvantage of the ‘table approach’ is that I need to have DB polling.

The disadvantage of the ‘message queue approach’ is that I’m introducing a new communication channel into the infrastructure (yet another thing that can fail).

What do you think? Any other ideas?
Thank you in advance for any advice 🙂

========== UPDATE ==========

Eventually I decided on the following approach: there are two sides of this problem: one is communication between A and B. The other is getting information about the tasks.

For communication the right tool for the job is JMS. For getting data the right tool is the database.
So I’ll have app A add a new row to the ‘tasks’ table descibing a task (I can query this table later on to get list of all tasks). Then A will send a message to B via JMS just to say ‘you have work to do’. B will do the work and update task status in the table.

Thank you for all responses!

  • 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-06-17T19:12:36+00:00Added an answer on June 17, 2026 at 7:12 pm

    You need to think about your deployment environment both now and likely changes in the future.

    You’re effectively looking at two problems, both which can be solved in several ways, depending on how much infrastructure you able to obtain and are also willing to introduce, but it’s also important to “right size” your design for your problems.

    Whilst you’re correct to think about the use of both databases and messaging, you need to consider whether these items are overkill for your domain and only you and others who know your domain can really answer that.

    My advice would be to look at what is already in use in your area. If you already have database infrastructure that you can build into, then monitoring task activity and scheduling jobs in a database are not a bad idea. However, if you would have to run your own database, get new hardware, don’t have sufficient support resources then introduction of a database may not be a sensible option and you could look at a simpler, but potentially more fragile approach of having your processes write files to schedule jobs and report tasks.

    At the same time, don’t look at the introduction of a DB or JMS as inherently error prone. Correctly implemented they are stable and proven technologies that will make your system scalable and manageable.

    As @kan says, use exposing an web service interface is also a useful option.

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

Sidebar

Related Questions

I have Client-Server environment and developed a project for Client-Server. I need to share
Under Android environment, I need to list all subclasses of one of my classes.
I have a good experience with BlackBerry Java Development Environment. I need to know
I have an existing CakePHP that runs on a LAMP environment and need to
I need to build a web service application for my client, using the following
I have a Java application which should run on a server machine in the
We have JBoss [EAP] 4.3.0.GA_CP01 environment and I need to modify the TransactionTimeout property
I have a Linux environment and I have a PHP Web Application that conditionally
I have a number of PHP maintenance scripts running on a shared hosting environment
I need an interactive environment where i can call d functions on the fly

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.