Hi all, just a quick announcement that the Faye project [
http://faye.jcoglan.com] just put out a bug fix release that adds a few
spots of polish to the 0.6 line. Faye is an easy-to-use pub/sub messaging
system for Ruby and Node. Here’s what you need to know if you’re upgrading:
=== 0.6.3 / 2011-07-10
TestSwarm build: http://swarm.jcoglan.com/job/69/
- Use sequential message IDs to reduce memory usage on the client side
- Only send advice with handshake and connect responses
- Stop trying to publish /meta/* messages - no-one is listening and it
breaks /** - Fix bug causing invalid listeners to appear after a client reconnection
- Stop loading ‘rubygems’ within our library code
- Make sure we only queue a message for each client once in the Redis engine
- Use lists instead of sets for message queues in Redis
- Improve clean-up of expired clients in Redis engine
Some more detail on each of these:
- Use sequential message IDs to reduce memory usage on the client side
Previously we were using random 128-bit IDs for messages, and the
requirement that each message ID be unique per connection meant we had to
store all previous used IDs in memory. Switching to sequential IDs means we
only store one number and the memory use doesn’t grow over time.
**** Only send advice with handshake and connect responses
This is a bandwidth-saving measure – advice was being attached to all
outgoing messages when it only really needs to be attached to /meta/*
messages.
**** Stop trying to publish /meta/* messages - no-one is listening and it
breaks /**
The /** channel was unusable because internally published /meta/* messages
were leaking out of it. We’ve stopped publishing these for the time being
since you cannot subscribe to them. /meta/* subscriptions for local
server-side clients is on my to-do list.
**** Fix bug causing invalid listeners to appear after a client reconnection
People were getting “Object ‘true’ has no method apply()” after a
reconnection with the server, this is now fixed.
**** Stop loading ‘rubygems’ within our library code
Ruby libraries just shouldn’t do this.
**** Make sure we only queue a message for each client once in the Redis
engine
This simplifies the logic and reduces the number of Redis requests involved
in routing a message to the right clients. It also eliminates a potential
race condition where a client might be sent a message twice if it had two
reasons to receive it, e.g. being subscribed to /foo and /*.
**** Use lists instead of sets for message queues in Redis
Again, simplifies how queued messages are flushed when a client connects,
and reduces the number of Redis requests.
**** Improve clean-up of expired clients in Redis engine
Previously, the server that last receive a connection for a client was
responsible for detecting if the client became inactive. Now, all servers
run a periodic GC task that cleans up all inactive clients. This means you
won’t be left with stale data in your database if the server responsible for
the stale clients goes down.
IMPORTANT UPGRADE NOTES
As usual, the APIs in this release are backward compatible. However the
Redis schema changes mean you will need to start with a fresh Redis database
to run this version. In particular:
- /clients was a SET and is now a ZSET
- /clients/*/ping are no longer used
- /clients/*/messages were SETs and are now LISTs
Please get in touch if you have any problems upgrading.
···
–
James Coglan
http://jcoglan.com
+44 (0) 7771512510
–
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups “nodejs” group.
To post to this group, send email to nodejs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
nodejs+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en