<= Previous | Next => | Table of Contents | TwICE User's Manual |
First start the Tomcat server. Open a command line window (a terminal window or DOS command window, depending upon your operating system) and type $TOMCAT_HOME/bin/startup.sh (or startup.bat if you are running under Windows.) Note that you may need root privileges to run these scripts.
Open a Web browser window on the subscriber home page. On my system, the
URL is http://localhost:8080/axis/subscriber.jsp
. Don't
be too surprised if this page takes a while to load the first time.
If your subscriber already has subscriptions, their id numbers will be
displayed on the home page and a link to the menu page is provided.
If your subscriber has no subscriptions, the subscriber asks the
syndicator for a catalog of subscription offers and displays the
offers as a list of checkboxes. Clicking "Submit" accepts the
subscriptions you have selected and takes you to the subscriber menu page.
Whenever you return to this catalog page, any outstanding offers not
already subscribed to will be redisplayed.
When on the subscriber menu page, you will see a list of all your subscriptions. Next to each is a check box. Below the list of subscriptions is a list of actions you may take: ping the syndicator, retrieve "pull" subscriptions, view subscription contents, or cancel subscriptions. Whatever you pick, clicking the "Submit" button will perform the action and redisplay the same page with the results of the action displayed at the top of the page.
You may receive perfectly normal error messages. For example, if you attempt to "pull" a date subscription more than once a day, you will see the error message "Error 202 (Package sequence state already current): Try again tomorrow". That is because the syndicator checks the current state of the subscription (as sent to it by the subscriber) with the current state of the subscription it generates. If they are the same, the error 202 is returned.
Open a second Web browser window on the syndicator home page. On my system,
the URL is http://localhost:8080/axis/syndicator.jsp
.
You will see a dropdown list containing the UUIDs of all subscribers known
to the syndicator.
To ping a subscriber, select it from the list, select the "Ping a subscriber" radio button, and click "Submit". If the subscriber has never sent a URL to the syndicator---for example, it has never subscribed to a "push" subscription---an appropriate message will be displayed.
To push content to a single subscriber, select it from the list, select the "Push subscriber's `push' subscription contents", and click "Submit". If the subscriber has no "push" subscriptions, you will see an appropriate error message.
To push content to multiple subscribers, see Pushing Content.
To push content from the syndicator to subscribers on the command line, use the script bin/push.sh. With no arguments, the syndicator pushes to all subscribers that have "push" subscriptions. If you specify subscriber UUIDs on the command line, then content will be pushed only to those subscribers.
The output from the push is directed to a temp file. That file is parsed for errors. If an error occurred, the file is emailed to the address defined in the script.
Since TwICE (and the Pusher) writes to files in the directories defined in twice.properties (for example, /tmp/ice-logs), this script needs to be run as a user that has the appropriate permissions. The bad news is, Tomcat seems to create those files as root (at least the way it is set up on my box).
The subscribers store pushed data in the directory specified by the preference "subscriber.subscription_contents_dir". (By default, that directory is /tmp/ice-sub-files). See Content Storage for details.
The demo-specific subscribers (instances of TwICESubscriber store content data in the directory specified by the property "subscriber.subscription_contents_dir". By default, that directory is /tmp/ice-sub-files). In that directory are files and directories whose names are subscription ids. In order to preserve item metadata, the items are stored as XML files representing the AddType's as received from the syndicator.
If you recompile and reinstall TwICE, you will need to restart the Tomcat
server and may also need to delete the directories which contain the TwICE
permanent storage and log files. These directories are defined in the file
twice.properties and by default are named
/tmp/ice-
something).
To recompile, reinstall, and delete the log and storage directories, use the command make install-clean. This in turn calls the script bin/cleanup.sh, which deletes the log, permanent storage, and subscriber contents directories that are defined in the file twice.properties. You may call the cleanup script at any time, but remember that it erases all subscription information.
To restart the Tomcat server, type $CATALINA_HOME/bin/shutdown.sh and then $CATALINA_HOME/bin/startup.sh.
The Ruby scripts that come with TwICE are useful while developing and deploying TwICE, but are not necessary to run it. For more information about Ruby, see the Ruby Web site.
<= Previous | Next => | Table of Contents |