Commit Graph

2823 Commits

Author SHA1 Message Date
Craig Andrews 5224c7d6c2 Merge branch '0.9.x' into 1.0.x 2010-01-27 13:41:02 -05:00
Evan Prodromou b6aa1511eb Merge branch 'master' into 0.9.x 2010-01-25 18:10:59 -05:00
Evan Prodromou e26a843caf Offload inbox updates to a queue handler to speed up posting online
Moved much of the writing that happens when posting a notice to a new
queuehandler, distribqueuehandler. This updates tags, groups, replies
and inboxes at queue time (or at Web time, if queues are disabled).

To make this work well, I had to break up the monolithic
Notice::blowCaches() and make cache blowing happen closer to where
data is updated.

Squashed commit of the following:

commit 5257626c62750ac4ac1db0ce2b71410c5711cfa3
Author: Evan Prodromou <evan@status.net>
Date:   Mon Jan 25 14:56:41 2010 -0500

    slightly better handling of blowing tag memory cache

commit 8a22a3cdf6ec28685da129a0313e7b2a0837c9ef
Author: Evan Prodromou <evan@status.net>
Date:   Mon Jan 25 01:42:56 2010 -0500

    change 'distribute' to 'distrib' so not too long for dbqueue

commit 7a063315b0f7fad27cb6fbd2bdd74e253af83e4f
Author: Evan Prodromou <evan@status.net>
Date:   Mon Jan 25 01:39:15 2010 -0500

    change handle_notice() to handle() in distributqueuehandler

commit 1a39ccd28b9994137d7bfd21bb4f230546938e77
Author: Evan Prodromou <evan@status.net>
Date:   Mon Jan 25 16:05:25 2010 -0500

    error with queuemanager

commit e6b3bb93f305cfd2de71a6340b8aa6fb890049b7
Author: Evan Prodromou <evan@status.net>
Date:   Mon Jan 25 01:11:34 2010 -0500

    Blow memcache at different point rather than one big function for Notice class

commit 94d557cdc016187d1d0647ae1794cd94d6fb8ac8
Author: Evan Prodromou <evan@status.net>
Date:   Mon Jan 25 00:48:44 2010 -0500

    Blow memcache at different point rather than one big function for Notice class

commit 1c781dd08c88a35dafc5c01230b4872fd6b95182
Author: Evan Prodromou <evan@status.net>
Date:   Wed Jan 20 08:54:18 2010 -0500

    move broadcasting and distributing to new queuehandler

commit da3e46d26b84e4f028f34a13fd2ee373e4c1b954
Author: Evan Prodromou <evan@status.net>
Date:   Wed Jan 20 08:53:12 2010 -0500

    Move distribution of notices to new distribute queue handler
2010-01-25 18:08:21 -05:00
Brion Vibber f3beed6889 Fix presence notification on XMPP thread (now foreground, not background) 2010-01-25 13:49:02 -08:00
Brion Vibber cb07fd29a3 Use new StatusNetwork->serverName() to get full domain for wildcard config until we rebuild queues to be based on nicknames.
Fixes live bug with new *.status.net sites breaking queuedaemon.php
2010-01-24 16:01:19 -08:00
Evan Prodromou 49d500e3e1 defaults for nickname and wildcard 2010-01-24 16:01:08 -08:00
Evan Prodromou 4f213f985f Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
Conflicts:
	lib/stompqueuemanager.php
2010-01-24 16:12:40 -05:00
Evan Prodromou 54ebb0a2b9 Merge branch 'master' into 0.9.x
Conflicts:
	lib/stompqueuemanager.php
