[Jifty-commit] r2073 - in jifty/trunk: . doc/pubsub examples examples/Chat examples/Chat/bin examples/Chat/doc examples/Chat/etc examples/Chat/lib examples/Chat/lib/Chat examples/Chat/lib/Chat/Action examples/Chat/lib/Chat/Event examples/Chat/lib/Chat/Model examples/Chat/log examples/Chat/share examples/Chat/share/po examples/Chat/share/web examples/Chat/share/web/static examples/Chat/share/web/templates examples/Chat/share/web/templates/fragments examples/Chat/t examples/Chat/var examples/Clock examples/Clock/bin examples/Clock/doc examples/Clock/etc examples/Clock/lib examples/Clock/lib/Clock/Action examples/Clock/lib/Clock/Event examples/Clock/lib/Clock/Model examples/Clock/log examples/Clock/share examples/Clock/share/po examples/Clock/share/web examples/Clock/share/web/templates examples/Clock/share/web/templates/fragments examples/Clock/t examples/Clock/var examples/Ping examples/Ping/Ping examples/Ping/Ping/bin examples/Ping/Ping/doc examples/Ping/Ping/etc examples/Ping/Ping/lib examples/Ping/Ping/lib/Ping examples/Ping/Ping/lib/Ping/Action examples/Ping/Ping/lib/Ping/Event examples/Ping/Ping/lib/Ping/Model examples/Ping/Ping/log examples/Ping/Ping/share examples/Ping/Ping/share/po examples/Ping/Ping/share/web examples/Ping/Ping/share/web/static examples/Ping/Ping/share/web/templates examples/Ping/Ping/share/web/templates/fragments examples/Ping/Ping/t examples/Ping/bin examples/Ping/doc examples/Ping/etc examples/Ping/lib examples/Ping/lib/Ping examples/Ping/lib/Ping/Action examples/Ping/lib/Ping/Event examples/Ping/lib/Ping/Model examples/Ping/log examples/Ping/share examples/Ping/share/po examples/Ping/share/web examples/Ping/share/web/static examples/Ping/share/web/templates examples/Ping/share/web/templates/fragments examples/Ping/t lib/Jifty

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Fri Oct 27 04:12:34 EDT 2006


Author: jesse
Date: Fri Oct 27 04:12:29 2006
New Revision: 2073

Added:
   jifty/trunk/doc/pubsub/
   jifty/trunk/doc/pubsub/backend_message_types
   jifty/trunk/doc/pubsub/subscriptions
   jifty/trunk/doc/pubsub/system_architecture.graffle
   jifty/trunk/doc/pubsub/system_architecture.png   (contents, props changed)
   jifty/trunk/examples/
   jifty/trunk/examples/Chat/
   jifty/trunk/examples/Chat/Makefile.PL
   jifty/trunk/examples/Chat/bin/
   jifty/trunk/examples/Chat/bin/jifty   (contents, props changed)
   jifty/trunk/examples/Chat/doc/
   jifty/trunk/examples/Chat/etc/
   jifty/trunk/examples/Chat/etc/config.yml
   jifty/trunk/examples/Chat/lib/
   jifty/trunk/examples/Chat/lib/Chat/
   jifty/trunk/examples/Chat/lib/Chat/Action/
   jifty/trunk/examples/Chat/lib/Chat/Action/Send.pm
   jifty/trunk/examples/Chat/lib/Chat/Event/
   jifty/trunk/examples/Chat/lib/Chat/Event/Message.pm
   jifty/trunk/examples/Chat/lib/Chat/Model/
   jifty/trunk/examples/Chat/lib/Chat/Server.pm
   jifty/trunk/examples/Chat/log/
   jifty/trunk/examples/Chat/share/
   jifty/trunk/examples/Chat/share/po/
   jifty/trunk/examples/Chat/share/web/
   jifty/trunk/examples/Chat/share/web/static/
   jifty/trunk/examples/Chat/share/web/templates/
   jifty/trunk/examples/Chat/share/web/templates/fragments/
   jifty/trunk/examples/Chat/share/web/templates/fragments/message
   jifty/trunk/examples/Chat/share/web/templates/fragments/sender
   jifty/trunk/examples/Chat/share/web/templates/index.html
   jifty/trunk/examples/Chat/t/
   jifty/trunk/examples/Chat/var/
   jifty/trunk/examples/Clock/
   jifty/trunk/examples/Clock/Makefile.PL
   jifty/trunk/examples/Clock/bin/
   jifty/trunk/examples/Clock/bin/jifty   (contents, props changed)
   jifty/trunk/examples/Clock/clockserv.pl
   jifty/trunk/examples/Clock/doc/
   jifty/trunk/examples/Clock/etc/
   jifty/trunk/examples/Clock/etc/config.yml
   jifty/trunk/examples/Clock/lib/
   jifty/trunk/examples/Clock/lib/Clock/
   jifty/trunk/examples/Clock/lib/Clock/Action/
   jifty/trunk/examples/Clock/lib/Clock/Event/
   jifty/trunk/examples/Clock/lib/Clock/Event/Tick.pm
   jifty/trunk/examples/Clock/lib/Clock/Model/
   jifty/trunk/examples/Clock/lib/Clock/Server.pm
   jifty/trunk/examples/Clock/log/
   jifty/trunk/examples/Clock/share/
   jifty/trunk/examples/Clock/share/po/
   jifty/trunk/examples/Clock/share/web/
   jifty/trunk/examples/Clock/share/web/templates/
   jifty/trunk/examples/Clock/share/web/templates/fragments/
   jifty/trunk/examples/Clock/share/web/templates/fragments/time
   jifty/trunk/examples/Clock/share/web/templates/index.html
   jifty/trunk/examples/Clock/t/
   jifty/trunk/examples/Clock/var/
   jifty/trunk/examples/Ping/
   jifty/trunk/examples/Ping/Makefile.PL
   jifty/trunk/examples/Ping/Ping/
   jifty/trunk/examples/Ping/Ping/Makefile.PL
   jifty/trunk/examples/Ping/Ping/bin/
   jifty/trunk/examples/Ping/Ping/bin/jifty   (contents, props changed)
   jifty/trunk/examples/Ping/Ping/doc/
   jifty/trunk/examples/Ping/Ping/etc/
   jifty/trunk/examples/Ping/Ping/etc/config.yml
   jifty/trunk/examples/Ping/Ping/lib/
   jifty/trunk/examples/Ping/Ping/lib/Ping/
   jifty/trunk/examples/Ping/Ping/lib/Ping/Action/
   jifty/trunk/examples/Ping/Ping/lib/Ping/Action/AddPing.pm
   jifty/trunk/examples/Ping/Ping/lib/Ping/Action/CancelPing.pm
   jifty/trunk/examples/Ping/Ping/lib/Ping/Event/
   jifty/trunk/examples/Ping/Ping/lib/Ping/Event/Pong.pm
   jifty/trunk/examples/Ping/Ping/lib/Ping/Model/
   jifty/trunk/examples/Ping/Ping/lib/Ping/PingServer.pm
   jifty/trunk/examples/Ping/Ping/lib/Ping/Server.pm
   jifty/trunk/examples/Ping/Ping/log/
   jifty/trunk/examples/Ping/Ping/share/
   jifty/trunk/examples/Ping/Ping/share/po/
   jifty/trunk/examples/Ping/Ping/share/web/
   jifty/trunk/examples/Ping/Ping/share/web/static/
   jifty/trunk/examples/Ping/Ping/share/web/templates/
   jifty/trunk/examples/Ping/Ping/share/web/templates/fragments/
   jifty/trunk/examples/Ping/Ping/share/web/templates/fragments/pong
   jifty/trunk/examples/Ping/Ping/share/web/templates/index.html
   jifty/trunk/examples/Ping/Ping/t/
   jifty/trunk/examples/Ping/Ping/t/00compile.t
   jifty/trunk/examples/Ping/Ping/t/01startup.t
   jifty/trunk/examples/Ping/bin/
   jifty/trunk/examples/Ping/bin/jifty   (contents, props changed)
   jifty/trunk/examples/Ping/doc/
   jifty/trunk/examples/Ping/etc/
   jifty/trunk/examples/Ping/etc/config.yml
   jifty/trunk/examples/Ping/lib/
   jifty/trunk/examples/Ping/lib/Ping/
   jifty/trunk/examples/Ping/lib/Ping/Action/
   jifty/trunk/examples/Ping/lib/Ping/Action/AddPing.pm
   jifty/trunk/examples/Ping/lib/Ping/Action/CancelPing.pm
   jifty/trunk/examples/Ping/lib/Ping/Event/
   jifty/trunk/examples/Ping/lib/Ping/Event/Pong.pm
   jifty/trunk/examples/Ping/lib/Ping/Model/
   jifty/trunk/examples/Ping/lib/Ping/PingServer.pm
   jifty/trunk/examples/Ping/lib/Ping/Server.pm
   jifty/trunk/examples/Ping/log/
   jifty/trunk/examples/Ping/share/
   jifty/trunk/examples/Ping/share/po/
   jifty/trunk/examples/Ping/share/web/
   jifty/trunk/examples/Ping/share/web/static/
   jifty/trunk/examples/Ping/share/web/templates/
   jifty/trunk/examples/Ping/share/web/templates/fragments/
   jifty/trunk/examples/Ping/share/web/templates/fragments/pong
   jifty/trunk/examples/Ping/share/web/templates/index.html
   jifty/trunk/examples/Ping/t/
   jifty/trunk/examples/Ping/t/00compile.t
   jifty/trunk/examples/Ping/t/01startup.t
Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/META.yml
   jifty/trunk/lib/Jifty/Config.pm

Log:
 r29534 at pinglin:  jesse | 2006-10-27 01:09:58 -0700
 * Added sample apps and design docs from the PubSub/Comet hackathon
 


Modified: jifty/trunk/META.yml
==============================================================================
--- jifty/trunk/META.yml	(original)
+++ jifty/trunk/META.yml	Fri Oct 27 04:12:29 2006
@@ -67,6 +67,7 @@
   HTTP::Server::Simple::Recorder: 0
   Hash::Merge: 0
   Hook::LexWrap: 0
+  IPC::PubSub: 0.11
   JSON::Syck: 0.14
   Jifty::DBI: 0.25
   LWP::UserAgent: 0
