From: Adam R. <Ad...@Kn...> - 2003-03-13 03:17:37
|
On Wednesday, March 12, 2003, at 07:01pm, I wrote: > Is there any reason not to use the publish-subscribe-unsubscribe API = of > the JavaScript client library? It seems relatively simple and=20 > straightforward to copy... Greg replied: > Please use its (the JavaScript's) API. It and the Ruby (yes, the one = I=20 > wrote) mimic each other and are easy to learn and use. > > Just: >=20 > 1. pub > 2. sub > 3. unsub >=20 > ... okay, then route, etc too but you get my drift. This API is documented in=20 mod_pubsub/kn_docs/javascript_reference.html and in the source code for the JavaScript pubsub client library mod_pubsub/kn_apps/kn_lib/pubsub_raw.js and actually, the Python pubsub client library mimics exactly the same API, too. See its source code mod_pubsub/python_pubsub/pubsublib.py and/or when I check in Greg's Ruby pubsub client library you can peruse that source's APIs as well. Whatever you like. FWIW, I believe the Perl pubsub client library is similar flavor mod_pubsub/cgi-bin/PubSub/Client.pm and the C++/Windows pubsub client library is similar, too mod_pubsub/cxx_pubsub/LibKN/cpp/Connector.cpp and what can I say, the C pubsub client library likes to do its own thing, but man oh man are its APIs readable :) mod_pubsub/c_pubsub/libkn/... Actually, Greg's Ruby pubsub client library is *very* readable. Even if you don't know Ruby, it's a good one to look at to learn the mod_pubsub way. So I'll put Greg's Ruby pubsub library next on the "to add" list, as someone around here was asking about Ruby (I kid you not!). Hopefully I'll get to this, this week. Kudos to you, Greg! Adam |