[JDEV] A Jabber 'client deamon'

dman dman at dman.ddts.net
Thu Mar 28 19:04:45 CST 2002


On Tue, Mar 26, 2002 at 05:18:33PM +0100, Jan Fabry wrote:

| I'll try to explain my idea, but feel free to ask questions if anything 
| is unclear!
| 
| I was thinking about some sort of 'client deamon' for Jabber. The 
| situation I'm confronted with is the following:
...
| Schematic view:
| 1. User submits new story
| 2. Server starts new process to handle this request
| 3. Server process opens connection to Jabber server
| 4. Server process sends message
| 5. Server process closes connection to Jabber server
| 6. Server process returns page to user
| 
| Can you see the problem? Steps 3 and 5 should be avoidable.

Yeah, you want to pool the connection from one use to the next.  You
want a persistant connection.  I think that persistant CGI could solve
it for you.  It depends on how easy it is to make phpNuke work as
pcgi.

| My suggestion is:
| 
| At boot time, some sort of 'client deamon' is started, and it logs in to 
| the Jabber server. When I want a PHP script to send a message to me, it 
| only does a small call to some application, that then connects to the 
| daemon to send it.
| 
| Maybe there this should work in two ways: I can send a message to 'the 
| machine', to execute some task.
| 
| I'm sorry if all this sounds confusing, but I don't know how to explain 
| it otherwise.

This makes perfect sense and is what I would do in that situation.
Just to make things easy on yourself, pick a nice middleware such as
XML-RPC or CORBA to communicate between the CGI script and the jabber
client daemon.

-D

-- 

One man gives freely, yet gains even more;
another withholds unduly, but comes to poverty.
        Proverbs 11:24




More information about the JDev mailing list