@@ -93,4 +94,4 @@
   perl: 5.8.3
   version: 0
 tests: t/*.t t/*/t/*.t
-version: 0.60912
+version: 0.61025

Added: jifty/trunk/doc/pubsub/backend_message_types
==============================================================================
--- (empty file)
+++ jifty/trunk/doc/pubsub/backend_message_types	Fri Oct 27 04:12:29 2006
@@ -0,0 +1,15 @@
+Payload Types:
+
+ClientAction --> Republisher
+    #subscription
+    - Add Subscription (IP)
+    - Remove Subscription (IP)
+
+Republisher --> ClientRender
+    #pong-$IP
+    - Pong (IP, IS_ALIVE)
+
+Server --> Republisher
+    #pong
+    - Pong (IP, IS_ALIVE)
+

Added: jifty/trunk/doc/pubsub/subscriptions
==============================================================================
--- (empty file)
+++ jifty/trunk/doc/pubsub/subscriptions	Fri Oct 27 04:12:29 2006
@@ -0,0 +1,83 @@
+Subscriptions we want to support
+
+
+
+    Create,Read,Update,Delete
+        
+        Class: MyApp::Record::Foo
+     
+
+
+For hiveminder: NEWS
+
+    * on every page, we have a little box with the 3 most recent news entries:
+
+    <h2>News</h2>
+    <%perl>
+        my $sub = Jifty::ClientSubscription->new( 
+            query_class => 'BTDT::Model::News',
+            query => ['id_not' => undef],
+            # Ordering?
+            on_add => [
+            { render_with => '/fragments/news/item',
+              render => after => 'news.entries.last_child' 
+            },
+            { # how do we remove something if there are more than 3?
+            }
+
+            ]);
+
+
+For hiveminder:
+
+    My page is:
+
+        list of: tasks matching 'owner me, complete is not true'
+        each item is rendered as '/fragments/tasklist/view,  with args %ARGS and record => $found
+
+
+    Subscribe to:
+
+        * creation of things that match 'owner me, complete is not true'
+        * update, delete to anything that matches 'owner me, complete is not true' after the changes
+        * update, delete to anything that matches 'owner me, complete is not true' before the changes
+       
+
+
+    "Render this component as":
+
+        wrapper
+            list of items matching the subscription 'owner me, complete is not true'
+                render each item with '/fragments/tasklist/view', args => %ARGS, item $found
+
+
+            my $subscription = Jifty::ClientSubscription->new(
+                on_add => {
+                    args        => \%ARGS,
+                    render_with => '/fragments/tasklist/view',
+                    render => after => '.parent.last_child'
+                                # before, after, replacing
+                                
+                },
+                on_remove => {
+                    args        => \%ARGS,
+                    render => replacing => 'self'
+                    render_with => '/fragments/tasklist/fade_away'
+                },
+                query_class => 'BTDT::Model::Task',
+                query       => [ owner => 'me', complete_not => 'true' ]
+            );
+
+
+# Session::ClientSide-ish encoding of SIDs to subscribe
+# Each request carries IDs of its existing subs (stashed into ->subs)
+my $sid = Jifty->subs->add(
+    query_class => 'Ping',
+    query       => [ host => '127.0.0.1' ],
+    render_with => '/fragments/pong',
+);
+Jifty->subs->cancel($sid);
+
+# This actually just calls the fragments with Publisher-msg structures as %ARGS
+# Print-on-void-context, return-on-other-contexts
+Jifty->subs->render;

Added: jifty/trunk/doc/pubsub/system_architecture.graffle
==============================================================================
--- (empty file)
+++ jifty/trunk/doc/pubsub/system_architecture.graffle	Fri Oct 27 04:12:29 2006
@@ -0,0 +1,1744 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>ActiveLayerIndex</key>
+	<integer>0</integer>
+	<key>AutoAdjust</key>
+	<true/>
+	<key>CanvasColor</key>
+	<dict>
+		<key>w</key>
+		<string>1</string>
+	</dict>
+	<key>CanvasOrigin</key>
+	<string>{0, 0}</string>
+	<key>CanvasScale</key>
+	<real>1</real>
+	<key>ColumnAlign</key>
+	<integer>1</integer>
+	<key>ColumnSpacing</key>
+	<real>36</real>
+	<key>CreationDate</key>
+	<string>2006-10-24 12:01:34 -0700</string>
+	<key>Creator</key>
+	<string>Jesse Vincent</string>
+	<key>DisplayScale</key>
+	<string>1 in = 1 in</string>
+	<key>GraphDocumentVersion</key>
+	<integer>5</integer>
+	<key>GraphicsList</key>
+	<array>
+		<dict>
+			<key>Bounds</key>
+			<string>{{756, 39.835}, {211, 137}}</string>
+			<key>Class</key>
+			<string>ShapedGraphic</string>
+			<key>ID</key>
+			<integer>82</integer>
+			<key>Shape</key>
+			<string>Rectangle</string>
+			<key>Text</key>
+			<dict>
+				<key>Text</key>
+				<string>{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf410
+{\fonttbl\f0\fswiss\fcharset77 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural
+
+\f0\fs24 \cf0 Jifty Push System Architecture.\
+A. Tang  and J. Vincent - \
+October 2006}</string>
+			</dict>
+		</dict>
+		<dict>
+			<key>Bounds</key>
+			<string>{{330.451, 150.979}, {256, 14}}</string>
+			<key>Class</key>
+			<string>ShapedGraphic</string>
+			<key>FitText</key>
+			<string>YES</string>
+			<key>FontInfo</key>
+			<dict>
+				<key>Color</key>
+				<dict>
+					<key>w</key>
+					<string>0</string>
+				</dict>
+				<key>Font</key>
+				<string>Helvetica</string>
+				<key>Size</key>
+				<real>12</real>
+			</dict>
+			<key>ID</key>
+			<integer>80</integer>
+			<key>Line</key>
+			<dict>
+				<key>ID</key>
+				<integer>24</integer>
+				<key>Position</key>
+				<real>0.62390816211700439</real>
+				<key>RotationType</key>
+				<integer>0</integer>
+			</dict>
+			<key>Shape</key>
+			<string>Rectangle</string>
+			<key>Style</key>
+			<dict>
+				<key>shadow</key>
+				<dict>
+					<key>Draws</key>
+					<string>NO</string>
+				</dict>
+				<key>stroke</key>
+				<dict>
+					<key>Draws</key>
+					<string>NO</string>
+				</dict>
+			</dict>
+			<key>Text</key>
+			<dict>
+				<key>Text</key>
+				<string>{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf410
+{\fonttbl\f0\fswiss\fcharset77 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural
+
+\f0\fs24 \cf0 (With a kill-me-when-republish-to-nobody flag)}</string>
+			</dict>
+		</dict>
+		<dict>
+			<key>Class</key>
+			<string>LineGraphic</string>
+			<key>ID</key>
+			<integer>78</integer>
+			<key>Points</key>
+			<array>
+				<string>{822.47, 460.7}</string>
+				<string>{822.329, 431.61}</string>
+			</array>
+			<key>Style</key>
+			<dict>
+				<key>stroke</key>
+				<dict>
+					<key>HeadArrow</key>
+					<string>FilledArrow</string>
+					<key>Pattern</key>
+					<integer>2</integer>
+					<key>TailArrow</key>
+					<string>0</string>
+				</dict>
+			</dict>
+			<key>Tail</key>
+			<dict>
+				<key>ID</key>
+				<integer>77</integer>
+			</dict>
+		</dict>
+		<dict>
+			<key>Bounds</key>
+			<string>{{748.211, 461.2}, {149, 97.8}}</string>
+			<key>Class</key>
+			<string>ShapedGraphic</string>
+			<key>ID</key>
+			<integer>77</integer>
+			<key>Shape</key>
+			<string>Rectangle</string>
+			<key>Style</key>
+			<dict>
+				<key>stroke</key>
+				<dict>
+					<key>Pattern</key>
+					<integer>2</integer>
+				</dict>
+			</dict>
+			<key>Text</key>
+			<dict>
+				<key>Text</key>
+				<string>{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf410
+{\fonttbl\f0\fswiss\fcharset77 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural
+
+\f0\fs24 \cf0 Publish unsubscription from 'ping' events \
+($SUB into $DEL-SUBS)\
+\
+(May also happen \
+upon session GC)}</string>
+			</dict>
+		</dict>
+		<dict>
+			<key>Bounds</key>
+			<string>{{45.4648, 366.851}, {907.535, 54}}</string>
+			<key>Class</key>
+			<string>ShapedGraphic</string>
+			<key>FontInfo</key>
+			<dict>
+				<key>Color</key>
+				<dict>
+					<key>w</key>
+					<string>0</string>
+				</dict>
+				<key>Font</key>
+				<string>Helvetica</string>
+				<key>NSKern</key>
+				<real>0.0</real>
+				<key>Size</key>
+				<real>12</real>
+			</dict>
+			<key>ID</key>
+			<integer>1</integer>
+			<key>Shape</key>
+			<string>Rectangle</string>
+			<key>Style</key>
+			<dict>
+				<key>fill</key>
+				<dict>
+					<key>GradientColor</key>
+					<dict>
+						<key>w</key>
+						<string>0.666667</string>
+					</dict>
+				</dict>
+			</dict>
+			<key>Text</key>
+			<dict>
+				<key>Text</key>
+				<string>{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf410
+{\fonttbl\f0\fswiss\fcharset77 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural
+
+\f0\fs24 \cf0 Message Bus}</string>
+			</dict>
+		</dict>
+		<dict>
+			<key>Bounds</key>
+			<string>{{241.567, 505}, {149, 54}}</string>
+			<key>Class</key>
+			<string>ShapedGraphic</string>
+			<key>ID</key>
+			<integer>75</integer>
+			<key>Shape</key>
+			<string>Rectangle</string>
+			<key>Text</key>
+			<dict>
+				<key>Text</key>
+				<string>{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf410
+{\fonttbl\f0\fswiss\fcharset77 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural
+
+\f0\fs24 \cf0 Publish subscription to 'ping' events \
+($SUB into $ADD-SUBS)}</string>
+			</dict>
+		</dict>
+		<dict>
+			<key>Bounds</key>
+			<string>{{105, 505}, {133, 54}}</string>
+			<key>Class</key>
+			<string>ShapedGraphic</string>
+			<key>ID</key>
+			<integer>74</integer>
+			<key>Shape</key>
+			<string>Rectangle</string>
+			<key>Text</key>
+			<dict>
+				<key>Text</key>
+				<string>{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf410
+{\fonttbl\f0\fswiss\fcharset77 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural
+
+\f0\fs24 \cf0 Start ping server}</string>
+			</dict>
+		</dict>
+		<dict>
+			<key>Bounds</key>
+			<string>{{398.5, 285.356}, {49, 28}}</string>
+			<key>Class</key>
+			<string>ShapedGraphic</string>
+			<key>FitText</key>
+			<string>YES</string>
+			<key>FontInfo</key>
+			<dict>
+				<key>Color</key>
+				<dict>
+					<key>w</key>
+					<string>0</string>
+				</dict>
+				<key>Font</key>
+				<string>Helvetica</string>
+				<key>Size</key>
+				<real>12</real>
+			</dict>
+			<key>ID</key>
+			<integer>72</integer>
+			<key>Line</key>
+			<dict>
+				<key>ID</key>
+				<integer>71</integer>
+				<key>Position</key>
+				<real>0.51288449764251709</real>
+				<key>RotationType</key>
+				<integer>0</integer>
+			</dict>
+			<key>Shape</key>
+			<string>Rectangle</string>
+			<key>Style</key>
+			<dict>
+				<key>shadow</key>
+				<dict>
+					<key>Draws</key>
+					<string>NO</string>
+				</dict>
+				<key>stroke</key>
+				<dict>
+					<key>Draws</key>
+					<string>NO</string>
+				</dict>
+			</dict>
+			<key>Text</key>
+			<dict>
+				<key>Text</key>
+				<string>{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf410
+{\fonttbl\f0\fswiss\fcharset77 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural
+
+\f0\fs24 \cf0 Send\
+[$SUB]}</string>
+			</dict>
+		</dict>
+		<dict>
+			<key>Class</key>
+			<string>LineGraphic</string>
+			<key>ID</key>
+			<integer>71</integer>
+			<key>Points</key>
+			<array>
+				<string>{423, 349.516}</string>
+				<string>{423, 251.716}</string>
+			</array>
+			<key>Style</key>
+			<dict>
+				<key>stroke</key>
+				<dict>
+					<key>HeadArrow</key>
+					<string>FilledArrow</string>
+					<key>TailArrow</key>
+					<string>0</string>
+				</dict>
+			</dict>
+		</dict>
+		<dict>
+			<key>Bounds</key>
+			<string>{{784.411, 610.503}, {77, 42}}</string>
+			<key>Class</key>
+			<string>ShapedGraphic</string>
+			<key>FitText</key>
+			<string>YES</string>
+			<key>FontInfo</key>
+			<dict>
+				<key>Color</key>
+				<dict>
+					<key>w</key>
+					<string>0</string>
+				</dict>
+				<key>Font</key>
+				<string>Helvetica</string>
+				<key>Size</key>
+				<real>12</real>
+			</dict>
+			<key>ID</key>
+			<integer>69</integer>
+			<key>Line</key>
+			<dict>
+				<key>ID</key>
+				<integer>68</integer>
+				<key>Position</key>
+				<real>0.42627021670341492</real>
+				<key>RotationType</key>
+				<integer>0</integer>
+			</dict>
+			<key>Shape</key>
+			<string>Rectangle</string>
+			<key>Style</key>
+			<dict>
+				<key>shadow</key>
+				<dict>
+					<key>Draws</key>
+					<string>NO</string>
+				</dict>
+				<key>stroke</key>
+				<dict>
+					<key>Draws</key>
+					<string>NO</string>
+				</dict>
+			</dict>
+			<key>Text</key>
+			<dict>
+				<key>Text</key>
+				<string>{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf410
+{\fonttbl\f0\fswiss\fcharset77 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural
+
+\f0\fs24 \cf0 Jifty::Action:\
+Unsubscribe\
+Action::Ping}</string>
+			</dict>
+		</dict>
+		<dict>
+			<key>Class</key>
+			<string>LineGraphic</string>
+			<key>Head</key>
+			<dict>
+				<key>ID</key>
+				<integer>77</integer>
+			</dict>
+			<key>ID</key>
+			<integer>68</integer>
+			<key>Points</key>
+			<array>
+				<string>{823, 685}</string>
+				<string>{822.792, 559.5}</string>
+			</array>
+			<key>Style</key>
+			<dict>
+				<key>stroke</key>
+				<dict>
+					<key>HeadArrow</key>
+					<string>FilledArrow</string>
+					<key>Pattern</key>
+					<integer>2</integer>
+					<key>TailArrow</key>
+					<string>0</string>
+				</dict>
+			</dict>
+		</dict>
+		<dict>
+			<key>Bounds</key>
+			<string>{{323.771, 263.402}, {83, 28}}</string>
+			<key>Class</key>
+			<string>ShapedGraphic</string>
+			<key>FitText</key>
+			<string>YES</string>
+			<key>FontInfo</key>
+			<dict>
+				<key>Color</key>
+				<dict>
+					<key>w</key>
+					<string>0</string>
+				</dict>
+				<key>Font</key>
+				<string>Helvetica</string>
+				<key>Size</key>
+				<real>12</real>
+			</dict>
+			<key>ID</key>
+			<integer>62</integer>
+			<key>Line</key>
+			<dict>
+				<key>ID</key>
+				<integer>61</integer>
+				<key>Position</key>
+				<real>0.27589595317840576</real>
+				<key>RotationType</key>
+				<integer>0</integer>
+			</dict>
+			<key>Shape</key>
+			<string>Rectangle</string>
+			<key>Style</key>
+			<dict>
+				<key>shadow</key>
+				<dict>
+					<key>Draws</key>
+					<string>NO</string>
+				</dict>
+				<key>stroke</key>
+				<dict>
+					<key>Draws</key>
+					<string>NO</string>
+				</dict>
+			</dict>
+			<key>Text</key>
+			<dict>
+				<key>Text</key>
+				<string>{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf410
+{\fonttbl\f0\fswiss\fcharset77 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural
+
+\f0\fs24 \cf0 Poll\
+$ADD-SUBS }</string>
+			</dict>
+		</dict>
+		<dict>
+			<key>Class</key>
+			<string>LineGraphic</string>
+			<key>ID</key>
+			<integer>61</integer>
+			<key>Points</key>
+			<array>
+				<string>{364.995, 247.455}</string>
+				<string>{365.995, 356}</string>
+			</array>
+			<key>Style</key>
+			<dict>
+				<key>stroke</key>
+				<dict>
+					<key>HeadArrow</key>
+					<string>FilledArrow</string>
+					<key>TailArrow</key>
+					<string>0</string>
+				</dict>
+			</dict>
+		</dict>
+		<dict>
+			<key>Bounds</key>
+			<string>{{982.555, 751.48}, {61, 14}}</string>
+			<key>Class</key>
+			<string>ShapedGraphic</string>
+			<key>FitText</key>
+			<string>YES</string>
+			<key>FontInfo</key>
+			<dict>
+				<key>Color</key>
+				<dict>
+					<key>w</key>
+					<string>0</string>
+				</dict>
+				<key>Font</key>
+				<string>Helvetica</string>
+				<key>Size</key>
+				<real>12</real>
+			</dict>
+			<key>ID</key>
+			<integer>60</integer>
+			<key>Line</key>
+			<dict>
+				<key>ID</key>
+				<integer>59</integer>
+				<key>Position</key>
+				<real>0.89849430322647095</real>
+				<key>RotationType</key>
+				<integer>0</integer>
+			</dict>
+			<key>Shape</key>
+			<string>Rectangle</string>
+			<key>Style</key>
+			<dict>
+				<key>shadow</key>
+				<dict>
+					<key>Draws</key>
+					<string>NO</string>
+				</dict>
+				<key>stroke</key>
+				<dict>
+					<key>Draws</key>
+					<string>NO</string>
+				</dict>
+			</dict>
+			<key>Text</key>
+			<dict>
+				<key>Text</key>
+				<string>{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf410
+{\fonttbl\f0\fswiss\fcharset77 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural
+
+\f0\fs24 \cf0 Time &gt;&gt;&gt;}</string>
+			</dict>
+		</dict>
+		<dict>
+			<key>Class</key>
+			<string>LineGraphic</string>
+			<key>ID</key>
+			<integer>59</integer>
+			<key>Points</key>
+			<array>
+				<string>{30.8634, 757}</string>
+				<string>{1124.02, 758.647}</string>
+			</array>
+			<key>Style</key>
+			<dict>
+				<key>stroke</key>
+				<dict>
+					<key>HeadArrow</key>
+					<string>FilledArrow</string>
+					<key>TailArrow</key>
+					<string>0</string>
+				</dict>
+			</dict>
+		</dict>
+		<dict>
+			<key>Bounds</key>
+			<string>{{652.329, 607.255}, {84, 28}}</string>
+			<key>Class</key>
+			<string>ShapedGraphic</string>
+			<key>FitText</key>
+			<string>YES</string>
+			<key>FontInfo</key>
+			<dict>
+				<key>Color</key>
+				<dict>
+					<key>w</key>
+					<string>0</string>
+				</dict>
+				<key>Font</key>
+				<string>Helvetica</string>
+				<key>Size</key>
+				<real>12</real>
+			</dict>
+			<key>ID</key>
+			<integer>55</integer>
+			<key>Line</key>
+			<dict>
+				<key>ID</key>
+				<integer>54</integer>
+				<key>Position</key>
+				<real>0.51953768730163574</real>
+				<key>RotationType</key>
+				<integer>0</integer>
+			</dict>
+			<key>Shape</key>
+			<string>Rectangle</string>
+			<key>Style</key>
+			<dict>
+				<key>shadow</key>
+				<dict>
+					<key>Draws</key>
+					<string>NO</string>
+				</dict>
+				<key>stroke</key>
+				<dict>
+					<key>Draws</key>
+					<string>NO</string>
+				</dict>
+			</dict>
+			<key>Text</key>
+			<dict>
+				<key>Text</key>
+				<string>{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf410
+{\fonttbl\f0\fswiss\fcharset77 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural
+
+\f0\fs24 \cf0 Push+Render\
+$EVENT}</string>
+			</dict>
+		</dict>
+		<dict>
+			<key>Class</key>
+			<string>LineGraphic</string>
+			<key>ID</key>
+			<integer>54</integer>
+			<key>Points</key>
+			<array>
+				<string>{694.329, 546.643}</string>
+				<string>{694.329, 690.255}</string>
+			</array>
+			<key>Style</key>
+			<dict>
+				<key>stroke</key>
+				<dict>
+					<key>HeadArrow</key>
+					<string>FilledArrow</string>
+					<key>TailArrow</key>
+					<string>0</string>
+				</dict>
+			</dict>
+		</dict>
+		<dict>
+			<key>Bounds</key>
+			<string>{{655.57, 439.363}, {49, 24}}</string>
+			<key>Class</key>
+			<string>ShapedGraphic</string>
+			<key>FitText</key>
+			<string>YES</string>
+			<key>FontInfo</key>
+			<dict>
+				<key>Color</key>
+				<dict>
+					<key>w</key>
+					<string>0</string>
+				</dict>
+				<key>Font</key>
+				<string>Helvetica-Bold</string>
+				<key>Size</key>
+				<real>10</real>
+			</dict>
+			<key>ID</key>
+			<integer>56</integer>
+			<key>Line</key>
+			<dict>
+				<key>ID</key>
+				<integer>52</integer>
+				<key>Position</key>
+				<real>0.45289328694343567</real>
+				<key>RotationType</key>
+				<integer>0</integer>
+			</dict>
+			<key>Shape</key>
+			<string>Rectangle</string>
+			<key>Style</key>
+			<dict>
+				<key>shadow</key>
+				<dict>
+					<key>Draws</key>
+					<string>NO</string>
+				</dict>
+				<key>stroke</key>
+				<dict>
+					<key>Draws</key>
+					<string>NO</string>
+				</dict>
+			</dict>
+			<key>Text</key>
+			<dict>
+				<key>Text</key>
+				<string>{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf410
+{\fonttbl\f0\fswiss\fcharset77 Helvetica-Bold;}
+{\colortbl;\red255\green255\blue255;}
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural
+
+\f0\b\fs20 \cf0 Send\
+$EVENT}</string>
+			</dict>
+		</dict>
+		<dict>
+			<key>Class</key>
+			<string>LineGraphic</string>
+			<key>ID</key>
+			<integer>52</integer>
+			<key>Points</key>
+			<array>
+				<string>{680.07, 424.383}</string>
+				<string>{680.07, 483.957}</string>
+			</array>
+			<key>Style</key>
+			<dict>
+				<key>stroke</key>
+				<dict>
+					<key>HeadArrow</key>
+					<string>FilledArrow</string>
+					<key>TailArrow</key>
+					<string>0</string>
+				</dict>
+			</dict>
+		</dict>
+		<dict>
+			<key>Bounds</key>
+			<string>{{603.273, 452.914}, {52, 28}}</string>
+			<key>Class</key>
+			<string>ShapedGraphic</string>
+			<key>FitText</key>
+			<string>YES</string>
+			<key>FontInfo</key>
+			<dict>
+				<key>Color</key>
+				<dict>
+					<key>w</key>
+					<string>0</string>
+				</dict>
+				<key>Font</key>
+				<string>Helvetica</string>
+				<key>Size</key>
+				<real>12</real>
+			</dict>
+			<key>ID</key>
+			<integer>51</integer>
+			<key>Line</key>
+			<dict>
+				<key>ID</key>
+				<integer>50</integer>
+				<key>Position</key>
+				<real>0.41240772604942322</real>
+				<key>RotationType</key>
+				<integer>0</integer>
+			</dict>
+			<key>Shape</key>
+			<string>Rectangle</string>
+			<key>Style</key>
+			<dict>
+				<key>shadow</key>
+				<dict>
+					<key>Draws</key>
+					<string>NO</string>
+				</dict>
+				<key>stroke</key>
+				<dict>
+					<key>Draws</key>
+					<string>NO</string>
+				</dict>
+			</dict>
+			<key>Text</key>
+			<dict>
+				<key>Text</key>
+				<string>{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf410
+{\fonttbl\f0\fswiss\fcharset77 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural
+
+\f0\fs24 \cf0 Poll\
+[$SUB] }</string>
+			</dict>
+		</dict>
+		<dict>
+			<key>Class</key>
+			<string>LineGraphic</string>
+			<key>ID</key>
+			<integer>50</integer>
+			<key>Points</key>
+			<array>
+				<string>{629, 489.057}</string>
+				<string>{629.661, 435.363}</string>
+			</array>
+			<key>Style</key>
+			<dict>
+				<key>stroke</key>
+				<dict>
+					<key>HeadArrow</key>
+					<string>FilledArrow</string>
+					<key>TailArrow</key>
+					<string>0</string>
+				</dict>
+			</dict>
+		</dict>
+		<dict>
+			<key>Bounds</key>
+			<string>{{532.773, 447.813}, {52, 28}}</string>
+			<key>Class</key>
+			<string>ShapedGraphic</string>
+			<key>FitText</key>
+			<string>YES</string>
+			<key>FontInfo</key>
+			<dict>
+				<key>Color</key>
+				<dict>
+					<key>w</key>
+					<string>0</string>
+				</dict>
+				<key>Font</key>
+				<string>Helvetica</string>
+				<key>Size</key>
+				<real>12</real>
+			</dict>
+			<key>ID</key>
+			<integer>49</integer>
+			<key>Line</key>
+			<dict>
+				<key>ID</key>
+				<integer>48</integer>
+				<key>Position</key>
+				<real>0.41240772604942322</real>
+				<key>RotationType</key>
+				<integer>0</integer>
+			</dict>
+			<key>Shape</key>
+			<string>Rectangle</string>
+			<key>Style</key>
+			<dict>
+				<key>shadow</key>
+				<dict>
+					<key>Draws</key>
+					<string>NO</string>
+				</dict>
+				<key>stroke</key>
+				<dict>
+					<key>Draws</key>
+					<string>NO</string>
+				</dict>
+			</dict>
+			<key>Text</key>
+			<dict>
+				<key>Text</key>
+				<string>{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf410
+{\fonttbl\f0\fswiss\fcharset77 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural
+
+\f0\fs24 \cf0 Poll\
+[$SUB] }</string>
+			</dict>
+		</dict>
+		<dict>
+			<key>Class</key>
+			<string>LineGraphic</string>
+			<key>ID</key>
+			<integer>48</integer>
+			<key>Points</key>
+			<array>
+				<string>{558.5, 483.957}</string>
+				<string>{559.161, 430.263}</string>
+			</array>
+			<key>Style</key>
+			<dict>
+				<key>stroke</key>
+				<dict>
+					<key>HeadArrow</key>
+					<string>FilledArrow</string>
+					<key>TailArrow</key>
+					<string>0</string>
+				</dict>
+			</dict>
+		</dict>
+		<dict>
+			<key>Bounds</key>
+			<string>{{432.043, 446.396}, {52, 28}}</string>
+			<key>Class</key>
+			<string>ShapedGraphic</string>
+			<key>FitText</key>
+			<string>YES</string>
+			<key>FontInfo</key>
+			<dict>
+				<key>Color</key>
+				<dict>
+					<key>w</key>
+					<string>0</string>
+				</dict>
+				<key>Font</key>
+				<string>Helvetica</string>
+				<key>Size</key>
+				<real>12</real>
+			</dict>
+			<key>ID</key>
+			<integer>47</integer>
+			<key>Line</key>
+			<dict>
+				<key>ID</key>
+				<integer>46</integer>
+				<key>Position</key>
+				<real>0.36850014328956604</real>
+				<key>RotationType</key>
+				<integer>0</integer>
+			</dict>
+			<key>Shape</key>
+			<string>Rectangle</string>
+			<key>Style</key>
+			<dict>
+				<key>shadow</key>
+				<dict>
+					<key>Draws</key>
+					<string>NO</string>
+				</dict>
+				<key>stroke</key>
+				<dict>
+					<key>Draws</key>
+					<string>NO</string>
+				</dict>
+			</dict>
+			<key>Text</key>
+			<dict>
+				<key>Text</key>
+				<string>{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf410
+{\fonttbl\f0\fswiss\fcharset77 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural
+
+\f0\fs24 \cf0 Poll\
+[$SUB] }</string>
+			</dict>
+		</dict>
+		<dict>
+			<key>Class</key>
+			<string>LineGraphic</string>
+			<key>ID</key>
+			<integer>46</integer>
+			<key>Points</key>
+			<array>
+				<string>{458, 481}</string>
+				<string>{458.117, 425.087}</string>
+			</array>
+			<key>Style</key>
+			<dict>
+				<key>stroke</key>
+				<dict>
+					<key>HeadArrow</key>
+					<string>FilledArrow</string>
+					<key>TailArrow</key>
+					<string>0</string>
+				</dict>
+			</dict>
+		</dict>
+		<dict>
+			<key>Bounds</key>
+			<string>{{558.5, 256.36}, {57, 42}}</string>
+			<key>Class</key>
+			<string>ShapedGraphic</string>
+			<key>FitText</key>
+			<string>YES</string>
+			<key>FontInfo</key>
+			<dict>
+				<key>Color</key>
+				<dict>
+					<key>w</key>
+					<string>0</string>
+				</dict>
+				<key>Font</key>
+				<string>Helvetica</string>
+				<key>Size</key>
+				<real>12</real>
+			</dict>
+			<key>ID</key>
+			<integer>45</integer>
+			<key>Line</key>
+			<dict>
+				<key>ID</key>
+				<integer>44</integer>
+				<key>Position</key>
+				<real>0.24552829563617706</real>
+				<key>RotationType</key>
+				<integer>0</integer>
+			</dict>
+			<key>Shape</key>
+			<string>Rectangle</string>
+			<key>Style</key>
+			<dict>
+				<key>shadow</key>
+				<dict>
+					<key>Draws</key>
+					<string>NO</string>
+				</dict>
+				<key>stroke</key>
+				<dict>
+					<key>Draws</key>
+					<string>NO</string>
+				</dict>
+			</dict>
+			<key>Text</key>
+			<dict>
+				<key>Text</key>
+				<string>{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf410
+{\fonttbl\f0\fswiss\fcharset77 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural
+
+\f0\fs24 \cf0 Publish \
+$EVENT\
+to $SUB}</string>
+			</dict>
+		</dict>
+		<dict>
+			<key>Class</key>
+			<string>LineGraphic</string>
+			<key>ID</key>
+			<integer>44</integer>
+			<key>Points</key>
+			<array>
+				<string>{587, 249.615}</string>
+				<string>{587, 362.615}</string>
+			</array>
+			<key>Style</key>
+			<dict>
+				<key>stroke</key>
+				<dict>
+					<key>HeadArrow</key>
+					<string>FilledArrow</string>
+					<key>TailArrow</key>
+					<string>0</string>
+				</dict>
+			</dict>
+		</dict>
+		<dict>
+			<key>Class</key>
+			<string>LineGraphic</string>
+			<key>ID</key>
+			<integer>42</integer>
+			<key>Points</key>
+			<array>
+				<string>{315.076, 504.5}</string>
+				<string>{312.334, 428.426}</string>
+			</array>
+			<key>Style</key>
+			<dict>
+				<key>stroke</key>
+				<dict>
+					<key>HeadArrow</key>
+					<string>FilledArrow</string>
+					<key>TailArrow</key>
+					<string>0</string>
+				</dict>
+			</dict>
+			<key>Tail</key>
+			<dict>
+				<key>ID</key>
+				<integer>75</integer>
+			</dict>
+		</dict>
+		<dict>
+			<key>Bounds</key>
+			<string>{{55.0165, 435.416}, {163, 42}}</string>
+			<key>Class</key>
+			<string>ShapedGraphic</string>
+			<key>FitText</key>
+			<string>YES</string>
+			<key>FontInfo</key>
+			<dict>
+				<key>Color</key>
+				<dict>
+					<key>w</key>
+					<string>0</string>
+				</dict>
+				<key>Font</key>
+				<string>Helvetica</string>
+				<key>Size</key>
+				<real>12</real>
+			</dict>
+			<key>ID</key>
+			<integer>41</integer>
+			<key>Line</key>
+			<dict>
+				<key>ID</key>
+				<integer>40</integer>
+				<key>Position</key>
+				<real>0.48351499438285828</real>
+				<key>RotationType</key>
+				<integer>0</integer>
+			</dict>
+			<key>Shape</key>
+			<string>Rectangle</string>
+			<key>Style</key>
+			<dict>
+				<key>shadow</key>
+				<dict>
+					<key>Draws</key>
+					<string>NO</string>
+				</dict>
+				<key>stroke</key>
+				<dict>
+					<key>Draws</key>
+					<string>NO</string>
+				</dict>
+			</dict>
+			<key>Text</key>
+			<dict>
+				<key>Text</key>
+				<string>{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf410
+{\fonttbl\f0\fswiss\fcharset77 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural
+
+\f0\fs24 \cf0 Add \
+Subscription Channel $SUB:\
+Action::Ping}</string>
+			</dict>
+		</dict>
+		<dict>
+			<key>Class</key>
+			<string>LineGraphic</string>
+			<key>ID</key>
+			<integer>40</integer>
+			<key>Points</key>
+			<array>
+				<string>{137, 482.62}</string>
+				<string>{136, 428.426}</string>
+			</array>
+			<key>Style</key>
+			<dict>
+				<key>stroke</key>
+				<dict>
+					<key>HeadArrow</key>
+					<string>FilledArrow</string>
+					<key>TailArrow</key>
+					<string>0</string>
+				</dict>
+			</dict>
+		</dict>
+		<dict>
+			<key>Bounds</key>
+			<string>{{383.843, 121.654}, {149, 28}}</string>
+			<key>Class</key>
+			<string>ShapedGraphic</string>
+			<key>FitText</key>
+			<string>YES</string>
+			<key>FontInfo</key>
+			<dict>
+				<key>Color</key>
+				<dict>
+					<key>w</key>
+					<string>0</string>
+				</dict>
+				<key>Font</key>
+				<string>Helvetica</string>
+				<key>Size</key>
+				<real>12</real>
+			</dict>
+			<key>ID</key>
+			<integer>38</integer>
+			<key>Line</key>
+			<dict>
+				<key>ID</key>
+				<integer>24</integer>
+				<key>Position</key>
+				<real>0.42278197407722473</real>
+				<key>RotationType</key>
+				<integer>0</integer>
+			</dict>
+			<key>Shape</key>
+			<string>Rectangle</string>
+			<key>Style</key>
+			<dict>
+				<key>shadow</key>
+				<dict>
+					<key>Draws</key>
+					<string>NO</string>
+				</dict>
+				<key>stroke</key>
+				<dict>
+					<key>Draws</key>
+					<string>NO</string>
+				</dict>
+			</dict>
+			<key>Text</key>
+			<dict>
+				<key>Text</key>
+				<string>{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf410
+{\fonttbl\f0\fswiss\fcharset77 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural
+
+\f0\fs24 \cf0 Publishes Event $EVENT:\
+PING 127.0.0.1 1ms}</string>
+			</dict>
+		</dict>
+		<dict>
+			<key>Bounds</key>
+			<string>{{30.8634, 623.165}, {71, 28}}</string>
+			<key>Class</key>
+			<string>ShapedGraphic</string>
+			<key>FitText</key>
+			<string>YES</string>
+			<key>FontInfo</key>
+			<dict>
+				<key>Color</key>
+				<dict>
+					<key>w</key>
+					<string>0</string>
+				</dict>
+				<key>Font</key>
+				<string>Helvetica</string>
+				<key>Size</key>
+				<real>12</real>
+			</dict>
+			<key>ID</key>
+			<integer>36</integer>
+			<key>Line</key>
+			<dict>
+				<key>ID</key>
+				<integer>34</integer>
+				<key>Position</key>
+				<real>0.38565847277641296</real>
+				<key>RotationType</key>
+				<integer>0</integer>
+			</dict>
+			<key>Shape</key>
+			<string>Rectangle</string>
+			<key>Style</key>
+			<dict>
+				<key>shadow</key>
+				<dict>
+					<key>Draws</key>
+					<string>NO</string>
+				</dict>
+				<key>stroke</key>
+				<dict>
+					<key>Draws</key>
+					<string>NO</string>
+				</dict>
+			</dict>
+			<key>Text</key>
+			<dict>
+				<key>Text</key>
+				<string>{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf410
+{\fonttbl\f0\fswiss\fcharset77 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural
+
+\f0\fs24 \cf0 Jifty Action:\
+Ping}</string>
+			</dict>
+		</dict>
+		<dict>
+			<key>Class</key>
+			<string>LineGraphic</string>
+			<key>ID</key>
+			<integer>34</integer>
+			<key>Points</key>
+			<array>
+				<string>{65, 690}</string>
+				<string>{68.5352, 553}</string>
+			</array>
+			<key>Style</key>
+			<dict>
+				<key>stroke</key>
+				<dict>
+					<key>HeadArrow</key>
+					<string>FilledArrow</string>
+					<key>TailArrow</key>
+					<string>0</string>
+				</dict>
+			</dict>
+		</dict>
+		<dict>
+			<key>Bounds</key>
+			<string>{{39, 693.868}, {1051.46, 54}}</string>
+			<key>Class</key>
+			<string>ShapedGraphic</string>
+			<key>ID</key>
+			<integer>31</integer>
+			<key>Shape</key>
+			<string>Rectangle</string>
+			<key>Text</key>
+			<dict>
+				<key>Text</key>
+				<string>{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf410
+{\fonttbl\f0\fswiss\fcharset77 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural
+
+\f0\fs24 \cf0 Client Browser}</string>
+			</dict>
+		</dict>
+		<dict>
+			<key>Bounds</key>
+			<string>{{470.033, 293.501}, {88.9045, 42}}</string>
+			<key>Class</key>
+			<string>ShapedGraphic</string>
+			<key>FitText</key>
+			<string>Vertical</string>
+			<key>FontInfo</key>
+			<dict>
+				<key>Color</key>
+				<dict>
+					<key>w</key>
+					<string>0</string>
+				</dict>
+				<key>Font</key>
+				<string>Helvetica</string>
+				<key>Size</key>
+				<real>12</real>
+			</dict>
+			<key>ID</key>
+			<integer>29</integer>
+			<key>Line</key>
+			<dict>
+				<key>ID</key>
+				<integer>28</integer>
+				<key>Position</key>
+				<real>0.59332269430160522</real>
+				<key>RotationType</key>
+				<integer>0</integer>
+			</dict>
+			<key>Shape</key>
+			<string>Rectangle</string>
+			<key>Style</key>
+			<dict>
+				<key>shadow</key>
+				<dict>
+					<key>Draws</key>
+					<string>NO</string>
+				</dict>
+				<key>stroke</key>
+				<dict>
+					<key>Draws</key>
+					<string>NO</string>
+				</dict>
+			</dict>
+			<key>Text</key>
+			<dict>
+				<key>Text</key>
+				<string>{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf410
+{\fonttbl\f0\fswiss\fcharset77 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural
+
+\f0\fs24 \cf0 Publishes to \
+Channel \
+"$SERVER"}</string>
+			</dict>
+			<key>Wrap</key>
+			<string>YES</string>
+		</dict>
+		<dict>
+			<key>Class</key>
+			<string>LineGraphic</string>
+			<key>ID</key>
+			<integer>28</integer>
+			<key>Points</key>
+			<array>
+				<string>{514.486, 247.455}</string>
+				<string>{514.486, 360.455}</string>
+			</array>
+			<key>Style</key>
+			<dict>
+				<key>stroke</key>
+				<dict>
+					<key>HeadArrow</key>
+					<string>FilledArrow</string>
+					<key>TailArrow</key>
+					<string>0</string>
+				</dict>
+			</dict>
+		</dict>
+		<dict>
+			<key>Bounds</key>
+			<string>{{44.4648, 205.059}, {907.535, 36}}</string>
+			<key>Class</key>
+			<string>ShapedGraphic</string>
+			<key>FontInfo</key>
+			<dict>
+				<key>Color</key>
+				<dict>
+					<key>w</key>
+					<string>0</string>
+				</dict>
+				<key>Font</key>
+				<string>Helvetica</string>
+				<key>NSKern</key>
+				<real>0.0</real>
+				<key>Size</key>
+				<real>12</real>
+			</dict>
+			<key>ID</key>
+			<integer>27</integer>
+			<key>Shape</key>
+			<string>Rectangle</string>
+			<key>Style</key>
+			<dict>
+				<key>fill</key>
+				<dict>
+					<key>GradientColor</key>
+					<dict>
+						<key>w</key>
+						<string>0.666667</string>
+					</dict>
+				</dict>
+			</dict>
+			<key>Text</key>
+			<dict>
+				<key>Text</key>
+				<string>{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf410
+{\fonttbl\f0\fswiss\fcharset77 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural
+
+\f0\fs24 \cf0 Republisher}</string>
+			</dict>
+		</dict>
+		<dict>
+			<key>Class</key>
+			<string>LineGraphic</string>
+			<key>ID</key>
+			<integer>24</integer>
+			<key>Points</key>
+			<array>
+				<string>{458.117, 88.7247}</string>
+				<string>{458.652, 199.725}</string>
+			</array>
+			<key>Style</key>
+			<dict>
+				<key>stroke</key>
+				<dict>
+					<key>HeadArrow</key>
+					<string>FilledArrow</string>
+					<key>TailArrow</key>
+					<string>0</string>
+				</dict>
+			</dict>
+		</dict>
+		<dict>
+			<key>Bounds</key>
+			<string>{{174, 29.3902}, {410.773, 59.5743}}</string>
+			<key>Class</key>
+			<string>ShapedGraphic</string>
+			<key>FontInfo</key>
+			<dict>
+				<key>Color</key>
+				<dict>
+					<key>w</key>
+					<string>0</string>
+				</dict>
+				<key>Font</key>
+				<string>Helvetica</string>
+				<key>NSKern</key>
+				<real>0.0</real>
+				<key>Size</key>
+				<real>12</real>
+			</dict>
+			<key>ID</key>
+			<integer>4</integer>
+			<key>Shape</key>
+			<string>Rectangle</string>
+			<key>Style</key>
+			<dict>
+				<key>fill</key>
+				<dict>
+					<key>GradientColor</key>
+					<dict>
+						<key>w</key>
+						<string>0.666667</string>
+					</dict>
+				</dict>
+			</dict>
+			<key>Text</key>
+			<dict>
+				<key>Text</key>
+				<string>{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf410
+{\fonttbl\f0\fswiss\fcharset77 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural
+
+\f0\fs24 \cf0 Server $SERVER}</string>
+			</dict>
+		</dict>
+		<dict>
+			<key>Class</key>
+			<string>LineGraphic</string>
+			<key>Head</key>
+			<dict>
+				<key>ID</key>
+				<integer>4</integer>
+			</dict>
+			<key>ID</key>
+			<integer>22</integer>
+			<key>Points</key>
+			<array>
+				<string>{129.731, 504.727}</string>
+				<string>{-23, 405}</string>
+				<string>{344.348, 89.2904}</string>
+			</array>
+			<key>Style</key>
+			<dict>
+				<key>stroke</key>
+				<dict>
+					<key>HeadArrow</key>
+					<string>FilledArrow</string>
+					<key>LineType</key>
+					<integer>1</integer>
+					<key>TailArrow</key>
+					<string>0</string>
+				</dict>
+			</dict>
+			<key>Tail</key>
+			<dict>
+				<key>ID</key>
+				<integer>74</integer>
+			</dict>
+		</dict>
+		<dict>
+			<key>Bounds</key>
+			<string>{{65, 502}, {340.944, 59.5743}}</string>
+			<key>Class</key>
+			<string>ShapedGraphic</string>
+			<key>ID</key>
+			<integer>79</integer>
+			<key>Shape</key>
+			<string>Rectangle</string>
+		</dict>
+		<dict>
+			<key>Bounds</key>
+			<string>{{45.4648, 490.194}, {907.535, 54}}</string>
+			<key>Class</key>
+			<string>ShapedGraphic</string>
+			<key>ID</key>
+			<integer>32</integer>
+			<key>Shape</key>
+			<string>Rectangle</string>
+			<key>Text</key>
+			<dict>
+				<key>Text</key>
+				<string>{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf410
+{\fonttbl\f0\fswiss\fcharset77 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural
+
+\f0\fs24 \cf0 Jifty Server}</string>
+			</dict>
+		</dict>
+	</array>
+	<key>GridInfo</key>
+	<dict/>
+	<key>GuidesLocked</key>
+	<string>NO</string>
+	<key>GuidesVisible</key>
+	<string>YES</string>
+	<key>HPages</key>
+	<integer>2</integer>
+	<key>ImageCounter</key>
+	<integer>1</integer>
+	<key>IsPalette</key>
+	<string>NO</string>
+	<key>KeepToScale</key>
+	<false/>
+	<key>Layers</key>
+	<array>
+		<dict>
+			<key>Lock</key>
+			<string>NO</string>
+			<key>Name</key>
+			<string>Layer 1</string>
+			<key>Print</key>
+			<string>YES</string>
+			<key>View</key>
+			<string>YES</string>
+		</dict>
+	</array>
+	<key>LayoutInfo</key>
+	<dict>
+		<key>LayoutTarget</key>
+		<integer>3</integer>
+	</dict>
+	<key>LinksVisible</key>
+	<string>NO</string>
+	<key>MagnetsVisible</key>
+	<string>NO</string>
+	<key>MasterSheet</key>
+	<string>Master 1</string>
+	<key>MasterSheets</key>
+	<array>
+		<dict>
+			<key>ActiveLayerIndex</key>
+			<integer>0</integer>
+			<key>AutoAdjust</key>
+			<true/>
+			<key>CanvasColor</key>
+			<dict>
+				<key>w</key>
+				<string>1</string>
+			</dict>
+			<key>CanvasOrigin</key>
+			<string>{0, 0}</string>
+			<key>CanvasScale</key>
+			<real>1</real>
+			<key>ColumnAlign</key>
+			<integer>1</integer>
+			<key>ColumnSpacing</key>
+			<real>36</real>
+			<key>DisplayScale</key>
+			<string>1 in = 1 in</string>
+			<key>GraphicsList</key>
+			<array/>
+			<key>GridInfo</key>
+			<dict/>
+			<key>HPages</key>
+			<integer>1</integer>
+			<key>IsPalette</key>
+			<string>NO</string>
+			<key>KeepToScale</key>
+			<false/>
+			<key>Layers</key>
+			<array>
+				<dict>
+					<key>Lock</key>
+					<string>NO</string>
+					<key>Name</key>
+					<string>Layer 1</string>
+					<key>Print</key>
+					<string>YES</string>
+					<key>View</key>
+					<string>YES</string>
+				</dict>
+			</array>
+			<key>LayoutInfo</key>
+			<dict>
+				<key>LayoutTarget</key>
+				<integer>3</integer>
+			</dict>
+			<key>Orientation</key>
+			<integer>2</integer>
+			<key>OutlineStyle</key>
+			<string>Basic</string>
+			<key>RowAlign</key>
+			<integer>1</integer>
+			<key>RowSpacing</key>
+			<real>36</real>
+			<key>SheetTitle</key>
+			<string>Master 1</string>
+			<key>UniqueID</key>
+			<integer>1</integer>
+			<key>VPages</key>
+			<integer>1</integer>
+		</dict>
+	</array>
+	<key>ModificationDate</key>
+	<string>2006-10-24 15:25:32 -0700</string>
+	<key>Modifier</key>
+	<string>Jesse Vincent</string>
+	<key>NotesVisible</key>
+	<string>NO</string>
+	<key>Orientation</key>
+	<integer>2</integer>
+	<key>OriginVisible</key>
+	<string>NO</string>
+	<key>OutlineStyle</key>
+	<string>Basic</string>
+	<key>PageBreaks</key>
+	<string>YES</string>
+	<key>PrintInfo</key>
+	<dict>
+		<key>NSBottomMargin</key>
+		<array>
+			<string>float</string>
+			<string>0</string>
+		</array>
+		<key>NSLeftMargin</key>
+		<array>
+			<string>float</string>
+			<string>0</string>
+		</array>
+		<key>NSRightMargin</key>
+		<array>
+			<string>float</string>
+			<string>0</string>
+		</array>
+		<key>NSTopMargin</key>
+		<array>
+			<string>float</string>
+			<string>0</string>
+		</array>
+	</dict>
+	<key>ReadOnly</key>
+	<string>NO</string>
+	<key>RowAlign</key>
+	<integer>1</integer>
+	<key>RowSpacing</key>
+	<real>36</real>
+	<key>SheetTitle</key>
+	<string>Canvas 1</string>
+	<key>SmartAlignmentGuidesActive</key>
+	<string>YES</string>
+	<key>SmartDistanceGuidesActive</key>
+	<string>YES</string>
+	<key>UniqueID</key>
+	<integer>1</integer>
+	<key>UseEntirePage</key>
+	<true/>
+	<key>VPages</key>
+	<integer>1</integer>
+	<key>WindowInfo</key>
+	<dict>
+		<key>CurrentSheet</key>
+		<string>0</string>
+		<key>DrawerOpen</key>
+		<true/>
+		<key>DrawerTab</key>
+		<string>Outline</string>
+		<key>DrawerWidth</key>
+		<real>209</real>
+		<key>FitInWindow</key>
+		<false/>
+		<key>Frame</key>
+		<string>{{0, 0}, {1680, 1072}}</string>
+		<key>ShowRuler</key>
+		<false/>
+		<key>ShowStatusBar</key>
+		<true/>
+		<key>VisibleRegion</key>
+		<string>{{-250, -92}, {1665, 958}}</string>
+		<key>Zoom</key>
+		<string>1</string>
+	</dict>
+</dict>
+</plist>

Added: jifty/trunk/doc/pubsub/system_architecture.png
==============================================================================
Binary file. No diff available.

Added: jifty/trunk/examples/Chat/Makefile.PL
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Chat/Makefile.PL	Fri Oct 27 04:12:29 2006
@@ -0,0 +1,6 @@
+use inc::Module::Install;
+name('Clock');
+version('0.01');
+requires('Jifty' => '0.60912');
+
+WriteAll;

Added: jifty/trunk/examples/Chat/bin/jifty
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Chat/bin/jifty	Fri Oct 27 04:12:29 2006
@@ -0,0 +1,15 @@
+#!/usr/bin/env perl
+use warnings;
+use strict;
+use File::Basename qw(dirname); 
+use UNIVERSAL::require;
+
+BEGIN {
+    Jifty::Util->require or die $UNIVERSAL::require::ERROR;
+    my $root = Jifty::Util->app_root;
+    unshift @INC, "$root/lib" if ($root);
+}
+
+use Jifty::Script;
+$SIG{INT} = $SIG{TERM} = sub { warn "Stopped\n"; exit; };
+Jifty::Script->dispatch();

Added: jifty/trunk/examples/Chat/etc/config.yml
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Chat/etc/config.yml	Fri Oct 27 04:12:29 2006
@@ -0,0 +1,37 @@
+---
+framework:
+  AdminMode: 0
+  ApplicationClass: Chat
+  ApplicationName: Chat
+  PubSub:
+    Enable: 1
+  Database:
+    CheckSchema: 1
+    Database: chat
+    Driver: SQLite
+    Host: localhost
+    Password: ''
+    RecordBaseClass: Jifty::DBI::Record::Cachable
+    User: ''
+    Version: 0.0.1
+  DevelMode: 0
+  L10N:
+    PoDir: share/po
+  LogLevel: INFO
+  Mailer: Sendmail
+  MailerArgs: []
+  Plugins: []
+  Web:
+    BaseURL: http://localhost
+    DataDir: var/mason
+    Globals: []
+    MasonConfig:
+      autoflush: 0
+      default_escape_flags: h
+      error_format: text
+      error_mode: fatal
+    Port: 8888
+    ServeStaticFiles: 1
+    StaticRoot: share/web/static
+    TemplateRoot: share/web/templates
+    ServerClass: Chat::Server

Added: jifty/trunk/examples/Chat/lib/Chat/Action/Send.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Chat/lib/Chat/Action/Send.pm	Fri Oct 27 04:12:29 2006
@@ -0,0 +1,14 @@
+package Chat::Action::Send;
+use warnings;
+use strict;
+
+use Jifty::Param::Schema;
+use Jifty::Action schema {
+    param message => label is 'Say something witty:', type is 'text';
+};
+
+sub take_action {
+    my $self = shift;
+    Chat::Event::Message->new( { message => $self->argument_value('message') } )->publish;
+}
+1;

Added: jifty/trunk/examples/Chat/lib/Chat/Event/Message.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Chat/lib/Chat/Event/Message.pm	Fri Oct 27 04:12:29 2006
@@ -0,0 +1,6 @@
+package Chat::Event::Message;
+use strict;
+use warnings;
+use base 'Chat::Event';
+
+1;

Added: jifty/trunk/examples/Chat/lib/Chat/Server.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Chat/lib/Chat/Server.pm	Fri Oct 27 04:12:29 2006
@@ -0,0 +1,6 @@
+package Chat::Server;
+use base 'Jifty::Server';
+
+sub net_server { 'Net::Server::Fork' }
+
+1;

Added: jifty/trunk/examples/Chat/share/web/templates/fragments/message
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Chat/share/web/templates/fragments/message	Fri Oct 27 04:12:29 2006
@@ -0,0 +1 @@
+<div><% ${$ARGS{event}}->{message} %></div>

Added: jifty/trunk/examples/Chat/share/web/templates/fragments/sender
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Chat/share/web/templates/fragments/sender	Fri Oct 27 04:12:29 2006
@@ -0,0 +1,10 @@
+<%init>
+my $action = Jifty->web->new_action(class=>'Send');
+</%init>
+<%Jifty->web->form->start%>
+<% $action->form_field('message') %>
+<% Jifty->web->form->submit(onclick => [  
+        {submit => $action} ,
+        {refresh_self => 1} ])
+%>
+<%Jifty->web->form->end%>

Added: jifty/trunk/examples/Chat/share/web/templates/index.html
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Chat/share/web/templates/index.html	Fri Oct 27 04:12:29 2006
@@ -0,0 +1,12 @@
+<&| /_elements/wrapper, title => "Jifty chat server", subtitle => "" &>
+<% Jifty::Web::PageRegion->new( name => "message", path => '/__jifty/empty',)->render %>
+<% Jifty::Web::PageRegion->new( name => "sender", path => '/fragments/sender',)->render %>
+</&>
+<%init>
+Jifty->subs->add(
+    class       => 'Message',
+    mode        => 'Bottom',
+    region      => "message",
+    render_with => '/fragments/message',
+);
+</%init>

Added: jifty/trunk/examples/Clock/Makefile.PL
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Clock/Makefile.PL	Fri Oct 27 04:12:29 2006
@@ -0,0 +1,6 @@
+use inc::Module::Install;
+name('Clock');
+version('0.01');
+requires('Jifty' => '0.60912');
+
+WriteAll;

Added: jifty/trunk/examples/Clock/bin/jifty
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Clock/bin/jifty	Fri Oct 27 04:12:29 2006
@@ -0,0 +1,15 @@
+#!/usr/bin/env perl
+use warnings;
+use strict;
+use File::Basename qw(dirname); 
+use UNIVERSAL::require;
+
+BEGIN {
+    Jifty::Util->require or die $UNIVERSAL::require::ERROR;
+    my $root = Jifty::Util->app_root;
+    unshift @INC, "$root/lib" if ($root);
+}
+
+use Jifty::Script;
+$SIG{INT} = $SIG{TERM} = sub { warn "Stopped\n"; exit; };
+Jifty::Script->dispatch();

Added: jifty/trunk/examples/Clock/clockserv.pl
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Clock/clockserv.pl	Fri Oct 27 04:12:29 2006
@@ -0,0 +1,21 @@
+use strict;
+use lib 'lib';
+use Time::HiRes qw( time sleep );
+use Jifty;
+
+BEGIN { Jifty->new };
+
+sub ping {
+    my ($class, $sub) = @_;
+    while (1) {
+        my $new_time = time;
+        warn "Time: $new_time\n";
+        Clock::Event::Tick->new($new_time)->publish;
+        sleep 0.5;
+    }
+    exit;
+}
+
+ping();
+
+1;

Added: jifty/trunk/examples/Clock/etc/config.yml
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Clock/etc/config.yml	Fri Oct 27 04:12:29 2006
@@ -0,0 +1,35 @@
+---
+framework:
+  AdminMode: 1
+  ApplicationClass: Clock
+  ApplicationName: Clock
+  Database:
+    CheckSchema: 1
+    Database: clock
+    Driver: SQLite
+    Host: localhost
+    Password: ''
+    RecordBaseClass: Jifty::DBI::Record::Cachable
+    User: ''
+    Version: 0.0.1
+  DevelMode: 1
+  L10N:
+    PoDir: share/po
+  LogLevel: INFO
+  Mailer: Sendmail
+  MailerArgs: []
+  Plugins: []
+  Web:
+    BaseURL: http://localhost
+    DataDir: var/mason
+    Globals: []
+    MasonConfig:
+      autoflush: 0
+      default_escape_flags: h
+      error_format: text
+      error_mode: fatal
+    Port: 8888
+    ServeStaticFiles: 1
+    StaticRoot: share/web/static
+    TemplateRoot: share/web/templates
+    ServerClass: Clock::Server

Added: jifty/trunk/examples/Clock/lib/Clock/Event/Tick.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Clock/lib/Clock/Event/Tick.pm	Fri Oct 27 04:12:29 2006
@@ -0,0 +1,15 @@
+package Clock::Event::Tick;
+use strict;
+use warnings;
+use base 'Clock::Event';
+
+sub match {
+    my $self    = shift;
+    my $query   = shift;
+    if (my $like = $query->{like}) {
+        return(index($$self, $like) >= 0);
+    }
+    return 1;
+}
+
+1;

Added: jifty/trunk/examples/Clock/lib/Clock/Server.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Clock/lib/Clock/Server.pm	Fri Oct 27 04:12:29 2006
@@ -0,0 +1,6 @@
+package Clock::Server;
+use base 'Jifty::Server';
+
+sub net_server { 'Net::Server::Fork' }
+
+1;

Added: jifty/trunk/examples/Clock/share/web/templates/fragments/time
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Clock/share/web/templates/fragments/time	Fri Oct 27 04:12:29 2006
@@ -0,0 +1,4 @@
+<span><% $$event %></span>
+<%ARGS>
+$event
+</%ARGS>

Added: jifty/trunk/examples/Clock/share/web/templates/index.html
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Clock/share/web/templates/index.html	Fri Oct 27 04:12:29 2006
@@ -0,0 +1,36 @@
+<&| /_elements/wrapper, title => "Hi", subtitle => "Welcome" &>
+<table>
+<tr><td>
+Full: <% $region->render %>
+</td><td>
+Filtered: <% $region_filtered->render %>
+</td></tr>
+</table>
+</&>
+<%init>
+my $region = Jifty::Web::PageRegion->new(
+    name => "clock-time",
+    path => '/__jifty/empty',
+);
+my $region_filtered = Jifty::Web::PageRegion->new(
+    name => "clock-filtered",
+    path => '/__jifty/empty',
+);
+
+Jifty->subs->add(
+  # window_id   => 'random scope',
+    class       => 'Tick',
+    mode        => 'Replace',
+    region      => "clock-time",
+    render_with => '/fragments/time',
+);
+
+Jifty->subs->add(
+  # window_id   => 'random scope',
+    class       => 'Tick',
+    queries     => [{ like => '9' }],
+    mode        => 'Replace',
+    region      => "clock-filtered",
+    render_with => '/fragments/time',
+);
+</%init>

Added: jifty/trunk/examples/Ping/Makefile.PL
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Ping/Makefile.PL	Fri Oct 27 04:12:29 2006
@@ -0,0 +1,8 @@
+use inc::Module::Install;
+name('Ping');
+version('0.01');
+requires('Jifty' => '0.60912');
+requires('IPC::PubSub' => '0.11');
+requires('Net::Server' => 0);
+
+WriteAll;

Added: jifty/trunk/examples/Ping/Ping/Makefile.PL
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Ping/Ping/Makefile.PL	Fri Oct 27 04:12:29 2006
@@ -0,0 +1,8 @@
+use inc::Module::Install;
+name('Ping');
+version('0.01');
+requires('Jifty' => '0.60912');
+requires('IPC::PubSub' => '0.11');
+requires('Net::Server' => 0);
+
+WriteAll;

Added: jifty/trunk/examples/Ping/Ping/bin/jifty
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Ping/Ping/bin/jifty	Fri Oct 27 04:12:29 2006
@@ -0,0 +1,15 @@
+#!/usr/bin/env perl
+use warnings;
+use strict;
+use File::Basename qw(dirname); 
+use UNIVERSAL::require;
+
+BEGIN {
+    Jifty::Util->require or die $UNIVERSAL::require::ERROR;
+    my $root = Jifty::Util->app_root;
+    unshift @INC, "$root/lib" if ($root);
+}
+
+use Jifty::Script;
+$SIG{INT} = $SIG{TERM} = sub { warn "Stopped\n"; exit; };
+Jifty::Script->dispatch();

Added: jifty/trunk/examples/Ping/Ping/etc/config.yml
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Ping/Ping/etc/config.yml	Fri Oct 27 04:12:29 2006
@@ -0,0 +1,38 @@
+--- 
+framework: 
+  AdminMode: 1
+  ApplicationClass: Ping
+  ApplicationName: Ping
+  Database: 
+    CheckSchema: 1
+    Database: ping
+    Driver: SQLite
+    Host: localhost
+    Password: ''
+    RecordBaseClass: Jifty::DBI::Record::Cachable
+    User: ''
+    Version: 0.0.1
+  DevelMode: 0
+  L10N: 
+    PoDir: share/po
+  LogLevel: WARN
+  Mailer: Sendmail
+  MailerArgs: []
+
+  Plugins: []
+
+  Web: 
+    BaseURL: http://localhost
+    DataDir: var/mason
+    Globals: []
+
+    MasonConfig: 
+      autoflush: 0
+      default_escape_flags: h
+      error_format: text
+      error_mode: fatal
+    Port: 8888
+    ServeStaticFiles: 1
+    StaticRoot: share/web/static
+    TemplateRoot: share/web/templates
+    ServerClass: Ping::Server

Added: jifty/trunk/examples/Ping/Ping/lib/Ping/Action/AddPing.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Ping/Ping/lib/Ping/Action/AddPing.pm	Fri Oct 27 04:12:29 2006
@@ -0,0 +1,51 @@
+package Ping::Action::AddPing;
+use strict;
+use Jifty::Param::Schema;
+use Jifty::Action schema {
+
+param host =>
+    label is 'Hostname',
+    is mandatory;
+
+param only_failure =>
+    type is 'checkbox',
+    label is 'Failure only?',
+    hints is 'Show only failed pings to me.',
+    default is 0;
+
+};
+
+sub take_action {
+    my $self = shift;
+    my $host = $self->argument_value('host');
+    my $only_failure = $self->argument_value('only_failure');
+
+    Jifty->bus->modify(hosts => sub {
+        $_->{$host} ||= do {
+            if (my $pid = fork) {
+                $pid;
+            }
+            else {
+                exec($^X => "-Ilib", "-MPing::PingServer", "-e", "Ping::PingServer->ping('$host')");
+            }
+        }
+    });
+
+    my $id = Jifty->web->session->id;
+
+    Jifty->bus->modify("$id-ping" => sub {
+        my $sid = $_->{$host}; 
+        Jifty->subs->cancel($sid) if $sid;
+        $_->{$host} = Jifty->subs->add(
+            class       => 'Pong',
+            queries     => [{ host => $host }, $only_failure ? { fail => 1 } : ()],
+            mode        => 'Bottom',
+            region      => 'pong',
+            render_with => '/fragments/pong',
+        );
+    });
+
+    $self->result->message( "Added host: $host" );
+}
+
+1;

Added: jifty/trunk/examples/Ping/Ping/lib/Ping/Action/CancelPing.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Ping/Ping/lib/Ping/Action/CancelPing.pm	Fri Oct 27 04:12:29 2006
@@ -0,0 +1,25 @@
+package Ping::Action::CancelPing;
+use strict;
+use Jifty::Param::Schema;
+use Jifty::Action schema {
+
+param host =>
+    label is 'Hostname',
+    is mandatory;
+
+};
+
+sub take_action {
+    my $self = shift;
+    my $host = $self->argument_value('host');
+
+    my $id  = Jifty->web->session->id;
+    my $sid = Jifty->bus->modify("$id-ping" => sub {
+        delete($_->{$host})
+    });
+    Jifty->subs->cancel($sid);
+
+    $self->result->message( "Cancelled host: $host" );
+}
+
+1;

Added: jifty/trunk/examples/Ping/Ping/lib/Ping/Event/Pong.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Ping/Ping/lib/Ping/Event/Pong.pm	Fri Oct 27 04:12:29 2006
@@ -0,0 +1,25 @@
+package Ping::Event::Pong;
+use strict;
+use warnings;
+use base 'Ping::Event';
+
+sub match {
+    my $self    = shift;
+    my $query   = shift;
+
+    if ($query->{fail}) {
+        not $$self->{alive};
+    }
+    elsif (my $host = $query->{host}) {
+        $$self->{host} eq $host;
+    }
+    else {
+        1;
+    }
+}
+
+sub render_arguments {
+    %{$_[0]->data};
+}
+
+1;

Added: jifty/trunk/examples/Ping/Ping/lib/Ping/PingServer.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Ping/Ping/lib/Ping/PingServer.pm	Fri Oct 27 04:12:29 2006
@@ -0,0 +1,25 @@
+package Ping::PingServer;
+
+use Net::Ping;
+use Time::HiRes qw( time sleep );
+use Jifty;
+
+BEGIN { Jifty->new };
+
+sub ping {
+    my ($class, $host) = @_;
+    my $ping = Net::Ping->new(tcp => 1);
+    while (1) {
+        my $old_time = time;
+        my $alive = $ping->ping($host);
+        my $new_time = time;
+
+        Ping::Event::Pong->new(
+            { host => $host, alive => ($alive ? ($new_time - $old_time + 0.001) : 0), time => $new_time }
+        )->publish;
+        sleep 1;
+    }
+    exit;
+}
+
+1;

Added: jifty/trunk/examples/Ping/Ping/lib/Ping/Server.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Ping/Ping/lib/Ping/Server.pm	Fri Oct 27 04:12:29 2006
@@ -0,0 +1,7 @@
+package Ping::Server;
+use base 'Jifty::Server';
+use IO::Socket::INET;
+
+sub net_server { 'Net::Server::Fork' }
+
+1;

Added: jifty/trunk/examples/Ping/Ping/share/web/templates/fragments/pong
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Ping/Ping/share/web/templates/fragments/pong	Fri Oct 27 04:12:29 2006
@@ -0,0 +1,23 @@
+<%init>
+my $res = Jifty::Result->new;
+my $tm  = scalar localtime($time);
+if ($alive) {
+    $res->message( "Pong: $host ($tm)" ); # - $alive ($tm)" );
+}
+else {
+    $res->error( "Fail: $host ($tm)" ); # ($tm)" );
+}
+Jifty->web->response->{results} = {};
+Jifty->web->response->result("~$tm~$host" => $res);
+print  Jifty->web->render_messages;
+Jifty->web->response->{results} = {};
+</%init>
+<script>
+var objDiv = document.getElementById('pushed');
+objDiv.scrollTop = objDiv.scrollHeight;
+</script>
+<%args>
+$time
+$host
+$alive
+</%args>

Added: jifty/trunk/examples/Ping/Ping/share/web/templates/index.html
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Ping/Ping/share/web/templates/index.html	Fri Oct 27 04:12:29 2006
@@ -0,0 +1,50 @@
+<&|/_elements/wrapper, title => 'Ping for ' . Jifty->web->session->id &>
+
+<div id="pushed" style="overflow: scroll; width: 100%; height: 250px" >
+        <% $region->render %>
+</div>
+
+<table width="80%"><tr valign="top"><td>
+<fieldset>
+<legend>New Pings</legend>
+% my $form = Jifty->web->form->new(name => 'new');
+<% $form->start %>
+<% $action->form_field('host') %>
+<% $action->form_field('only_failure')%>
+<% $form->submit( label => 'Start' )%>
+<% $form->end %>
+</fieldset>
+% my $id = Jifty->web->session->id;
+% my $pings = Jifty->bus->modify("$id-ping") || {};
+% if (my @subs = keys %$pings) {
+</td><td>
+<fieldset>
+<legend>Current Pings</legend>
+<table width="100%">
+% foreach my $sub (@subs) {
+% $form = Jifty->web->form->new(name => $sub);
+<% $form->start %>
+%    my $del = Jifty->web->new_action(class => 'CancelPing', arguments => { host => $sub });
+<tr><td>
+<% $del->form_field('host', render_as => 'Hidden', default_value => $sub) %>
+<% $sub %>
+</td><td>
+<% $form->submit( label => 'Stop' )%>
+<% $form->end %>
+</td></tr>
+% }
+</table>
+</fieldset>
+% }
+</td></tr></table>
+<script>new Jifty.Subs({}).start();</script>
+</&>
+
+<%init>
+my $action = Jifty->web->new_action(class => 'AddPing');
+my $region = Jifty::Web::PageRegion->new(
+    name => 'pong',
+    path => '/__jifty/empty',
+);
+
+</%init>

Added: jifty/trunk/examples/Ping/Ping/t/00compile.t
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Ping/Ping/t/00compile.t	Fri Oct 27 04:12:29 2006
@@ -0,0 +1,22 @@
+#!/usr/bin/perl -w
+
+use Test::More;
+
+use File::Find;
+
+my @modules;
+find sub {
+    return unless /\.pm$/;
+    push @modules, $File::Find::name;
+}, "lib";
+
+ at modules = map { s[^lib/][];  $_ =~ s[.pm$][];  $_ =~ s[/][::]g; $_ } @modules;
+
+plan tests => scalar @modules;
+
+# Ping::PingServer will not compile without a schema.
+system "bin/jifty schema --setup";
+
+for my $module (@modules) {
+    require_ok $module;
+}

Added: jifty/trunk/examples/Ping/Ping/t/01startup.t
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Ping/Ping/t/01startup.t	Fri Oct 27 04:12:29 2006
@@ -0,0 +1,13 @@
+#!/usr/bin/perl -w
+
+use Jifty::Test 'no_plan';
+use Jifty::Test::WWW::Mechanize;
+
+# Startup the ping server.
+my $server = Jifty::Test->make_server;
+isa_ok($server, 'Jifty::Server');
+
+my $URL = $server->started_ok;
+my $mech = Jifty::Test::WWW::Mechanize->new;
+
+$mech->get_ok("$URL", "got the front page");

Added: jifty/trunk/examples/Ping/bin/jifty
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Ping/bin/jifty	Fri Oct 27 04:12:29 2006
@@ -0,0 +1,15 @@
+#!/usr/bin/env perl
+use warnings;
+use strict;
+use File::Basename qw(dirname); 
+use UNIVERSAL::require;
+
+BEGIN {
+    Jifty::Util->require or die $UNIVERSAL::require::ERROR;
+    my $root = Jifty::Util->app_root;
+    unshift @INC, "$root/lib" if ($root);
+}
+
+use Jifty::Script;
+$SIG{INT} = $SIG{TERM} = sub { warn "Stopped\n"; exit; };
+Jifty::Script->dispatch();

Added: jifty/trunk/examples/Ping/etc/config.yml
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Ping/etc/config.yml	Fri Oct 27 04:12:29 2006
@@ -0,0 +1,38 @@
+--- 
+framework: 
+  AdminMode: 1
+  ApplicationClass: Ping
+  ApplicationName: Ping
+  Database: 
+    CheckSchema: 1
+    Database: ping
+    Driver: SQLite
+    Host: localhost
+    Password: ''
+    RecordBaseClass: Jifty::DBI::Record::Cachable
+    User: ''
+    Version: 0.0.1
+  DevelMode: 0
+  L10N: 
+    PoDir: share/po
+  LogLevel: WARN
+  Mailer: Sendmail
+  MailerArgs: []
+
+  Plugins: []
+
+  Web: 
+    BaseURL: http://localhost
+    DataDir: var/mason
+    Globals: []
+
+    MasonConfig: 
+      autoflush: 0
+      default_escape_flags: h
+      error_format: text
+      error_mode: fatal
+    Port: 8888
+    ServeStaticFiles: 1
+    StaticRoot: share/web/static
+    TemplateRoot: share/web/templates
+    ServerClass: Ping::Server

Added: jifty/trunk/examples/Ping/lib/Ping/Action/AddPing.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Ping/lib/Ping/Action/AddPing.pm	Fri Oct 27 04:12:29 2006
@@ -0,0 +1,51 @@
+package Ping::Action::AddPing;
+use strict;
+use Jifty::Param::Schema;
+use Jifty::Action schema {
+
+param host =>
+    label is 'Hostname',
+    is mandatory;
+
+param only_failure =>
+    type is 'checkbox',
+    label is 'Failure only?',
+    hints is 'Show only failed pings to me.',
+    default is 0;
+
+};
+
+sub take_action {
+    my $self = shift;
+    my $host = $self->argument_value('host');
+    my $only_failure = $self->argument_value('only_failure');
+
+    Jifty->bus->modify(hosts => sub {
+        $_->{$host} ||= do {
+            if (my $pid = fork) {
+                $pid;
+            }
+            else {
+                exec($^X => "-Ilib", "-MPing::PingServer", "-e", "Ping::PingServer->ping('$host')");
+            }
+        }
+    });
+
+    my $id = Jifty->web->session->id;
+
+    Jifty->bus->modify("$id-ping" => sub {
+        my $sid = $_->{$host}; 
+        Jifty->subs->cancel($sid) if $sid;
+        $_->{$host} = Jifty->subs->add(
+            class       => 'Pong',
+            queries     => [{ host => $host }, $only_failure ? { fail => 1 } : ()],
+            mode        => 'Bottom',
+            region      => 'pong',
+            render_with => '/fragments/pong',
+        );
+    });
+
+    $self->result->message( "Added host: $host" );
+}
+
+1;

Added: jifty/trunk/examples/Ping/lib/Ping/Action/CancelPing.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Ping/lib/Ping/Action/CancelPing.pm	Fri Oct 27 04:12:29 2006
@@ -0,0 +1,25 @@
+package Ping::Action::CancelPing;
+use strict;
+use Jifty::Param::Schema;
+use Jifty::Action schema {
+
+param host =>
+    label is 'Hostname',
+    is mandatory;
+
+};
+
+sub take_action {
+    my $self = shift;
+    my $host = $self->argument_value('host');
+
+    my $id  = Jifty->web->session->id;
+    my $sid = Jifty->bus->modify("$id-ping" => sub {
+        delete($_->{$host})
+    });
+    Jifty->subs->cancel($sid);
+
+    $self->result->message( "Cancelled host: $host" );
+}
+
+1;

Added: jifty/trunk/examples/Ping/lib/Ping/Event/Pong.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Ping/lib/Ping/Event/Pong.pm	Fri Oct 27 04:12:29 2006
@@ -0,0 +1,25 @@
+package Ping::Event::Pong;
+use strict;
+use warnings;
+use base 'Ping::Event';
+
+sub match {
+    my $self    = shift;
+    my $query   = shift;
+
+    if ($query->{fail}) {
+        not $$self->{alive};
+    }
+    elsif (my $host = $query->{host}) {
+        $$self->{host} eq $host;
+    }
+    else {
+        1;
+    }
+}
+
+sub render_arguments {
+    %{$_[0]->data};
+}
+
+1;

Added: jifty/trunk/examples/Ping/lib/Ping/PingServer.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Ping/lib/Ping/PingServer.pm	Fri Oct 27 04:12:29 2006
@@ -0,0 +1,25 @@
+package Ping::PingServer;
+
+use Net::Ping;
+use Time::HiRes qw( time sleep );
+use Jifty;
+
+BEGIN { Jifty->new };
+
+sub ping {
+    my ($class, $host) = @_;
+    my $ping = Net::Ping->new(tcp => 1);
+    while (1) {
+        my $old_time = time;
+        my $alive = $ping->ping($host);
+        my $new_time = time;
+
+        Ping::Event::Pong->new(
+            { host => $host, alive => ($alive ? ($new_time - $old_time + 0.001) : 0), time => $new_time }
+        )->publish;
+        sleep 1;
+    }
+    exit;
+}
+
+1;

Added: jifty/trunk/examples/Ping/lib/Ping/Server.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Ping/lib/Ping/Server.pm	Fri Oct 27 04:12:29 2006
@@ -0,0 +1,7 @@
+package Ping::Server;
+use base 'Jifty::Server';
+use IO::Socket::INET;
+
+sub net_server { 'Net::Server::Fork' }
+
+1;

Added: jifty/trunk/examples/Ping/share/web/templates/fragments/pong
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Ping/share/web/templates/fragments/pong	Fri Oct 27 04:12:29 2006
@@ -0,0 +1,23 @@
+<%init>
+my $res = Jifty::Result->new;
+my $tm  = scalar localtime($time);
+if ($alive) {
+    $res->message( "Pong: $host ($tm)" ); # - $alive ($tm)" );
+}
+else {
+    $res->error( "Fail: $host ($tm)" ); # ($tm)" );
+}
+Jifty->web->response->{results} = {};
+Jifty->web->response->result("~$tm~$host" => $res);
+print  Jifty->web->render_messages;
+Jifty->web->response->{results} = {};
+</%init>
+<script>
+var objDiv = document.getElementById('pushed');
+objDiv.scrollTop = objDiv.scrollHeight;
+</script>
+<%args>
+$time
+$host
+$alive
+</%args>

Added: jifty/trunk/examples/Ping/share/web/templates/index.html
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Ping/share/web/templates/index.html	Fri Oct 27 04:12:29 2006
@@ -0,0 +1,50 @@
+<&|/_elements/wrapper, title => 'Ping for ' . Jifty->web->session->id &>
+
+<div id="pushed" style="overflow: scroll; width: 100%; height: 250px" >
+        <% $region->render %>
+</div>
+
+<table width="80%"><tr valign="top"><td>
+<fieldset>
+<legend>New Pings</legend>
+% my $form = Jifty->web->form->new(name => 'new');
+<% $form->start %>
+<% $action->form_field('host') %>
+<% $action->form_field('only_failure')%>
+<% $form->submit( label => 'Start' )%>
+<% $form->end %>
+</fieldset>
+% my $id = Jifty->web->session->id;
+% my $pings = Jifty->bus->modify("$id-ping") || {};
+% if (my @subs = keys %$pings) {
+</td><td>
+<fieldset>
+<legend>Current Pings</legend>
+<table width="100%">
+% foreach my $sub (@subs) {
+% $form = Jifty->web->form->new(name => $sub);
+<% $form->start %>
+%    my $del = Jifty->web->new_action(class => 'CancelPing', arguments => { host => $sub });
+<tr><td>
+<% $del->form_field('host', render_as => 'Hidden', default_value => $sub) %>
+<% $sub %>
+</td><td>
+<% $form->submit( label => 'Stop' )%>
+<% $form->end %>
+</td></tr>
+% }
+</table>
+</fieldset>
+% }
+</td></tr></table>
+<script>new Jifty.Subs({}).start();</script>
+</&>
+
+<%init>
+my $action = Jifty->web->new_action(class => 'AddPing');
+my $region = Jifty::Web::PageRegion->new(
+    name => 'pong',
+    path => '/__jifty/empty',
+);
+
+</%init>

Added: jifty/trunk/examples/Ping/t/00compile.t
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Ping/t/00compile.t	Fri Oct 27 04:12:29 2006
@@ -0,0 +1,22 @@
+#!/usr/bin/perl -w
+
+use Test::More;
+
+use File::Find;
+
+my @modules;
+find sub {
+    return unless /\.pm$/;
+    push @modules, $File::Find::name;
+}, "lib";
+
+ at modules = map { s[^lib/][];  $_ =~ s[.pm$][];  $_ =~ s[/][::]g; $_ } @modules;
+
+plan tests => scalar @modules;
+
+# Ping::PingServer will not compile without a schema.
+system "bin/jifty schema --setup";
+
+for my $module (@modules) {
+    require_ok $module;
+}

Added: jifty/trunk/examples/Ping/t/01startup.t
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Ping/t/01startup.t	Fri Oct 27 04:12:29 2006
@@ -0,0 +1,13 @@
+#!/usr/bin/perl -w
+
+use Jifty::Test 'no_plan';
+use Jifty::Test::WWW::Mechanize;
+
+# Startup the ping server.
+my $server = Jifty::Test->make_server;
+isa_ok($server, 'Jifty::Server');
+
+my $URL = $server->started_ok;
+my $mech = Jifty::Test::WWW::Mechanize->new;
+
+$mech->get_ok("$URL", "got the front page");

Modified: jifty/trunk/lib/Jifty/Config.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Config.pm	(original)
+++ jifty/trunk/lib/Jifty/Config.pm	Fri Oct 27 04:12:29 2006
@@ -242,7 +242,8 @@
             ApplicationName  => $app_name,
             LogLevel         => 'INFO',
             PubSub           => {
-                        Backend => 'Memcached',
+                Enable => undef,
+                Backend => 'Memcached',
                     },
             Database         => {
                 Database =>  $db_name,


More information about the Jifty-commit mailing list