I'm happy to help if you need... i wrote the initial implementation of
queues for laconica, after that Evan and others have been playing with that
so it's not the same code i wrote.

Like the idea of Python. Basically what this daemon will do is maintain a 2
stacks of incoming-outgoing messages, one per Activemq one per XMPP, and
fire php scripts when needed.. seems fine to me.

However i love the idea of BOSH.. if i find some time i'll try that
approach.

2009/10/26 Brion Vibber <br...@status.net>

> On 10/25/09 6:51 PM, Federico Marani wrote:
>
>> I think this is a good idea. PHP is not a language to write daemons
>> in... and certainly not scalable daemons.
>>
>> Having a daemon however is not necessary when working with a queue, just
>> remember to spin off the queue handler that connects to the MQ servers
>> and downloads the messages before the queue grows too much (or too much
>> time has passed). You can also use a cronjob to do that, but i'd rather
>> have a master process to do that in this case.
>>
>
> *nod*
>
> I'm reworking the QueueHandler classes to run the one-offs, which can then
> be run directly from the single QueueDaemon (simple PHP impl) or spawned out
> one at a time from a master process.
>
>
>  I can see a problem here with XMPP. With the current setup the
>> connection needs to be maintained, not true if you convert it to use
>> XMPP BOSH. In that case you could activate the script each X minutes
>> (depending on the BOSH timeout you specified), do the queued
>> elaborations and die. All you need to do is remember sid & rid. However
>> i do not know how complete is XMPPHP BOSH implementation.
>>
>
> My current plan is to maintain the XMPP connection from the master; we then
> pass input events off to event handlers, or accept output from queue
> handlers. This can be done either via stdin/stdout or a pipe, or with
> one-off connections; still need to finalize some of that.
>
>
>  I read your wiki post and i saw you suggested using a different language
>> to write this sort of master process. What were your thoughts on this?
>> I'm experimenting with Scala lately and it's quite impressive... i think
>> it could be a good candidate, especially if you want to scale up.
>>
>
> Python should be fine for our needs; we basically just need an ActiveMQ
> connection, an XMPP connection, and a timer for polling-based events.
>
> -- brion
>



-- 
--------------- FM
Flow with whatever is happening and let your mind be free. Stay centered by
accepting whatever you are doing. This is the ultimate.
- 庄子 (Chuang Tzu)
_______________________________________________
StatusNet-dev mailing list
StatusNet-dev@lists.status.net
http://lists.status.net/mailman/listinfo/statusnet-dev

Reply via email to