Age | Commit message (Collapse) | Author |
|
- NOTICE_INBOX_SOURCE_* constants moved to common.php since Notice_inbox.php not always loaded
- fixed typo in User::staticGet() call which caused user #1 to receive messages once for each subscriber instead of for him/herself
- 'continue' -> 'continue 2' inside switch() statement to fix loop escape (PHP considers switch() a looping construct for break & continue)
|
|
|
|
daemon.
Key changes:
* Initialization code moved from common.php to StatusNet class;
can now switch configurations during runtime.
* As a consequence, configuration files must now be idempotent...
Be careful with constant, function or class definitions.
* Control structure for daemons/QueueManager/QueueHandler has been refactored;
the run loop is now managed by IoMaster run via scripts/queuedaemon.php
IoManager subclasses are woken to handle socket input or polling, and may
cover multiple sites.
* Plugins can implement notice queue handlers more easily by registering a
QueueHandler class; no more need to add a daemon.
The new QueueDaemon runs from scripts/queuedaemon.php:
* This replaces most of the old *handler.php scripts; they've been refactored
to the bare handler classes.
* Spawns multiple child processes to spread load; defaults to CPU count on
Linux and Mac OS X systems, or override with --threads=N
* When multithreaded, child processes are automatically respawned on failure.
* Threads gracefully shut down and restart when passing a soft memory limit
(defaults to 90% of memory_limit), limiting damage from memory leaks.
* Support for UDP-based monitoring: http://www.gitorious.org/snqmon
Rough control flow diagram:
QueueDaemon -> IoMaster -> IoManager
QueueManager [listen or poll] -> QueueHandler
XmppManager [ping & keepalive]
XmppConfirmManager [poll updates]
Todo:
* Respawning features not currently available running single-threaded.
* When running single-site, configuration changes aren't picked up.
* New sites or config changes affecting queue subscriptions are not yet
handled without a daemon restart.
* SNMP monitoring output to integrate with general tools (nagios, ganglia)
* Convert XMPP confirmation message sends to use stomp queue instead of polling
* Convert xmppdaemon.php to IoManager?
* Convert Twitter status, friends import polling daemons to IoManager
* Clean up some error reporting and failure modes
* May need to adjust queue priorities for best perf in backlog/flood cases
Detailed code history available in my daemon-work branch:
http://www.gitorious.org/~brion/statusnet/brion-fixes/commits/daemon-work
|
|
|
|
timeline and public xmpp feed
|
|
clients
|
|
|
|
surround notice_id with [], looks nicer
|
|
This reverts commit 5ab709b73977131813884558bf56d97172a7aa26.
Missed this one yesterday...
|
|
* doesn't
* won't
* isn't
* don't
|
|
Include notice id and conversation link the XMPP message
Thanks to Deepspawn for this idea and initial code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Took the various places that we create an atom entry for a notice, and
jammed them together into one function of the notice class, and then
used that function. Also, added Atom threading extension and
categories for hashtags.
|
|
(submitted by oxygene)
|
|
|
|
|
|
Moved the common_avatar_* functions to the Avatar class. Typically
either as methods on the object or as static methods. Replaced all the
uses of the functions in other modules.
|
|
in ad-hoc queries
|
|
|
|
|
|
|
|
darcs-hash:20081222173249-84dde-202ba409e32e2b27089a1bc5431507c9d8a2782e.gz
|
|
darcs-hash:20081210024706-5ed1f-fd54b76630656f7d4f7617309d2e4f87f25b006b.gz
|
|
darcs-hash:20080930210542-5ed1f-7432cf920da782ea220ef6b9e156cf1ea650a5b8.gz
|
|
darcs-hash:20080906015501-84dde-e787962b9805759224389dd42a211dfa21da3473.gz
|
|
darcs-hash:20080904213257-84dde-c046a708c6ac9f8f7ed2135f29241d70abe4104f.gz
|
|
darcs-hash:20080902030403-84dde-5f1576104104ea57d3e23401b59493c03d5a84d4.gz
|
|
darcs-hash:20080902030331-84dde-bb2db886d90623785f930bb7c5c3c406d407f808.gz
|
|
queuehandlers
darcs-hash:20080902012604-84dde-073a583da9b09c80e5e9a47a5eddd144fad8e87a.gz
|
|
darcs-hash:20080831114642-84dde-c1e486fe03752882e212bd6e3930477042f993be.gz
|
|
darcs-hash:20080830094252-84dde-bf6c17d7036c84bfeaf41d2fc704cc8656a083c1.gz
|
|
darcs-hash:20080830091522-84dde-75121e8794f2a43b8a4c5bff7ec42cac40d5520c.gz
|
|
darcs-hash:20080830084423-84dde-7749d00c4c2fcada9e0f30af044637c48c0512c3.gz
|
|
darcs-hash:20080830071232-84dde-90bad1be7a7e141927175e42d39cb21d7bba337e.gz
|
|
darcs-hash:20080829200859-84dde-d1c4c5897096a06dec8be14e81499d70a79c78d2.gz
|
|
Added a method to QueueManager to let subclasses do stuff when idle.
Needed so that XMPP queue manager can service its message queue.
Cleaned up jabber_broadcast_message quite a bit. Use custom joins
instead of loop-and-query, should fix some problems with users who are
getting messages even after turning off notification. Only build $msg
and $entry once, and use the XMPPHP function for messages with a
payload, rather than rolling our own.
darcs-hash:20080829200352-84dde-427e4ca8c81d4222a36f78e7c580b611ff0bf765.gz
|
|
Add another queue handler for the public stream. Should further
parallelize the work of sending out messages.
darcs-hash:20080829181702-84dde-594505aa73d2380b13bd98917b70b02bac597d12.gz
|
|
darcs-hash:20080828001936-84dde-e4ec2fef30c49d1254d5358624a4391930811832.gz
|
|
Eventually, the poor xmppdaemon has become overloaded with extra
tasks. So, I've broken it up. Now, we have 5 background scripts, and
more coming:
* xmppdaemon.php - handles incoming XMPP messages only.
* xmppqueuehandler.php - sends notices from the queue out through XMPP.
* smsqueuehandler.php - sends notices from the queue out over SMS
* ombqueuehandler.php - sends notices from the queue out over OMB
* xmppconfirmhandler.php - sends confirmation requests out over XMPP.
This is in addition to maildaemon.php, which takes incoming messages.
None of these are "true" daemons -- they don't daemonize themselves
automatically. Use nohup or another tool to background them. monit can
also be useful to keep them running.
At some point, these might become fork()'ing daemons, able to handle
more than one notice at a time. For now, I'm just running multiple
instances, hoping they don't interfere.
darcs-hash:20080827205407-84dde-97884a12f5f4e54c93bc785bd280683d1ee7e749.gz
|
|
darcs-hash:20080826205341-84dde-04c1641f4b9c5aa5318b76512664ee9df170d779.gz
|
|
For identi.ca, we had some problems with the XMPP daemon getting
"stuck" in I/O through the encrypted (by default) XMPP socket. Turning
off encryption helped. So, now it's an option.
darcs-hash:20080826131814-84dde-2c4a809c6fb666dfb4b96d0d61205fe418f4e4b4.gz
|
|
darcs-hash:20080823053548-f6e2c-dfc8a0acd9fb8589ed37e54c7d0d3d38afff34f5.gz
|
|
darcs-hash:20080823052534-f6e2c-aa452a8c2c6ee33399f4079d0bf2224847e1450a.gz
|
|
darcs-hash:20080822191751-f6e2c-578869b8524e3238c461872981a5dd8c285937e3.gz
|