1. 31 Dec, 2015 2 commits
  2. 17 Jul, 2015 1 commit
  3. 04 Jun, 2015 1 commit
  4. 09 Apr, 2015 1 commit
  5. 17 Sep, 2013 1 commit
  6. 12 Aug, 2013 1 commit
    • mmn's avatar
      staticGet for sub-Managed_DataObject classes now calls parent · 1a9a8ea7
      mmn authored
      The parent class for our database objects, Managed_DataObject, has a
      dynamically assigned class in staticGet which objects get put into,
      leaving us with less code to do the same thing.
      
      We will probably have to move away from the DB_DataObject 'staticGet'
      call as it is nowadays deprecated.
      1a9a8ea7
  7. 22 Aug, 2011 1 commit
  8. 22 Mar, 2011 1 commit
    • Evan Prodromou's avatar
      Mass replacement of #-comments with //-comments · 83fb5e60
      Evan Prodromou authored
      like leprous boils in our code. So, I've replaced all of them with //
      comments instead. It's a massive, meaningless, and potentially buggy
      change -- great one for the middle of a release cycle, eh?
      83fb5e60
  9. 19 Nov, 2010 1 commit
  10. 26 Jun, 2010 1 commit
  11. 22 Jan, 2010 4 commits
    • Craig Andrews's avatar
      Will re-enable anything queueing after 0.9.x merge · 78eb9c78
      Craig Andrews authored
      Revert "Any object (not just Notice's) can be queued"
      
      This reverts commit 77ea02ca.
      78eb9c78
    • Brion Vibber's avatar
      XMPP queued output & initial retooling of DB queue manager to support non-Notice objects. · c7507e7e
      Brion Vibber authored
      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
      c7507e7e
    • Brion Vibber's avatar
      XMPP queued output & initial retooling of DB queue manager to support non-Notice objects. · 0e852def
      Brion Vibber authored
      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.
      0e852def
    • Brion Vibber's avatar
      XMPP queued output & initial retooling of DB queue manager to support non-Notice objects. · 26fdf0c9
      Brion Vibber authored
      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.
      26fdf0c9
  12. 21 Jan, 2010 1 commit
  13. 13 Jan, 2010 1 commit
    • Brion Vibber's avatar
      Major refactoring of queue handlers to support running multiple sites in one daemon. · ec145b73
      Brion Vibber authored
      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
      ec145b73
  14. 06 Jan, 2010 1 commit
  15. 28 Jun, 2009 1 commit
  16. 23 Dec, 2008 4 commits
    • Evan Prodromou's avatar
      TRUE · 7ad2f2a3
      Evan Prodromou authored
      More PEAR coding standards global changes. Here, I've changed all
      instances of TRUE to true and FALSE to false.
      
      darcs-hash:20081223194428-84dde-cb1a1e6f679acd68e864545c4d4dd8752d6a6257.gz
      7ad2f2a3
    • Evan Prodromou's avatar
      change function headers to K&R style · 04ef1ba8
      Evan Prodromou authored
      Another huge change, for PEAR code standards compliance. Function
      headers have to be in K&R style (opening brace on its own line),
      instead of having the opening brace on the same line as the function
      and parameters. So, a little perl magic found all the function
      definitions and move the opening brace to the next line (properly
      indented... usually).
      
      darcs-hash:20081223193323-84dde-a28e36ecc66672c783c2842d12fc11043c13ab28.gz
      04ef1ba8
    • Evan Prodromou's avatar
      replace NULL with null · eb2f9c98
      Evan Prodromou authored
      Another global search-and-replace update. Here, I've replaced the PHP
      keyword 'NULL' with its lowercase version. This is another PEAR code
      standards change.
      
      darcs-hash:20081223192129-84dde-4a0182e0ec16a01ad88745ad3e08f7cb501aee0b.gz
      eb2f9c98
    • Evan Prodromou's avatar
      replace all tabs with four spaces · edbc0c66
      Evan Prodromou authored
      The PEAR coding standards decree: no tabs, but indent by four spaces.
      I've done a global search-and-replace on all tabs, replacing them by
      four spaces. This is a huge change, but it will go a long way to
      getting us towards phpcs-compliance. And that means better code
      readability, and that means more participation.
      
      darcs-hash:20081223191907-84dde-21e8efe210e6d5d54e935a22d0cee5c7bbfc007d.gz
      edbc0c66
  17. 26 Sep, 2008 3 commits
  18. 30 Aug, 2008 1 commit
  19. 28 Aug, 2008 1 commit
  20. 27 Aug, 2008 2 commits
    • Evan Prodromou's avatar
      change queue_item to use a compound primary key · 35ed6f47
      Evan Prodromou authored
      Breaking up to use multiple queue handlers means we need multiple
      queue items for the same notice. So, change the queue_item table to
      have a compound pkey, (notice_id,transport).
      
      darcs-hash:20080827211239-84dde-db118799bfd43be62fb02380829c64813c9334f8.gz
      35ed6f47
    • Evan Prodromou's avatar
      break up monolithic xmppdaemon into multiple queue handlers · b9f0ea6f
      Evan Prodromou authored
      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
      b9f0ea6f
  21. 19 Jul, 2008 1 commit
  22. 15 Jul, 2008 1 commit
  23. 09 Jul, 2008 1 commit
  24. 04 Jul, 2008 2 commits