The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
However there are quite a few members who are developing read caches to improve performance.
If you do decide to write at the time the user does the booking, you are only writing a very small amount of data, so this is not likely to cause you a performance problem.
How is a read cache different from deferred write? What are its implications?
You're probably right. But still, at that very moment all other threads that would like to have access to the data - read or write - have to wait until the semaphore has been released.
If I got that right (looking at it from the users perspective), the GUI freezes until any alteration to the data the user submitted has been written into the file.
Of course any alteration could still be carried out through an individual thread, but then the same problems (how to report back errors, successful booking has already been indicated) arise.
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
I think any client operation (not just update operations) should be run in an individual thread
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Consider Paul's rocket mass heater. |