Command, callback and observer patterns have different semantics:
- callback – notifies a single caller that some operation finished with some result
- observer – notifies zero to n interested parties that some event (for example a finished operation) happened
- command – encapsulates a operation call in an object thus making it transferable over a wire or persist-able
In your example you could combine both callback and observer patterns to achieve greater API flexibility:
- Use the callback pattern to trigger operations and notify the caller asynchronously that the triggered operation finished.
- Use the event/observer pattern to give some other components (that did not trigger the operation) the chance to be notified when an operation finishes.