• Post Reply Bookmark Topic Watch Topic
  • New Topic

Which is the best processing setup between these choices?  RSS feed

 
Winston Liek
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have 1 web app that interacts with client performing crud operations. And another 'batch' app that processes per client's data. Both will use the same database. The data the batch may process may possibly be 1-20 thousand per client and unlimited number of clients thus it may run continuously 24 hours non stop.


Which is better in terms of cost, efficiency and performance?
1. 1 separate web app for web app and 1 separate batch app deployed in different server
2. 1 separate web app for web app and 1 separate batch app deployed in same server
3. 1 app that will serve as web app and at the same time batch process (separate thread for batch maybe?)

can you please advice... Thanks!
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would certainly not choose option 3 because in that case the batch process could interfere with the webapp - the batch process would use memory and processing power from the JVM in which the webapp is running, so the webapp might run slower when the batch process is running. Also, it would be less flexible, because you won't have the choice to run the batch process somewhere else than the webapp.

If the batch process is separate, you can easily switch between options 1 and 2. Which one of those you would choose depends on different things. How heavy is the batch process? Does it take a significant amount of processing power? If it does and it interferes with the webapp, you could move it to a different server. You could also start with option 2, then you don't have to invest in 2 servers - and if you notice that the batch process takes too much processing power you could change it to option 1.
 
Junilu Lacar
Sheriff
Posts: 11494
180
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And if the batch process still requires more processing power, you could break the job up between multiple worker nodes. Search for distributed batch processing
 
Junilu Lacar
Sheriff
Posts: 11494
180
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Web apps can also be scaled to handle higher volumes of traffic through load balancing and content delivery/distribution networks (CDN)
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!