2010-01-24 15:59:57 -05:00
Craig Andrews 23c0d663d6 Allow for instances as well as class names to be passed as queue handlers and iomanagers. 2010-01-23 01:03:41 -05:00
Craig Andrews 767b77d6c2 Merge branch '0.9.x' into 1.0.x 2010-01-22 18:03:48 -05:00
Craig Andrews 845f051c2f StompQueueManager uses decode() to decode queued frames 2010-01-22 18:02:05 -05:00
Craig Andrews b34bbb0e80 Store serialized representations of queue items in the queue 2010-01-22 17:55:26 -05:00
Brion Vibber a66181c900 Fix unqueuemanager for updated QueueHandler interface 2010-01-22 14:06:20 -08:00
Brion Vibber aa038fa9cb Merge branch 'testing' of gitorious.org:statusnet/mainline into 0.9.x 2010-01-22 12:59:52 -08:00
Brion Vibber 6e4cad71e5 Fix for stuck queue messages: wrap processing in stomp transactions so our lack of an ACK if PHP dies actually triggers redelivery.
Previously, messages once delivered would just get stuck in the queue seemingly forever if they never got ACKed.
Note this could lead to partial duplication, for instance if the OMB or Twitter queue handlers die after 1/2 of the outgoing sends.

Recommendations:
* catch exceptions more aggressively within queue handlers (so only PHP fatal errors are likely to kill in the middle)
* for processing that involves sending to multiple clients, consider a second queue similar to the XMPP output, eg for OMB:
 - first queue gets delivery list and builds message data, enqueueing it for each target address
 - second queue can handle each individual outgoing message (and attempt redelivery etc separately)

This would also protect better against a recurring error preventing delivery in the second part, and could spread out any slow sends over multiple threads.
2010-01-22 12:52:56 -08:00
Brion Vibber c7507e7e9d XMPP queued output & initial retooling of DB queue manager to support non-Notice objects.
Queue handlers for XMPP individual & firehose output now send their XML stanzas
to another output queue instead of connecting directly to the chat server. This
lets us have as many general processing threads as we need, while all actual
XMPP input and output go through a single daemon with a single connection open.

This avoids problems with multiple connected resources:
* multiple windows shown in some chat clients (psi, gajim, kopete)
* extra load on server
* incoming message delivery forwarding issues

Database changes:
* queue_item drops 'notice_id' in favor of a 'frame' blob.
  This is based on Craig Andrews' work branch to generalize queues to take any
  object, but conservatively leaving out the serialization for now.
  Table updater (preserves any existing queued items) in db/rc3to09.sql

Code changes to watch out for:
* Queue handlers should now define a handle() method instead of handle_notice()
* QueueDaemon and XmppDaemon now share common i/o (IoMaster) and respawning
  thread management (RespawningDaemon) infrastructure.
* The polling XmppConfirmManager has been dropped, as the message is queued
  directly when saving IM settings.
* Enable $config['queue']['debug_memory'] to output current memory usage at
  each run through the event loop to watch for memory leaks

To do:
* Adapt XMPP i/o to component connection mode for multi-site support.
* XMPP input can also be broken out to a queue, which would allow the actual
  notice save etc to be handled by general queue threads.
* Make sure there are no problems with simply pushing serialized Notice objects
  to queues.
* Find a way to improve interactive performance of the database-backed queue
  handler; polling is pretty painful to XMPP.
* Possibly redo the way QueueHandlers are injected into a QueueManager. The
  grouping used to split out the XMPP output queue is a bit awkward.

Conflicts:

	scripts/xmppdaemon.php
2010-01-22 12:52:36 -08:00
Brion Vibber 99866a459b Fix for stuck queue messages: wrap processing in stomp transactions so our lack of an ACK if PHP dies actually triggers redelivery.
Previously, messages once delivered would just get stuck in the queue seemingly forever if they never got ACKed.
Note this could lead to partial duplication, for instance if the OMB or Twitter queue handlers die after 1/2 of the outgoing sends.

Recommendations:
* catch exceptions more aggressively within queue handlers (so only PHP fatal errors are likely to kill in the middle)
* for processing that involves sending to multiple clients, consider a second queue similar to the XMPP output, eg for OMB:
 - first queue gets delivery list and builds message data, enqueueing it for each target address
 - second queue can handle each individual outgoing message (and attempt redelivery etc separately)

