I have the B&S assignment. The interface I am given contains a search method that returns an array of record numbers that presumably match the search criteria.
The records as found by a search action are of course not locked, so when I read the records, they might have been changed by another client in the meantime and possibly do not match the search criteria anymore.
I have thought of three possible solutions:
1. just ignore this; if all that the clients can do is book a record, then at most the customer field is changed and since this is not a searchable field, it does not affect search results.
2. read in the records and do a second check to test if the read records still match the search criteria (remove records that don't from the search results).
3. read all records from the server (use search method with null search criteria) and do matching with the criteria client-side. This solution of course loads the network quite heavily, so I assume I won't please my assessor with this one. For thin client architectures this might be an option though.
Currently I am leaning towards solution 2, because that one will continue to work correctly if changes other than booking are made concurrently to the database. Do you think this solution is overkill or maybe someone found a better solution?
Hmmm, I am actually leaning toward solution number one. I think that as long as you document this as a known limitation that does not affect the overall functionality of the application, you should be fine.
“Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.” - Rich Cook
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com