Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 54fa8aa406
Fetching contributors…

Cannot retrieve contributors at this time

file 200 lines (170 sloc) 9.16 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200
== 0.8.0 / 2012-01-19
  * Fixed some issues so this gem is compatible with ffi-rzmq
    version 0.9.5 at a minimum.
    
  * Enforce some common-sense defaults in the Configuration
    objects.
    
  * Modify how Queue and Forwarder print their verbose output.
    Uses STDERR.print now so it is 1) thread-safe, and 2) all
    output is printed as a single unit. Prior to this, printing
    data out could get confused because #puts is not thread-safe.
    
  * Saves the reactor name in the thread. This is used for enforcing
    that operations *all* happen on the reactor-thread. Attempts
    to modify the reactor from non-reactor threads will fail
    and print a warning.
    
  * Makes sure to start the logging client from the reactor thread
    to avoid race conditions at startup.
    
  * The exception handler is now passed to Timer objects. If code
    running during a timer execution throws an exception, it is
    caught right away.
    
  * Rescues *all* Exceptions now rather than just StandardError.
  
  * Timer comparison is done via #object_id now rather than its
    former methodology.
  

== 0.7.1 / 2011-12-9
  * Updated the Devices to use a Device::Configuration instance
    for configuration rather than that long method signature.
    Makes all components conform to this new configuration
    mechanism consistently.
    
  * Removed responsibility for saving XREQ/XREP/DEALER/ROUTER
    routing information from the Server modules. The envelope
    is passed to the callback, so it's the receiver's
    responsibility to save that routing information if they need
    it.
    
  * Fixed a potential bug where we could call #resume_read or
    #resume_write on a nil socket. A little extra sanity checking
    never hurt anyone.

  * Fixed ZM::Configuration so that subclasses can still see
    and set the parent class' variables when iterating over the
    accessor fields. Took a while to figure out the correct
    metaprogramming techniques, but I learned quite a bit about
    Ruby inheritance, inheritance visibility, etc.

== 0.7.0 / 2011-10-28
  * Created a class for holding Reactor and Server configurations.
    This is much nicer than passing in individual args or a hash.
    
  * Added the ZM::Servers module to make building servers a little
    easier. The biggest improvement is for making servers that
    utilize XREP/ROUTER sockets since the module handles the
    splitting of the routing envelope messages from the body.
    
  * Fixed a bug where a timer that raises an exception prevented
    other periodical timers from renewing. Thanks to Tim
    Carey-Smith for the bug report!

== 0.6.0 / 2011-10-04
  * Compatibility with ffi-rzmq 0.9.0 and added some conditional
    logic to support 0mq 2.1.x and 3.x APIs.
  
  * Removed all exceptions and replaced them with return codes.

  * Added :exception_handler key to Reactor#new so exceptions can
    be managed by user code.

