Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

[Solved] Effectively executing background process

 
Vikas Kapoor
Ranch Hand
Posts: 1374
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am developing a web application and I seek some suggestion for following scenario.

Our site is a place where buyer and seller talk to each other. buyer comes and put a request for some service. Sellers gets registered to provide some services. When buyer comes and put a request for some service(s), we will store all the data in database and [background process]at the same time seller should be notified for that service via email and couple other things should be done too for that service. [/background process] Actually the problem is not that how can I send email or store data in database? but the thing is , when and where I should start processing the stuff?

If I do it when there is a request for some service from buyer then it would increase the response time for that buyer. I think I should start a thread and do it periodically.

So How this can be handled effectively?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65542
110
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Whenever I've been faced with something like this, I have a separate daemon process running that monitors the database and performs the necessary tasks.
 
Vikas Kapoor
Ranch Hand
Posts: 1374
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.I have been waiting for your stamping Bear!
Ok I will be using Quartz API instead of Java.util.Timetask class.
 
I like tacos! And this tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!