[ Pobierz całość w formacie PDF ]

about the criteria?
 % How are the search criteria items represented? A String? A CriteriaObject?
 % How does a client know exactly what they can base a search on?
 % Does your search support boolean matches? Does it need to?
 % The database won t necessarily be indexed, so have you thought about other
ways to make the search as efficient as possible?
Don t sacrifice clarity and simplicity for a small performance gain. If the
performance gain is big, then redesign so that you can have a reasonably
efficient algorithm that is also clear and maintainable.
 % Have you documented your search algorithm?
If you find yourself writing a lot of documentation to explain your search
algorithm, there s probably something wrong with the design.
 % Is the documentation of your search algorithm easy to read and understand?
 % When the client submits a search query, is a specific piece of the search
criteria explicitly matched to a particular field? Or do you search all fields
for each search?
 % If you re using 1.4 or Java 5, have you investigated whether regular expressions
would help?
 % What happens if nothing matches the client s search criteria?
 % Will it need to be an exact match?
 % Could there be a scenario in which too many records match the search
criteria?
 % Have you considered bandwidth issues when designing and implementing
the format of the search criteria requests and server results? Are you shipping
things over the wire that are bigger than they need to be?
 % Is your search capability flexible for the end-user?
Color profile: Generic CMYK printer profile
CertPrs8(SUN) / Sun Certified Programmer & Developer for Java 2 Study Guide / Sierra / 222684-6 / Chapter 16
Composite Default screen
Understand Database Issues
5
 % Is your search capability flexible for future changes to the program?
 % How much code, if any, would have to change if the database schema
changes? Have you isolated the places where changes can occur to avoid
maintenance problems?
 % Are you absolutely certain that you ve met the searching requirements
defined in your assignment specification? Go back and reread them.
Sloooooooowly.
Locking
 % Are you absolutely certain that your locking scheme works in all possible
scenarios?
 % Does your exam assignment specify a particular kind of locking with respect
to reads and writes?
 % What happens when a client attempts to get a record and the record is
already locked? What does the client experience?
This is crucial. Think long and hard about what you want to happen.
 % How will you keep track of which records are locked?
 % How will you keep track of who locked each record? Do you need to
know that?
 % How will you uniquely identify clients in such a way that you can know
which client locked which record? Is it the server s responsibility or the
client s?
 % Have you considered whether the ID of a thread is appropriate to uniquely
identify a client?
 % Have you considered whether aMath.random()number is appropriate
to uniquely identify a client?
 % If a client makes a request on a locked record, how will you verify that it s
the same client who holds the lock?
 % What happens if a client attempts to use a locked record when that client is
not the client holding the lock?
Color profile: Generic CMYK printer profile
CertPrs8(SUN) / Sun Certified Programmer & Developer for Java 2 Study Guide / Sierra / 222684-6 / Chapter 16
Composite Default screen
Chapter 16: Database Issues
6
 % Is it possible to have a record locked for too long a time? How much time is
too long?
 % Is there anything you can or should do about the duration of a lock?
 % What happens if a client goes down without releasing a lock?
 % Does the server need a way to know a client went down? (As opposed to
simply taking their sweet time or if they re on a painfully slow connection.)
 % Is there any possibility of a deadlock? Where two or more clients are waiting
for each other s locks?
Check for this more than you check for anything else.
 % Are you correctly usingwait(),notify(), andnotifyAll()?
 % Are you clear about the implications ofnotify()versusnotifyAll()?
If not, go back and read Chapter 9.
 % Are you relying on a nondeterministic thread mechanism such as priorities
and/or yielding to guarantee your threads will behave properly?
 % Are you synchronizing on the right objects?
 % Are you sure?
 % Are you really really really sure?
 % Is everything that needs to be thread-safe, thread-safe?
 % Have you made sure that things that don t need to be thread-safe, aren t?
(You already know that synchronization carries a performance hit.)
 % Have you selected appropriate data structures for implementing your
lock scheme?
 % Are you absolutely certain that you ve met the locking requirements
defined in your assignment specification?
 % Would you like to revise your answers to the last two questions from
Chapter 15? [ Pobierz całość w formacie PDF ]

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • cukierek.xlx.pl