== 0.5.2 / 2011-07-21
  * Added PUSH and PULL socket types. Never needed them until now.
  * Added a +context+ reader to the Reactor class.
  * Changed default behavior for all sockets to use ZMQ:LINGER 1
    as a socket option. By default, this prevents a call to
    #close from hanging forever if there are unsent messages in
    queue.
  * Expose #logger accessor (read-only).
  * Refactored Reactor#log so that most of the work is performed in
    the LogClient (tell, don't ask!).
  * Added LogClient#puts so that a logger instance can be passed to
    other objects who expect an IO-like object that responds to #puts.
    
== 0.5.1 / 2011-05-03
  * Added Reactor#oneshot_timer_at for scheduling a timer to fire at
    an exact time.
  * Changed Reactor#next_tick to use #shift instead of #pop for running
    blocks. Originally it was running the blocks in the reverse order
    that #next_tick was called. Blocks are now run in the *same* order
    as they were created by a call to #next_tick.
  * Added a timestamp to all messages created using Reactor#log.
  
== 0.5.0 / 2011-03-3
  * Changed the constructor for the ZM::Reactor class. It now takes
    an optional third hash argument. One of the keys that it uses
    is :zeromq_context. This allows a user to create a master 0mq
    context and share it with multiple reactors. The point of that is
    to allow the use of the :inproc transport. That transport is
    somewhat misnamed since it only allows "inprocess" communication
    between sockets created by the same context. I needed :inproc to
    work around a 0mq memory leak (still unfixed) and discovered this
    issue.
    A second key is :log_transport which is used by the logging
    facility.
    In the future, the first two arguments to ZM::Reactor will likely
    be rolled into the hash argument. That will be a backwards-
    incompatible change, so I'm hoping folks read these notes and
    start preparing.
  * Many fixes to ZM::Timers. Cancellation is more intelligent about
    matching timers. Inspection of timers also provides better detail
    about their contents. Lastly, expired timer removal is much clearer
    in how it functions *and* it is faster by an order of magnitude.
    (Note: Array#shift is *way faster* than Array#delete_at(0)).
  * Timer expiration has changed. Originally, timers fired only when
    the current time was *greater than* its firing time. Now timers
    fire when the current time is *greater than or equal to* its firing
    time.
  * Modified how arguments are passed to the Forwarder and Queue
    devices.
  * Devices now default to a ZMQ::LINGER of 0 (drop messages
    immediately upon socket close) and a ZMQ::HWM of 1 (only allow
    1 outstanding message between senders and receivers). These
    parameters can be modified using the new argument hash.
  * ZM::Address now supports the :inproc transport.
  * Fixed a memory leak where a message was not released when an
    internal recv operation returned EAGAIN. The code was leaking an
    empty ZMQ::Message every time.
  * Added a facility for logging. When a Reactor is instantiated a
    user may pass in a transport string that indicates where the
    reactor may *connect* and publish log messages. Part of the
    contract is that this transport already has a listener bound
    to it before the connection is attempted (e.g. for inproc
    transports). If inproc is used, then the user also needs to
    pass in the shared context via :zeromq_context.
  * Fixed a bug in Socket#send_messages where EAGAIN was not always
    properly detected and bubbled up to its caller.
  * Refactored socket deletion. Hopefully it is easier to understand.
    
== 0.4.1 / Unreleased

== 0.4.0 / 2010-12-16
  * Replaced SortedSet in Timers with an Array and a custom routine
    for finding the in-order index for an insert. The routine
    uses a binary search algo so it can find the proper index in
    O(nlog n) time. This resulted in a 2 order of magnitude perf
    increase when using more than a handful of timers.
  * Modified the default reactor poll interval to 10ms from 100usec.
    Also, fixed the poll routine so that it sleeps for poll_interval
    when there are no procs scheduled and there are no sockets
    registered. With no sockets, the call to Poller#poll returns
    immediately. This was showing as a busy loop and pushing CPU
    to 100% for some users.
    With this change, timers now have a minimum *default* resolution
    of 10 milliseconds. The poll interval can be overridden and set to
    a minimum of 1ms for better timing controls.

== 0.3.2 / 2010-08-25
  * Fixed a bug in Timers where the timers were never getting removed
    after they fired. Bug was caused by a Ruby bug with #delete_if. While
    deleting each fired timer, the delete_if loop was exited early via
    a call to #break as an optimization. The #break caused all deletes to
    be ignored.
    See bug http://redmine.ruby-lang.org/issues/show/2545
  * Minor fixes to the ping-pong examples. Was missing some calls to
    register/deregister for read/write events. The socket semantics have
    changed since earlier revisions; those changes didn't get caught until
    now.

== 0.3.1 / 2010-08-16
  * Forgot to load the xreq/xrep files during startup
  * Added support for resetting a timer's firing schedule. Useful for when
    the time source has been overridden; let's existing timers
    reschedule themselves using the new time source.
  * Fixed a logic bug with delivery of multi-part messages

== 0.3.0 / 2010-08-15
  * Added XREQ/XREP socket types
  * Moved the time functions for ZM::Timers into a pair of
    class methods. Instead of accessing Time directly, it should
    be accessed via ZM::Timers.now and ZM::Timers.now_converted.
    Doing so allows the programmer to reopen the ZM::Timers class and
    redefine how time is procured if necessary (e.g. every second of
    wall clock time should translate to 1 minute of time inside the
    reactor).
  * Still needs specs!

== 0.2.0 / 2010-06-06
  * Updated internals to conform to the 0mq api as of
  release 2.0.7.

  * Minor api enhancements.

== 0.1.0 / 2010-06-02

* 1 major enhancement
  * Birthday!
Something went wrong with that request. Please try again.