From: Adam R. <Ad...@Kn...> - 2003-02-15 05:13:52
|
Additional comments... Actually, running pubsub_test.cgi from the command line has two other = server-side unit tests that don't work: 4. content transform: FAILED (Event payload wrong: Kragen Sittler at = ./pubsub_test.cgi line 916.) 5. evil characters in route-to URL: FAILED (bad result routing on = http://.../kn/what/apps/pubsub_test.cgi/1045279259_11347_1/evil_character= s_in_route_to_URL/1 -> = http://.../kn/what/apps/pubsub_test.cgi/1045279259_11347_1/evil_character= s_in_route_to_URL/2/../flurb: HTTP/1.0 500 Internal Server Error Diagnosis for #4 is that off-host routes aren't working properly. Diagnosis for #5 is that pubsub.py does not suffer from the "event = naming bug" that makes this test necessary for security in pubsub.cgi -- therefore, not = really a bug here. So to fix #1 and #4 below, off-host routes are needed in pubsub.py. = Probably the fastest way to get there is to (finally) start building the client = library, pubsublib.py : 1. Write a tunnel packet parser. 2. Write a simple response format decoder. 3. Implement asynchronous http post, which includes request queue. 4. Implement publish. 5. Implement subscribe, which includes dispatcher. 6. Implement unsubscribe, which is a recast of subscribe. 7. Implement connect and disconnect, to robustify subscribe. Other interesting items once that is done: 1. Python Tkinter Ping client. 2. Python Tkinter Chat client. 3. Off-host routes in pubsub.py. 4. Modify sitewatch app to use pubsublib.py. Note: can also modify it to use ping2's performance and/or = /kn_statistics. 5. Make a reaper.py which removes expired events. Note: this client can work for both pubsub.py and pubsub.cgi. I'm also thinking about checking some performance testing tools into the = distribution. That's all for now. Much to think about. Elvis is everywhere, Adam -----Original Message----- From: Adam Rifkin=20 Sent: Friday, February 14, 2003 7:12 PM To: 'mod...@li...' Subject: pubsub.py now works with JavaScript applications (such as those in kn_apps) I checked some changes into CVS (but haven't yet made a new distribution = tarball -- will do that next week) that fix pubsub.py so that it now = properly vends live JavaScript applications. This means that you can run pubsub.py as a standalone PubSub server, = rather than do all the shenanigans of getting pubsub.cgi and mod_perl = working with your Apache server. As a result, all of the unit tests vended from kn_apps/test now work = with pubsub.py (except the call to cgi-bin/pubsub_test.cgi since = pubsub.py still has no cgi support). Running pubsub_test.cgi from the command line, I see that all of the 55 = server-side unit test work except: 1. kn_time_t on forwarded HTTP posts: FAILED (Didn't get a connection = at ./pubsub_test.cgi line 1293. 2. replay of events: FAILED = (http://.../kn/what/apps/pubsub_test.cgi/1045277635_11338_1/replay_of_eve= nts/2/kn_journal: Didn't get expected event, = kn_id=3D1045277683_11338_293 at ./pubsub_test.cgi line 1457) 3. replay of events with warp factor: FAILED (Got bad = do_method=3Dreplay result HTTP/1.0 400 (Bad Request) Method Not = Supported I'm guessing #1 means off host routes are unimplemented, and #2 and #3 = mean do_method=3Dreplay is unimplemented. Otherwise, looks like it's = feature-complete with pubsub.py ... In fact, even vending cookie_auth.js seems to work for lightweight = authentication. Changes made to the cvs check-in: 1. Modified testlist.html to use mod_pubsub terminology. 2. Modified pubsub.py so that do_method's have the right knroot. 3. Modified pubsub.py so that urlroot is removed from the beginning = of a topic. So for those of y'all who want an all-events-in-memory, standalone = PubSub server, look into using pubsub.py . (Also note that it has 34 = items on its "TODO" list before we believe it to be feature-complete = with pubsub.cgi ... :) Elvis has entered the building, Adam |