Commit graph

16 commits

Author SHA1 Message Date
Pete Fritchman
eeeb7b4cd3 - AMQPize. 2009-10-19 06:23:09 +00:00
Pete Fritchman
257c2de5d0 - actually, since @close is set, it's safe to end EM right here 2009-10-19 05:53:17 +00:00
Pete Fritchman
e909d241ec - less verbose
- make @close work
- main @id queue cannot be :exclusive (nobody else can write)
- properly make topic exchange auto_delete and exclusive
- refactor search.rb client, start towards a common SearchClient class
  (and work with amqp)
2009-10-19 05:52:18 +00:00
Pete Fritchman
56aac96795 s/stomp/amqp/ 2009-10-19 04:36:06 +00:00
Pete Fritchman
27204e825b - remove some debugging cruft
- remove sample agent.redhat.rb; sample config is the same thing
- indexers now broadcast to each other and build up a directory
- indexers respond to a directory request and provide a list of indexers
- move some errors/usage messages to $stderr
- refactor search.rb to query all available indexers
2009-10-18 23:38:35 +00:00
Jordan Sissel
fac8def339 - don't use stats anymore 2009-09-10 17:58:41 +00:00
Jordan Sissel
434a633013 - hashbind is back! Dynamically generate methods that we would normally
hand-code. This method is as fast as the hand-coded method and with less
  writing.
- Make message registration easier with a simple 'register' function:
  class Foo < Message
    register
  end

  We dynamically generate the message 'type' by the class name.
2009-09-10 09:59:24 +00:00
Jordan Sissel
07ade32cc9 - Add 'SearchHits' request to get the count of results (but not the results)
for a given search query.
- Allow a client to close in a message handler, but only handle the actual
  close until after we have ack'd the message.
2009-09-08 09:51:35 +00:00
Jordan Sissel
d6cf0f34fb - ruby-prof showed that hashbind was taking the most time, so convert away from it.
- make it easy to try using ruby  marshal instead of json for wire format, for comparing speed.
- Set Thread::abort_on_exception so when threads die due to simple syntax or
  name errors they don't die silently.
- Add basic search client
2009-09-08 06:05:09 +00:00
Jordan Sissel
f55513ba12 * In client ack mode, StompServer will only send one message at a time, waiting
for an ack for that message before sending another. Work around this:
  - batch up messages to sendmsg() and flush when there are more than 10 in the
    queue or there has been more than 1 second since flushing and the queue is
    non-empty

This increases the indexing rate by a factor of 6.
2009-09-06 23:38:04 +00:00
Jordan Sissel
1e33e3af19 - Got things happy using STOMP 2009-09-06 22:13:06 +00:00
Jordan Sissel
42b767fc85 - move to use STOMP instead of our own silly messaging protocol. STOMP has:
* message ids
  * reply support
  * message persistence until ack

Not fully working yet.
2009-09-06 10:37:10 +00:00
Jordan Sissel
46c4feb300 - Support ruby 1.9 2009-08-18 19:47:05 +00:00
Jordan Sissel
7b83c35eaf - Don't use EventMachine.defer for running message handlers. Turns out it's
faster if we don't push the call off to another thread.
2009-08-18 09:48:29 +00:00
Jordan Sissel
42df5ba36b - Support yielding to blocks for client and server #run methods
- Start hacking on having client writes block if we are far behind on getting
  message acks (w/ exponential backoff).
2009-08-18 09:45:02 +00:00
Jordan Sissel
173840a827 - Refactor network code to use EventMachine
Message decoding is working, but I think we're silently dropping data somewhere.
2009-08-18 09:01:39 +00:00