You are the operations architect for a large online retailer. During peak times, your set of
monitored applications exhibits non-reproducible errors. The data center is growing at 50%
per annum, while your team headcount remains constant. Which method would you use to
implement an affective monitoring strategy?
A.
Use the Visitor pattern to collect per-JVM statistics and store them centrally.
B.
Use the Strategy pattern to encapsulate collection logic for each JVM.
C.
Use the Thread Tracker to monitor the JVMs directly.
D.
Use the Observer pattern to monitor each JVM directly.
Explanation:
D is correct answer.
A is wrong answer as per intent of Visitor Pattern
B is wrong answer as per intent of Strategy Pattern
C is wrong answer as Thread Tracker is there as trap (Threads are very close to JVMs) so one easily chooses the wrong answer. Thread Tracker is about naming threads so one can track them while debugging or in log file.
The only option left is Observer.
https://www.ibm.com/developerworks/library/j-rtm1/