Implementing an IceStorm Publisher
2 min read
2 min read
2 min read
2 min read
2 min read
2 min read
2 min read
2 min read
2 min read
An IceStorm publisher is an Ice client application that sends requests to a Topic hosted by the IceStorm service.
The IceStorm/weather demo program provides a complete publisher application. It’s available in all programming languages.
The implementation of the weather sensor can be summarized as follows:
- Create a proxy for the IceStorm TopicManager . This is the primary IceStorm object, used by both publishers and subscribers.
- Obtain a proxy for the
weathertopic by callingcreateOrRetrieve("weather")on theTopicManager. This operation returns a proxy to the topic with this name, creating this topic first if it does not exist. - Obtain a proxy for the
weathertopic's "publisher object" by callinggetPublisheron the topic proxy. This proxy is provided for the purpose of publishing messages, and therefore is narrowed to the topic interface (WeatherStation). - Collect and report readings by invoking on the proxy created in the previous step.