gnu-social/plugins
Brion Vibber ec145b73fc Major refactoring of queue handlers to support running multiple sites in one 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
2010-01-12 20:45:09 -08:00
..
Autocomplete Add version information to a bunch of plugins 2010-01-09 19:04:53 -05:00
BitlyUrl add versions for url-shortener plugins 2010-01-08 00:20:38 -08:00
Blacklist Mapstraction PluginVersion 2010-01-08 00:38:20 -08:00
CasAuthentication dos -> unix line endings on CasAuthentication's CAS library 2010-01-11 15:42:17 -08:00
Comet define LACONICA and accept LACONICA for backwards compatibility 2009-08-26 10:41:36 -04:00
EmailAuthentication Add version information to a bunch of plugins 2010-01-09 19:04:53 -05:00
Enjit Major refactoring of queue handlers to support running multiple sites in one daemon. 2010-01-12 20:45:09 -08:00
Facebook Major refactoring of queue handlers to support running multiple sites in one daemon. 2010-01-12 20:45:09 -08:00
FeedSub Fix for auto_increment parameter in auto-created tables via checkschema. 2010-01-04 10:30:58 -08:00
FirePHP Add version information to a bunch of plugins 2010-01-09 19:04:53 -05:00
Gravatar Add version information to a bunch of plugins 2010-01-09 19:04:53 -05:00
Imap i18n in the imap plugin 2010-01-09 19:04:53 -05:00
InfiniteScroll Add version information to a bunch of plugins 2010-01-09 19:04:53 -05:00
LdapAuthentication Add version information to a bunch of plugins 2010-01-09 19:04:53 -05:00
LdapAuthorization Add version information to a bunch of plugins 2010-01-09 19:04:53 -05:00
LilUrl add versions for url-shortener plugins 2010-01-08 00:20:38 -08:00
Mapstraction Mapstraction PluginVersion 2010-01-08 00:38:20 -08:00
Meteor Removed old comments 2009-11-12 10:24:18 +00:00
Minify Add version information to a bunch of plugins 2010-01-09 19:04:53 -05:00
Mobile Init for WAP 2.0 and XHTML Mobile Profile support. WAP20Plugin is a 2009-10-02 11:46:14 +00:00
MobileProfile Adjusted notice option alignment in MobileProfile 2009-12-22 00:06:59 +00:00
Mollom Use plugin configuration instead of common_config() 2010-01-06 00:20:15 -05:00
OpenID inject session before redirect for openid finish login 2010-01-11 08:40:41 +00:00
Orbited remove spurious readme from Orbited 2009-10-04 04:11:10 -04:00
PoweredByStatusNet Apparently, I can't spell my family name. 2010-01-11 13:02:04 +01:00
PtitUrl add versions for url-shortener plugins 2010-01-08 00:20:38 -08:00
PubSubHubBub Add version information to a bunch of plugins 2010-01-09 19:04:53 -05:00
Realtime Updated RealtimePlugin to use core json2.js 2010-01-08 13:36:31 +00:00
Recaptcha Removed unnecessary internal style 2010-01-06 11:31:06 +01:00
RequireValidatedEmail Add version information to a bunch of plugins 2010-01-09 19:04:53 -05:00
ReverseUsernameAuthentication Add version information to a bunch of plugins 2010-01-09 19:04:53 -05:00
RSSCloud Add version info for Facebook, TwitterBridge and RSSCloud plugins 2010-01-08 00:09:23 -08:00
Sample add version info to SamplePlugin 2010-01-07 17:37:44 -08:00
SimpleUrl add versions for url-shortener plugins 2010-01-08 00:20:38 -08:00
SphinxSearch Bringing Sphinx search support up to code: broken out to a plugin, now supports multiple sites on a single server. 2009-11-10 13:44:40 -08:00
TightUrl add versions for url-shortener plugins 2010-01-08 00:20:38 -08:00
TwitterBridge Major refactoring of queue handlers to support running multiple sites in one daemon. 2010-01-12 20:45:09 -08:00
UrlShortener Ticket 1870: drop unnecessary Tidy module installation requirement. 2009-11-30 09:12:19 -08:00
UserFlag Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x 2010-01-06 23:23:30 -08:00
APCPlugin.php Add version information to a bunch of plugins 2010-01-09 19:04:53 -05:00
BlogspamNetPlugin.php Revert "Remove more contractions" 2009-11-09 20:01:46 +01:00
CacheLogPlugin.php Add version info to the CacheLog plugin 2010-01-07 17:39:15 -08:00
GeonamesPlugin.php add version information to Geonames plugin 2010-01-07 17:27:01 -08:00
GeoURLPlugin.php add version information to GeoURL 2010-01-07 17:58:48 -08:00
GoogleAnalyticsPlugin.php add version information to GoogleAnalytics 2010-01-07 17:51:57 -08:00
LinkbackPlugin.php Actually skip the pingback if XML-RPC extension is missing, instead of considering it then trying anyway and dying of a fatal error. :) 2010-01-12 12:12:31 -08:00
MemcachePlugin.php Major refactoring of queue handlers to support running multiple sites in one daemon. 2010-01-12 20:45:09 -08:00
PiwikAnalyticsPlugin.php add version information to PiwikAnalyticsPlugin 2010-01-07 17:47:23 -08:00
TemplatePlugin.php add version info to the Template plugin 2010-01-07 17:43:56 -08:00
WikiHashtagsPlugin.php PluginVersion for WikiHashtags 2010-01-08 00:29:09 -08:00
XCachePlugin.php Add version information to a bunch of plugins 2010-01-09 19:04:53 -05:00