Writing Applications for Multimachine Service

When you write a Web application for multiple-machine deployment, the main thing that you need to keep in mind is that you cache database state at your own risk. Although it's okay to cache certain values, such as product catalogs, which are read-only and change infrequently, it's not okay to cache customer information that can change from minute to minute.

The high-end Java platforms provide support to keep multiple servers in sync. Unfortunately, Tomcat does not. This just means that you need to keep the issue in the back of your mind at all times during development.

Frankly, you should already be thinking about it because many of the problems of concurrency that can plague a multiple machine architecture ...

Get MySQL™ and JSP™ Web Applications: Data-Driven Programming Using Tomcat and MySQL now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.