just mostly thinking out loud here, but I thought I'd share.
ideally, we can get the jabber server to authenticate users against the
globealive database. I ... I think this means tossing sql into the c code,
as it's either that or talking with globealive via sockets. which is
probably "better", but not with my current skillset. :)
okay. so I need to find the spot to hook authentication. that's not a
"need" need -- we can automate user generation and whatnot from globealive
and talk to the server more generically... but I'd rather not.
and... then we need to hook into the conference area. that's not too hard,
other than again, either communicating via sockets or straight to the db.
I think I'll make a separate c library that the jabber code goes through
so that we could change the implementation in one spot later. theoretically.
then... we need to take one of the jabber applets that's open source, and
hack at it. I'm not sure yet whether servers support "guest" users, though
I've seen one way that we can fake it so far--users can have any number of
"profiles" (like "home" or "office" or ...) and so we could have one guest
user with the profile unique to the session id or something like that. There
could be privacy issues there, but I think not. I need to explore that more.
flowchart, so I'm not forgetting something:
expert joins: hopefully can get around doing anything special here by
instead hooking the authentication information. we tell them to go download
a client, and give them their information for logging in, etc.
expert logs in "online": hooks to authentication; jabber asks ga if expert
is a valid user. expert's marked as being online at ga.
guest clicks to "chat" with expert. jabber applet possibly needs hack to
differentiate this guest from all the other guests using the system. applet
then creates a new conference and invites the expert to join. [I'm not sure
what happens here if the expert has since gone offline. this as always
will remain a point of contention. we might eventually try feeding the
chat button as an applet that fades when the expert goes offline, closer to
realtime, but there will still be those "moments". eh. worry about them
later, I suppose.] presume: expert joins (I haven't yet seen what the
"request to join conference" looks like). all conference stuff (joins,
exits) goes through a simple module "conference" which we hook to another
module "globealive" which talks to globealive.com either via db or via
sockets. that records all chat info. eventually the user closes the applet
which "closes" the chat, which redirects them to the rating page as we have
it, and we're in business as normal.
[6 hours later:
for the record:
installed Jabber-Connection-0.03, Digest-SHA1-2.02, XML-Parser-2.31 for xdb_auth_cpile. this took a long time, partially in needing to find them, partially in realizing I broke my ldconfig, partially... eh. then I had to install perl 5.8, reinstall the modules... and integrated xdb_auth_cpile with the jabber.xml configuration. then slowly, piece by piece, took the changes to the jabber.xml config out. I couldn't get jabber running. googled around, added in debugging code, couldn't figure anything out. guessed right, eventually ("no, it *can't* be that. awww, shit. okay. I guess it can."), re-added the configuration changes, left the debugging code in, had xdb_auth_cpile hiccup on its shared lib. gave up on the "cleanliness" of it and put the appropriate method straight in the perl file (as opposed to making a nifty perl module), and got that working. somewhere in there I had to install XML-Simple-2.03. Then I needed perl db access to postgresql, so I started installing the port of that, but that tried to get me to upgrade postgresql to 7.3, which is NOT going to happen any time soon. but luckily I know a thing or two about make, and in the process of tonight I learned all about perl Makefile.PL;make;make test ... make install. so I got it in and good without upgrading postgresql from 7.2.4. I had to futz around with that for a while, going to the perl 5 pocket reference, perl in a nutshell, and perl cookbook books before (hey, THERE'S my Programming Perl book... I wonder if it would have been any more helpful for the simple things I was trying to do... no, I'm not going to look. I feel bad enough already) giving up on finding useful examples there and did a bit of googling about, and... eventually got it all together (really, REALLY simple stuff. but.) I think CPAN was most helpful tonight. (especially http://search.cpan.org) Then I needed to track down a perl unix crypt module and install that, figure out its usage from its test cases (not so hard, really), and voila. that was simple.
you can log in with your globealive username and password to the jabber
next... next next next. well, next comes... dunno. I suppose I should
split the site somehow. it would be REALLY nice to have a test/development
server. I think it's about time for bed, now, though. That took close
to eight hours. [and it was such a simple thing, too, thanks to other
folks' code here and there and everywhere. but it took that long to set
everything up, really, and then remember how to do database stuff in perl...
but it's cute. try it. :) not that it seems like all that much, necessarily,
but... it is a step. and it's wonderfully simple to do. not a kludge in
the slightest (imo, sfaik). we'll see how it scales, I suppose. but it
really *is* simple.
[two more hours down the drain:
despite the wonderful professional appearance of the main jabber applet
homepage... I can't get it to work and the applet itself is ugly. It
looks like development on it is essentially frozen. I suppose I should
hmm. I'm finding some interesting stuff. like a java library I could have
used instead of the perl one for integrating with jabber's authentication
stuff. hmm. and more; this might be my holy integration grail. might be.
I really should sleep.
applet options I haven't looked into yet:
this is the one I originally thought promising:
current version is 1.3.1 and hasn't been touched in ages. And it doesn't
work for me. I found an older version that does seem to work, installed
here: http://ns.centuryfastservers.net/JabberApplet.html -- not sure
if I could find the source for that or not. (version 188.8.131.52) Aha, I
have found the source for that. justincase. on sourceforge. partially
working. It will take some hacking. but maybe not too much. (I suppose
I do use the word hack. but only in some of its forms, in some contexts.
I think. la la la?)
this is what I was ranting about above:
"xdb_java serves as a bridge between the Jabber instant messaging server and
+any JDBC friendly DBMS. It allows for the redirection of Jabber XDB requests
+to a database, for storage of user info, authentication requests, message
+spools, rosters, and filters [http://sourceforge.net/projects/xdbjava]"
we can hope?
ve shell c.