This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

[Solved] Effectively executing background process  RSS feed

 
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: 66188
151
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!