Commit Graph

23 Commits

Author SHA1 Message Date
Brion Vibber
5f81f6119b Merge branch '0.9.x' into 1.0.x 2010-10-12 16:33:36 -07:00
Brion Vibber
9d9e80ea21 Followup to IIS installer tweaks in [9bb48c36]:
* skip 0-byte config files when initializing, go ahead and redirect to installer if no non-0-byte files
* tweak warning on installer.php to let you know if you have a 0-byte config.php that's not writable, as opposed to generally already having a config.php with data in it
2010-10-12 13:00:03 -07:00
Evan Prodromou
7183175429 Merge branch 'master' into 1.0.x 2010-08-13 14:33:41 -07:00
Brion Vibber
19e6b84050 StatusNet_network staticGet lookup fix 2010-08-10 17:22:26 -07:00
Craig Andrews
39392e03a7 Merge branch '0.9.x' into 1.0.x
Conflicts:
	actions/confirmaddress.php
	actions/imsettings.php
2010-04-18 19:21:15 -04:00
Brion Vibber
a05e674843 showplugins.php: dump list of activated plugins and their settings on this site 2010-04-12 11:49:59 -07:00
Brion Vibber
886e28aaa9 Stub plugins administration panel, allows for disabling/re-enabling plugins from the default plugins list. 2010-03-22 13:58:27 -07:00
Brion Vibber
e89908f261 Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 1.0.x
Conflicts:
	lib/channel.php
	scripts/imdaemon.php
2010-03-22 13:56:16 -07:00
Brion Vibber
b9fc4c24b4 Pulling the stub plugin panel back out; we'll flesh it out more for 1.0.x and see if we can make it easier to disable through the config file for now.
Revert "Stub plugins administration panel, allows for disabling/re-enabling plugins from the default plugins list."

This reverts commit d9a9fd3779.
2010-03-17 08:55:16 -07:00
Brion Vibber
d9a9fd3779 Stub plugins administration panel, allows for disabling/re-enabling plugins from the default plugins list. 2010-03-16 16:01:00 -07:00
Brion Vibber
b1d90a835f Don't switch people from the Memcache to Memcached plugin without their knowledge when using back-compatibility $config['memcached']['enabled']. Performance characteristics for Memcached version on large-scale sites not tested yet.
New installations should be using addPlugin explicitly.
2010-03-11 18:10:41 -08:00
Craig Andrews
714d920fae Merge branch '0.9.x' into 1.0.x
Conflicts:
	classes/statusnet.ini
	db/statusnet.sql
	lib/jabber.php
	lib/xmppmanager.php
2010-03-08 17:22:23 -05:00
Craig Andrews
51a245f18c Added Memcached plugin (using pecl/memcached versus pecl/memcache) 2010-03-08 17:17:37 -05:00
Zach Copley
37b106d49c Fix variable name in NoConfigException 2010-03-04 00:00:46 -08:00
Craig Andrews
20d6a7caed Merge branch '0.9.x' into 1.0.x
Conflicts:
	lib/queuemanager.php
	lib/xmppmanager.php
	plugins/Xmpp/Fake_XMPP.php
	scripts/imdaemon.php
2010-02-16 13:15:09 -05:00
Brion Vibber
81b6b58e33 Merge branch 'master' into testing
Conflicts:
	lib/stompqueuemanager.php
2010-02-16 09:22:02 -08:00
Brion Vibber
c74aea589d Stomp queue restructuring for mass scalability:
- Multiplexing queues into groups and for multiple sites.
- Sharing vs breakout configurable per site and per queue via $config['queue']['breakout']
- Detect how many times a message is redelivered, discard if it's killed too many daemons
 - count configurable with $config['queue']['max_retries']
 - can dump the items to files in $config['queue']['dead_letter_dir']

Queue daemon memory & resource leak fixes:
- avoid unnecessary reconnections to memcached server (switch persistent connections back in on second initialization, assuming it's child process)
- monkey-patch for leaky .ini loads in DB_DataObject::databaseStructure() - was leaking 200k per active switch
- applied leak fixes to Status_network as well, using intermediate base Safe_DataObject for both it and Memcache_DataObject

Misc queue fixes:
- correct handling of child processes exiting due to signal termination instead of regular exit
- shutdown instead of infinite respawn loop if we're already past the soft memory limit at startup
- Added --all option for xmppdaemon... still opens one xmpp connection per site that has xmpp active

Cache updates:
- add Cache::increment() method with native support for memcached atomic increment
2010-02-16 09:16:51 -08:00
Craig Andrews
32084e33a2 Merge branch '0.9.x' into 1.0.x
Conflicts:
	lib/queuemanager.php
2010-02-16 10:25:57 -05:00
Brion Vibber
dc09453a77 First steps on converting FeedSub into the pub/sub basis for OStatus communications:
* renamed FeedSub plugin to OStatus
* now setting avatar on subscriptions
* general fixes for subscription
* integrated PuSH hub to handle only user timelines on canonical ID url; sends updates directly
* set $config['feedsub']['nohub'] = true to test w/ foreign feeds that don't have hubs (won't actually receive updates though)
* a few bits of code documentation
* HMAC support for verified distributions (safest if sub setup is on HTTPS)

And a couple core changes:
* minimizing HTML output for exceptions in API requests to aid in debugging
* fix for rel=self link in apitimelineuser when id given

This does not not yet include any of the individual subscription management (Salmon notifications for sub/unsub, etc) nor a nice UI for user subscriptions.
Needs some further cleanup to treat posts as status updates instead of link references.
2010-02-08 11:15:29 -08:00
Craig Andrews
0651404000 Add backwards compatibility for the XMPP configuration before XMPP was made into a plugin 2010-01-28 16:08:42 -05:00
Brion Vibber
3bf4056055 Fix order of params on 'plugin not found' exception 2010-01-18 09:28:58 -08:00
Evan Prodromou
cc25d3baf0 ws changes for phpcs 2010-01-12 23:56:21 -08:00
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