This would also protect better against a recurring error preventing delivery in the second part, and could spread out any slow sends over multiple threads.
2010-01-22 12:35:05 -08:00
Eric Helgeson b7940ef39f Fix unqueuemanager to work with new Queue layout pushed in 0e852def6a
"* Queue handlers should now define a handle() method instead of handle_notice()"

And Queue managers should call handle() :)
2010-01-22 11:02:23 -05:00
Craig Andrews 7be5e7e524 stupid mistake... let's not talk about this. 2010-01-22 10:40:21 -05:00
Craig Andrews 672126968f Updated some references to the long gnone "isEnclosure" function to the new "getEnclosure" 2010-01-22 10:12:26 -05:00
Brion Vibber 0e852def6a XMPP queued output & initial retooling of DB queue manager to support non-Notice objects.
Queue handlers for XMPP individual & firehose output now send their XML stanzas
to another output queue instead of connecting directly to the chat server. This
lets us have as many general processing threads as we need, while all actual
XMPP input and output go through a single daemon with a single connection open.

This avoids problems with multiple connected resources:
* multiple windows shown in some chat clients (psi, gajim, kopete)
* extra load on server
* incoming message delivery forwarding issues

Database changes:
* queue_item drops 'notice_id' in favor of a 'frame' blob.
  This is based on Craig Andrews' work branch to generalize queues to take any
  object, but conservatively leaving out the serialization for now.
  Table updater (preserves any existing queued items) in db/rc3to09.sql

Code changes to watch out for:
* Queue handlers should now define a handle() method instead of handle_notice()
* QueueDaemon and XmppDaemon now share common i/o (IoMaster) and respawning
  thread management (RespawningDaemon) infrastructure.
* The polling XmppConfirmManager has been dropped, as the message is queued
  directly when saving IM settings.
* Enable $config['queue']['debug_memory'] to output current memory usage at
  each run through the event loop to watch for memory leaks

To do:
* Adapt XMPP i/o to component connection mode for multi-site support.
* XMPP input can also be broken out to a queue, which would allow the actual
  notice save etc to be handled by general queue threads.
* Make sure there are no problems with simply pushing serialized Notice objects
  to queues.
* Find a way to improve interactive performance of the database-backed queue
  handler; polling is pretty painful to XMPP.
* Possibly redo the way QueueHandlers are injected into a QueueManager. The
  grouping used to split out the XMPP output queue is a bit awkward.
2010-01-21 22:40:35 -08:00
Brion Vibber 26fdf0c9d2 XMPP queued output & initial retooling of DB queue manager to support non-Notice objects.
Queue handlers for XMPP individual & firehose output now send their XML stanzas
to another output queue instead of connecting directly to the chat server. This
lets us have as many general processing threads as we need, while all actual
XMPP input and output go through a single daemon with a single connection open.

This avoids problems with multiple connected resources:
* multiple windows shown in some chat clients (psi, gajim, kopete)
* extra load on server
* incoming message delivery forwarding issues

Database changes:
* queue_item drops 'notice_id' in favor of a 'frame' blob.
  This is based on Craig Andrews' work branch to generalize queues to take any
  object, but conservatively leaving out the serialization for now.
  Table updater (preserves any existing queued items) in db/rc3to09.sql

Code changes to watch out for:
* Queue handlers should now define a handle() method instead of handle_notice()
* QueueDaemon and XmppDaemon now share common i/o (IoMaster) and respawning
  thread management (RespawningDaemon) infrastructure.
* The polling XmppConfirmManager has been dropped, as the message is queued
  directly when saving IM settings.
* Enable $config['queue']['debug_memory'] to output current memory usage at
  each run through the event loop to watch for memory leaks

To do:
* Adapt XMPP i/o to component connection mode for multi-site support.
* XMPP input can also be broken out to a queue, which would allow the actual
  notice save etc to be handled by general queue threads.
* Make sure there are no problems with simply pushing serialized Notice objects
  to queues.
* Find a way to improve interactive performance of the database-backed queue
  handler; polling is pretty painful to XMPP.
* Possibly redo the way QueueHandlers are injected into a QueueManager. The
  grouping used to split out the XMPP output queue is a bit awkward.
