badgerduke (12) [Avatar] Offline
#1
Hello:

I am writing a very simple batch job which requires no monitoring. I am trying to figure out which job repository to use. This will run in a production environment. After reading the book, I am not clear about how to decide. You say on page 72 that in-memory repositories shouldn't be used in production. Even when you are not monitoring anything?
Which job repository do I need to use?


Thanks, and your book is terrific BTW

Eric
arnaud.cogoluegnes (73) [Avatar] Offline
#2
Re: production Job repository when no monoitoring needed
Hi, Eric.

Thanks for your interest in the book and the positive feedback.

The database job repository is the recommended one for production. Nevertheless, some people are using the in-memory implementation in production and are happy with it.

Page 40-41 of the final book provide some guidelines about which job repository implementation to choose. Again, you can use the in-memory implementation in production, but at your own risk. Keep in mind that:
- it hasn't been designed for concurrent environments. So no big deal if you're running your jobs from the command line (problem if your jobs live and run in a Web container at the same time)
- it stores everything in memory (exact same limitations: no big deal from the command line, potential memory exhaustion in a long-running container).

Hope that helps!

Arnaud