October 2006
Intermediate to advanced
888 pages
16h 55m
English
In this example, we assume that we have a server application that is making stock prices available to the network. Any client wanting to check the value of his thousand shares of Gizmonic Institute can contact this server.
We’ve added a twist to this, however. We don’t just want to watch every little fluctuation in the stock price. We’ve implemented an Observer module that will let us subscribe to the stock feed; the client then watches the feed and warns us only when the price goes above or below a certain value.
First let’s look at the DrbObservable module. This is a straightforward implementation of the Observer pattern from the excellent book Design Patterns, published by Addison-Wesley and authored ...
Read now
Unlock full access