2010-01-21 16:42:50 -08:00
Brion Vibber c9c7bb3234 Merge commit 'origin/testing' into 0.9.x 2010-01-21 16:33:11 -08:00
Brion Vibber 8dafe09ab2 Option to log slow db queries or all db queries
$config['db']['log_queries'] = true; // all
$config['db']['log_slow_queries'] = 10; // queries taking > 10 seconds
2010-01-21 11:07:52 -08:00
Sarven Capadisli 373206ac00 Event hooks for before and after site_notice 2010-01-21 16:49:49 +01:00
Sarven Capadisli d4fcc8777f Removed mobile stylesheet from core output. If Mobile support is
seeked, MobileProfile plugin should be used.
2010-01-21 13:23:04 +01:00
Zach Copley fd276ff9e7 Add Start/EndSetApiUser events when setting API user via OAuth 2010-01-20 18:01:07 -08:00
Michele 05156b708a HTTP auth provided is evaluated even if it's not required 2010-01-20 17:55:37 -08:00
Evan Prodromou c63832f7bf add PubSubHubBub and RSSCloud to list of default plugins 2010-01-20 17:58:23 -05:00
Evan Prodromou dd0a99f58a Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x 2010-01-19 00:32:05 -05:00
Evan Prodromou 01dc77c2fd Merge branch 'master' into 0.9.x 2010-01-19 00:31:42 -05:00
Evan Prodromou c7f14cd777 allow all rights reserved, private data 2010-01-19 00:04:58 -05:00
Evan Prodromou 71f519f64a add event for showing content license in action 2010-01-18 23:25:45 -05:00
Brion Vibber 3bf4056055 Fix order of params on 'plugin not found' exception 2010-01-18 09:28:58 -08:00
Sarven Capadisli 187a70873a Updated path to farbtastic stylesheet 2010-01-18 11:29:05 +00:00
Evan Prodromou 1f6bbc1890 Merge branch 'master' into 0.9.x 2010-01-16 08:06:02 -08:00
Evan Prodromou 21c3e08804 Merge branch 'master' of git@gitorious.org:statusnet/mainline 2010-01-16 07:48:59 -08:00
Evan Prodromou d6b8b13116 change rc3 to beta3 2010-01-16 07:48:46 -08:00
Brion Vibber 598072468c --xmpp-only hack for queuedaemon.php to run separate queue daemon with only xmpp threads 2010-01-15 11:13:06 -08:00
Brion Vibber ef016dca45 Merge branch 'master' of gitorious.org:statusnet/mainline into 0.9.x 2010-01-15 09:52:50 -08:00
Brion Vibber 038287c1ff fix for --skip-xmpp hack -- forgot to do it on the ping & confirm handlers 2010-01-14 17:14:41 -08:00
Craig Andrews a27aef9206 Add nickname suggestion capability for use during autoregistration. 2010-01-14 19:52:11 -05:00
Brion Vibber 58bc33850a temporary --skip-xmpp flag on queuedaemon.php, allows to run queue daemons but skip subscription to xmpp-based queues
(still working on making these behave gracefully when server is down)
2010-01-14 15:32:37 -08:00
Siebrand Mazeland 6d8469947e Make more complete sentence. 2010-01-14 23:38:29 +01:00
Brion Vibber 2f32181c93 Keep handler registration per-site to fix queue registration in mixed config environment 2010-01-14 13:22:33 -08:00
Brion Vibber 7211896b2f Keep handler registration per-site to fix queue registration in mixed config environment 2010-01-14 13:21:48 -08:00
Brion Vibber 8a7171fde6 Don't barf on io loop if xmpp connection failed 2010-01-13 23:38:51 -08:00
Brion Vibber 4b839cfc53 fix for non-% memory soft limit 2010-01-13 21:41:42 -08:00
Brion Vibber e8abb0c2ed fix for non-% memory soft limit 2010-01-13 21:35:47 -08:00
Brion Vibber b25deaacea queue daemon fixes: path fix for xmpp, suppress warning in memcached init 2010-01-13 21:24:36 -08:00