This wasn't documented anywhere, so I figured others might find it useful. In MongoDB you can tail a capped collection, much like using the tail -f command. This works because Mongo uses cursors. Tailing's a nifty trick, especially if you're using Mongo for logging.
I'm using Phil Burrows mongo_db_logger to log all Rails reqs to a capped collection at the moment, I'd recommend dropping this into your rails app, after modifying it to read your mongo config so you always have it ready.
In a recent email conversation, I was asked about getting started with ZeroMQ by another Rubyist (the awesome Ilya Grigorik)
I just this week had an idea for realtime app stats/messaging using ZeroMQ. I wanted to be able to view events from my app in real time, and be able to archive them or do any random thing with them. Hence, dripdrop was born. It's a pretty cool way of doing collecting stats or performing async tasks. There's a full description of it on the GitHub project page at: http://github.com/andrewvc/dripdrop.
So, it's been a month, and I still haven't put it up here, I'm now working as a Rails developer for online invitations and greetings company cocodot.
If you haven't see cocodot, it's a pretty interesting concept that I'm quite excited about. We occupy the the greetings space, but have better execution than the competition, we probably have the best designed greetings and cards of anyone out there, thanks to an amazing creative staff. The wedding invitations system is pretty slick as well, it's probably the best way to do online wedding invitations at the moment.Sendgrid's a great way to send email from your app. They provide statistics, reliable delivery, and a fantastic XML/JSON API. If you're using Ruby, I recommend checkout out Sendgrid Toolkit, which I just found out about.
Sendgrid Toolkit is pretty much a thin wrapper using jnunemaker's HTTParty, which I haven't heard about till now. HTTParty's a pretty cool way to painlessly create an interface to a Web API.Sendgrid Toolkit's use of HTTParty makes adding functionality very easy. I added bounce retrieve and delete functionality by merely adding the small number of lines seen in the code sample.
There are many ways to do AIO. I know of none that don't use threads, either kernel threads or user process threads. Now, the threads could be "light weight", but there's still a calling context that blocks on an operation. But no implementation is equivalent to, say, how the socket subsystem [state machines] work, where the only state that needs to be maintained is a queue of waiting objects (where object != thread). To put it simply, all the AIO implementations use too much memory and do too much book keeping (like thread scheduling) than strictly necessary, because kernels don't have a way to to "poll" on VM pages (as opposed to polling on disk interrupts, which you can accomplish when do doing direct I/O).