summaryrefslogtreecommitdiff
path: root/classes
AgeCommit message (Collapse)Author
2010-01-22Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testingEvan Prodromou
2010-01-22Memcached_DataObject unnecessarily require_once'd itselfEvan Prodromou
2010-01-21XMPP queued output & initial retooling of DB queue manager to support ↵Brion Vibber
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-21Option to log slow db queries or all db queriesBrion Vibber
$config['db']['log_queries'] = true; // all $config['db']['log_slow_queries'] = 10; // queries taking > 10 seconds
2010-01-15Fix for background recalculation of groups; needs to get Group objects not ↵Brion Vibber
IDs; also don't list any groups for repeats to match saveGroups behavior todo: merge calculation portion with saveGroups so they don't get out of sync
2010-01-15Fix since_id and max_id API parameters for inbox-based loads; was failing if ↵Brion Vibber
the exact id mentioned wasn't present in the inbox (or had been trimmed out)
2010-01-13do since_id and max_id in inboxEvan Prodromou
2010-01-13go straight to the DB for inbox before insertEvan Prodromou
2010-01-13don't write Inbox if on a read-only page, but encacheEvan Prodromou
2010-01-13make sure whoGets() doesn't write anythingEvan Prodromou
2010-01-13Fix regressions in XMPP output during inbox refactoringBrion Vibber
- 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)
2010-01-13add events for subscribing to people and joining groupsEvan Prodromou
2010-01-13Don't save reply info for repeatsEvan Prodromou
2010-01-13repeats don't get posted to groupsEvan Prodromou
2010-01-13remove vestiges of Notice_inbox from cache clearing code in NoticeEvan Prodromou
2010-01-13unimplement repeatedToMe() until we figure out howEvan Prodromou
2010-01-13memoize Notice::whoGets()Evan Prodromou
2010-01-12Merge branch '0.9.x' into inblobEvan Prodromou
2010-01-12remove transaction for Notice save; causes deadlocksEvan Prodromou
2010-01-12Major refactoring of queue handlers to support running multiple sites in one ↵Brion Vibber
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-12Avoid spewing warnings about returning by reference on memcached cache ↵Brion Vibber
misses by setting a var and returning it instead of trying to return false directly. This hacky workaround is brought to you by DB_DataObject's PHP 4 roots.
2010-01-11Merge branch '0.9.x' into inblobEvan Prodromou
2010-01-11Regression fix: don't spew notices to log every time we get a non-cached ↵Brion Vibber
user object
2010-01-11Merge branch 'sessionidparam' into 0.9.xEvan Prodromou
Conflicts: lib/command.php
2010-01-10Merge branch 'master' into 0.9.xEvan Prodromou
Conflicts: classes/Memcached_DataObject.php
2010-01-10check before saving a thumbnailEvan Prodromou
2010-01-10check before inserting File_oembed and File_thumbnailEvan Prodromou
2010-01-10don't put Users with object IDs in the cache, and don't fetch themEvan Prodromou
2010-01-10always set site/server to hostname if it existsEvan Prodromou
2010-01-09allow hostname with SSLEvan Prodromou
2010-01-09use nickname, not sitename, in domain for SSLEvan Prodromou
2010-01-09correct superglobal variable nameEvan Prodromou
2010-01-09redirect to sitename.wildcard for SSLEvan Prodromou
2010-01-09Redirect to a one-time-password when ssl and regular server are differentEvan Prodromou
2010-01-09whoGets() method for NoticeEvan Prodromou
2010-01-09create new Inbox from Notice_inbox if not exists at read/write timeEvan Prodromou
2010-01-09initialize an Inbox from Notice_inbox recordsEvan Prodromou
2010-01-09disable all Notice_inbox functionsEvan Prodromou
2010-01-09Revert "Replace Notice_inbox with Inbox"Evan Prodromou
We use Notice_inbox to transition to Inbox. This reverts commit 7640d3f07bad0710d69575efc7ceda115f24a60a.
2010-01-09some formatting changes to make inblobs workEvan Prodromou
2010-01-09Use inbox instead of notice_inboxEvan Prodromou
2010-01-09Replace Notice_inbox with InboxEvan Prodromou
2010-01-09flip exe bitEvan Prodromou
2010-01-09add inbox data classEvan Prodromou
2010-01-07Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.xEvan Prodromou
2010-01-07Fixes to bugs where non-local messages were being wrong put in the public ↵Ciaran Gultnieks
timeline and public xmpp feed
2010-01-06fixup keytypes so it returns the types no matter what kind of class it isEvan Prodromou
2010-01-06Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.xEvan Prodromou
2010-01-06only encache new objects when insert was successfulEvan Prodromou
2010-01-06...and drop the unnecessary &reference from child class pkeyGet() overrides.Brion Vibber