» tagged pages
» logout

sorted by: recent | see : popular
Content Tagged with Miscellaneous + cool

Nanite: Self Assembling Cluster of Ruby Daemons

nanite.pngIt was with much excitement that Merbcamp started yesterday with a keynote from Ezra Zygmuntowicz, initial creator of the Merb Web application framework. Aside from covering Merb-related news, Ezra revealed a project called Nanite - a "self assembling cluster of Ruby daemons."

A Nanite installation is based around a "mapper exchange" with which Ruby daemons (called Nanite "agents") register. Nanite mappers (running in, say, Rails or Merb applications, or even command line apps) can then call the exchange and gain access to the functionality of the agents. The mapper exchange makes it possible for daemons / agents to start, stop and die while allowing the whole cluster to be self-healing.

Ezra says:

Nanite is a new way of thinking about building cloud ready web applications. Having a scalable message queueing backend with all the discovery and dynamic load based dispatch that Nanite has is a very scalable way to construct web application backends.

It's still early days, but Nanite could become a key part of the back end of Ruby-developed Web applications in the future. Nanite offers some key benefits (scalability, reliability) on the cheap - it's worth investigating if these traits sound useful for your own projects.

Post supported by RichAppsConsulting: Are you looking for an Agile web 2.0 company to develop your company's website quickly and professionally? At RAC, we have a highly trained staff of developers who are experts in Rails, Flex and PHP development. We can develop solutions for your company with your budget and timeline in mind. We pride ourselves on having superior Rails programming skills the and striving for continuous improvement. For more information, call our office at 202.470.6683 or email us at contact@richappsconsulting.com. Please visit our website at http://www.richappsconsulting.com.

Ruby: Inside Ruby

JS.Class - JavaScript in a Ruby Style

jsclass.png JS.Class is an attempt at making JavaScript more Ruby-like. More specifically, it's a library that makes object oriented development easier in JavaScript (in comparison to JS's prototype technique, at least) by implementing Ruby's core object, module, and class systems as well as some of Ruby's meta-programming techniques.

As well as ports of Enumerable, Observable, Comparable, and Forwardable, you get subclassing, mixins, reflection, late-binding arguments, singleton methods, method binding, and Ruby-like inheritance. Of course, JavaScript gives access to many of these elements already, but JS.Class presents things with a Ruby flavor.

The official JS.Class site is particularly well done and each main area is well documented.

Ruby: Inside Ruby

Terminator: A Hardcore “Timeout” For Ruby Code

terminator.png

Terminator is a new library developed by Ara Howard and Mikel Lindsaar that solves the problem of Ruby's own "timeout" feature not actually being up to the task of terminating code. timeout is supposed to terminate the execution of a block of code if it's not finished within a certain amount of time, but due to Ruby's threading model it doesn't always work that way!

Initially, Mikel considered SystemTimer - another replacement for timeout. SystemTimer is based upon UNIX alarm signals and, for some reason, still didn't resolve the main problem (although SystemTimer has ridiculously good documentation and is clearly working well for someone). After lamenting on the Ruby-Talk mailing list, Ara Howard stepped in with a potential solution which turned into what is now Terminator.

Terminator works by starting up another Ruby instance that tracks the PID of the Ruby instance that spawned it. Windows is currently not supported.

You can install Terminator with gem install terminator or check out the code directly from here (note: they have some weird issue with referrals, just reload the URL when you get there).

Ruby: Inside Ruby

Could JavaScript Power A Significant Future Ruby Implementation or VM?

jslilimg.pngThis week you may have heard about "Chrome," a new Web browser being developed by Google (if you haven't, read this online comic book that demonstrates its worthiness). Associated with Chrome is V8, a new open source JavaScript engine that's designed to execute JavaScript code at never-seen-before speeds.

All this reminded Marc-André Cournoyer (of Thin fame) of HotRuby (see previously on Ruby Inside), an experimental JavaScript-based virtual machine that can run YARV-compiled Ruby code, and he set out to test the performance of Ruby code running on HotRuby on top of V8. The results are far from scientific and many commenters have pointed out flaws, but Marc's observations are a great first step toward seriously considering the possibility of using JavaScript as an execution route for Ruby. It also appears that Hongli Lai and Ninh Bui of Phusion (of mod_rails / Passenger fame) are considering the possibilities.

JavaScript is a reasonably unique language in that it can support most (all?) of the patterns and styles of programming that Rubyists are familiar with, even if the code doesn't read as well. This could make JavaScript a perfect target language not only for a virtual machine (as with HotRuby) but as a language to convert Ruby into for further use / execution. We're going to feature these projects separately on Ruby Inside in the future, but projects like Red and RubyJS could eventually make this a reality, and turn JavaScript itself into another form of Ruby implementation by proxy. Exciting times!

Ruby: Inside Ruby

RubyFringe Roundup: The Best Ruby Conference Ever?

rubyfringecrowd.png
(Photo credit: Kieran Huggins)

RubyFringe - described as a "pricey, limited-attendance smoozefest" by Ruby documentation co-ordinator James Britt or as "an avant-garde conference for developers that are excited about emerging technologies outside of the Ruby on Rails monoculture" by the organizers - went ahead last week and appears to have been a significant hit. A small conference with a reasonably high ticket price (though far less than RailsConf Europe!), RubyFringe was set to be a very unique sort of conference with parties, drinks and out-of-hours entertainment laid on, and a limited number of tickets made available to ensure a more intimate gathering. The gamble appears to have paid off.

Praise

I'm not quite sure exactly what went down (I had to pull out of attending) but all references I've seen have been almost over-the-top with excitement and praise:

Soleone says: "Rubyfringe was amazing! So many good talks and great people. Best talk: Giles' presentation on computer generated music. Laughed my ass off!"

Rob Sanheim says: "rubyfringe was a blast, and now i can't sleep."

Lennon Day-Reynolds says: "RubyFringe after-party unsurprisingly turned out to be awesome."

Josh Merchant described it as "an amazing - inspirational - creative- experience."

Heck, there are far too many positive mentions to read on Twitter.

Mark McGranaghan of TechCrunch wrote directly to Ruby Inside:

RubyFringe was a huge win. Unspace set out to raise the bar for software conferences, and I think that they succeeded. I hope that RubyFringe does for web conferences what Rails did for web development; show others that there is a better way, that it does not require corporate sponsorship, and that it can fun, artistic, and productive all at the same time.

Content

There are over 1000 photos from the event on Flickr.

Joey deVilla has put together some handy notes for most of the presentations.

Rowan Hick has put together a list of his RubyFringe highlights.

InfoQ attended the event and, I am told, will be putting up videos of several presentations on their site soon. Until then, the content of the talks is summarized here.

The next RubyFringe?

With such success, it's inevitable another RubyFringe conference will take place within the next year. If you're interested, Pete Forde suggests joining the Google group, and keeping an eye on RubyFringe.com for more info (although it'll be here at Ruby Inside too). It remains to be seen if the success of RubyFringe will encourage "avant garde" conferences elsewhere in the world or for non Ruby communities generally, but Ruby Inside wants to hear about them if so.

Ruby: Inside Ruby

libxml-ruby 0.8.0 Released: Ruby Gets Fast, Reliable XML Processing At Last

Picture 1.png

Ruby's is not known for its deftness with XML. On RubyFlow, I considered calling the community to arms over it, and solicited twenty responses on what the problem is, and what we could do about it. Robert Fischer was lamenting on the state of Ruby's libxml library, and didn't seem to like REXML much either. Tim Bray has also had a few complaints about REXML. It seemed there was a problem to be fixed; a gap in the market, as it were, for a decent XML parser for Ruby. Hpricot, despite really being an HTML parser, would have to get us by in the meantime.

Today, however, libxml-ruby 0.8.0 has been released, and Charlie Savage explains why this is such a big deal. libxml-ruby now runs on Windows (thanks to Charlie), doesn't segfault all the time, and the bindings have all been fixed over the past year (thanks to Dan Janowski). You can get going with it right now with a simple gem install libxml-ruby

libxml-ruby is known for its performance, the latest release doesn't disappoint. For a range of simple tasks, libxml clocks in at ten times quicker than Hpricot like-for-like and between 30 and 60 times faster than REXML. Charles adds:

In addition to performance, the libxml-ruby bindings provide impressive coverage of libxml's functionality. Goodies include:

  • SAX
  • DOM
  • XMLReader (streaming interface)
  • XPath
  • XPointer
  • XML Schema
  • DTDs
  • XSLT (split into the libxslt-ruby bindings)

Charles is planning to write a proper tutorial in the next week, covering some of the key features, but suggests referring to the API documentation in the meantime. The test suite (located in the test directory that comes with libxml-ruby) also looks like a great resource for code examples; very clean and straightforward. If you have any libxml-ruby tutorials or resources of your own, please post them in the comments here.

Congratulations to all of those involved in libxml-ruby's long history and especially to Charlie Savage for giving it the finish push to this mature state. Ruby's XML woes are tempered, for now at least.

Ruby: Inside Ruby

Autumn: Easy, Feature-Rich IRC Bots in Ruby

autumnbot.jpg

Autumn is a framework by Tim Morgan that makes it easy to develop powerful IRC (Internet Relay Chat) bots with Ruby. Version 3, a significant update, was launched just a week ago. The code is available on Github, so it's ready to fork, tweak and work on to your heart's content.

An instance of an "Autumn app" is laid out in a similar way to a Rails app. There are config, doc, script, libs, tmp, and log folders, containing much what you'd expect, as well as a leaves folder (Autumn refers to "bots" as "leaves") that contains any number of folders each containing data, helpers, models, tasks, and "views" for individual bots. A default Autumn app comes with two bots pre-installed called insulter and scorekeeper that you can use to learn from.

Autumn is a pretty significant piece of work and Tim has done an excellent job at documenting it, leaving almost no stone unturned in demonstrating how to create bots / leaves of your own with the framework.

Ruby: Inside Ruby

Join Why The Lucky Stiff (And Others) For an Online “ShoesFest”

shoes-clock.png

You've used Shoes, Why The Lucky Stiff's GUI-app toolkit for Ruby, right? No? You've at least heard of it? (If the answer to this is also no, seriously chastise yourself now.)

Ernest Prabhakar has announced that two online "ShoesFests" will be taking place, involving why the lucky stiff and "friends," with the hope of alluring wannabe hackers (whether on Shoes itself or Shoes-based applications):

The goal of these events is to write and share fun little applications using Shoes, a clever little cross-platform GUI toolkit written in Ruby. This will allow us to test, document, and file bugs on how the various Shoes features work on the different supported platforms (Linux, Windows, Mac), in preparation for our next major release on July 31st, 2008.

No Ruby — or programming — experience is required; we’d love to find out how easy it is for novices to learn Shoes! Of course, if you happen to know the Ruby C API, expert help is always appreciated.

There are two ShoesFests, each taking place for 24 hours, from noon GMT (8am Eastern) on Friday, July 11th, and from noon GMT (8am Eastern) on Friday, July 25th. The venue will be #shoes on the Freenode IRC network (irc.freenode.net).

If spending a day on IRC, asking questions, talking nonsense, helping others, and otherwise hacking away on Shoes and Shoes-based applications with a bunch of exciting people sounds fun to you, make sure to put this Friday in your calendar.

Ruby: Inside Ruby

rbiphonetest: Unit Testing iPhone Apps with Ruby

20080703-mqpqqhdk4e49x3yhhb8t2g9rjg.jpg

Dr Nic Williams has been busy playing with iPhone and Objective C development lately and, unsurprisingly, has found a way to bring Ruby into the mix. He has developed rbiphonetest, a Ruby-based testing framework for iPhone / Objective C applications that uses RubyCocoa to provide the necessary bridge. As well as producing an in-depth 20 minute demonstration screencast, he has also packed some key information into his blog post.

If you're a Rubyist with ambitions of developing native iPhone applications using Objective C (and perhaps even Ruby one day), it's certainly worth a look (as are all of Dr Nic's projects, of course).

Ruby: Inside Ruby

Dave Thomas’s Object Model and Metaprogramming Screencasts

dtvidcap.png

Disclaimer: I have no financial connection to the Pragmatic Programmers and other than through receiving these videos to review get no direct benefit from this review.

It was only a few weeks ago I announced that the Pragmatic Programmers were getting into the screencasting business. The first Ruby related videos were from the Everyday Active Record series by Ryan Bates. The reaction to these across the Ruby blogosphere has been very positive, and true to their word, the Pragmatics have been quick to release some more interesting videos. The latest addition is the Ruby Object Model and Metaprogramming series by Dave Thomas (of Pickaxe fame). Three episodes are available so far, respectively “Objects and Classes,” “Sharing Behavior,” and “Dynamic Code.” They cost $5 each and clock in at around half an hour each.

With the first episode, Dave starts off at a basic level by covering the history of object-oriented development and taking a look at the core elements of what makes up the object-oriented programming style. He moves on to looking at Ruby specific concerns, metaclasses/eigenclasses, anonymous classes, singleton methods, and the like. He manages to keep things at a level that’s immediately accessible to beginners (lots of diagrams are presented to illustrate concepts and relationships between objects and classes) but isn’t afraid to introduce more complex examples straight after. This is a common pattern throughout each of the screencasts, the contents of which are covered here.

I’d recommend these videos to anyone who wants to quickly get up to speed with the concepts involving classes, objects, and metaprogramming. I don’t believe Dave Thomas has done any screencasting before, but he comes across as a natural. His voice is engaging, eager, and authoritative, which makes the videos very easy to follow without drifting off. Certainly, these screencasts are a superb alternative to the explanations of classes, objects and metaprogramming in most Ruby books. If you’re still unsure, Dave gives a quick 3 minute introduction to the series (video).

Elsewhere: Antonio Cangiano has also reviewed these videos. Check out his review for a slightly different perspective.

Post supported by Ruby Hoedown: Come on down to the south for the Ruby Hoedown, the South’s regional Ruby conference! Submit a talk now or sign up for registration at $199. The first 50 people to use the promo code IMINSIDE will get an additional $25 off the price!

Ruby: Inside Ruby

PoolParty: One Ruby Gem = Easy EC2 Computing Cloud

poolpartylogo.jpg

Pool Party is a new tool by Ari Lerner (of ProcessorPool fame) that makes it easy to automate the deployment, monitoring (using monit), persistent storage (using S3Fuse), and load balancing (using HAProxy) of EC2 instances. While intended to be application agnostic, there’s naturally a major slant towards Ruby applications in general, with support for Rake tasks a core feature.

Ari’s announcement blog post gives more in-depth details. Development is taking place on Github (where the README is somewhat more readable than with RDoc!) along with discussions at a Google group.

Ari presented PoolParty at RailsConf last week, and his slides are available to view below (or at Scribd):

Ruby: Inside Ruby

Rubinius On Rails: Rubinius Becomes 3rd Ruby Implementation to Run Rails

rubiniusonrails.jpg

Evan Phoenix has announced that the Rubinius project has hit a major milestone: Rubinius can run Rails! This makes it implementation #3 (after MRI and JRuby) to join the Rails club and will help cement its reputation as a strong, key implementation to watch in the future. Chad Fowler goes as far as to assert that in a year’s time, Rubinius will be used in production deployments and quickly become the defacto standard Ruby implementation shortly thereafter.

Eyes are now on Microsoft’s implementation, IronRuby, that may also be joining the Rails club soon.

This post is sponsored by 16bugs — You know how cumbersome most bug trackers are. We know it, too! If you believe bug tracking should be an easy and unobtrusive task, you should try 16bugs right now. Use coupon code “RUBYINSIDE” and get 50% off when you upgrade your account.

Ruby: Inside Ruby

Building a Web App With Merb From Start to Finish

bigwoman.png

Slapp: A simple chat wall Merb tutorial is a perfect example of the sort of tutorial / guide that could encourage a lot of people to try out a new framework (as far as Merb is new, of course). It walks you through the process of developing a “chat wall” type application with Merb from start to finish (right from installing Merb to playing with the running application).

One thing that makes the tutorial stand out is that it puts test spec driven development at the heart of the application. After installing Merb and configuring the database, you’re straight into writing a story with RSpec! This is quite different to most of the Rails introductory articles which skim over testing, and it makes the guide very suitable for those who aren’t familiar with RSpec but who want to learn how to use it while developing a Web application.

Lastly, the “finished” application is available from a Gitorious Git repository for those who want to work backwards or look at the code up front.

Ruby: Inside Ruby

Interesting Ruby Tidbits That Don’t Need Separate Posts #21

RubyAMP: Amazing Ruby Bundle for TextMate

RubyAMP is a TextMate bundle that goes above and beyond the typical TextMate bundle in usefulness. It adds auto-complete from all open tabs, easy jumping to methods and classes, improved RSpect debugging support, breakpoint support (set and remove from TextMate), Merb / Rails server or console launching, development log tailing, and a lot more. There’s a screencast on the project page itself so you can get a direct look at how it all works within a minute or two.

Bicycle Location Visualization with Ruby and RMagick

bikes-in-paris.jpg

Paris has a shared bicycle scheme for those who want to get around downtown called Velib. Ardent Velib fan Thibaut Barrère decided he wanted a better way to see the availability of bikes, and put together a Ruby app that could scrape the raw data and put together a visualization for him. This is a well written article covering how he did it from start to finish.

Engine Yard Invites Ruby Developers To “Hackfests”

When a press release is so concise and well written (a VERY rare event), it seems a shame not to quote it verbatim:

Engine Yard, provider of the leading Ruby and Rails deployment platform, today announced a series of Hackfests, informal community events open to Ruby developers, where sharing, learning, and hacking rule. The inaugural Hackfest was a resounding success with participation from over 100 top Ruby and Rails developers. Two more Engine Yard Hackfests are planned for the coming months.

The first event was held this past weekend alongside MountainWest RubyConf 2008 in Salt Lake City, Ut., where Engine Yard’s Ezra Zygmuntowicz and Evan Phoenix shared the opening keynote. After the conference, folks generally look to talk tech, shoot the breeze, and hack. They split off into small groups, grab dinner, and eventually end up in various hotel rooms, awake into the wee hours.

The Engine Yard Hackfest aimed to draw these small groups together, and facilitate a mid-sized, casual, expert meeting of the minds. As an alterative to having Rubyists chat in the brief windows between conference sessions, the Hackfest offered an open-all-night comfortable workspace, with free wi-fi, dinner and snacks, and expert community leaders for company.

Rubyists are invited to participate in Engine Yard’s upcoming Hackfests, which will be held alongside GoRuCo in New York (April 26) and RubyFringe in Toronto (July 18-20).

I hear that the similar “Ruby Cave” events at the recent Ruby Fools conferences went down well, so this is a great development for those going to GoRuCo and RubyFringe.

ServiceReg - A RESTful API for RESTful APIs

ServiceReg is a new service by Chris Matthieu (of Wuby fame) that acts as an API to other RESTful APIs. Confused? Perhaps this example URL will give you an idea:

http://servicereg.com/verb/{user:password@}domain/noun{/id?params}

Still don’t get it? Thankfully Chris has put together a screencast to bring us all up to speed. ServiceReg appears to be useful for accessing third party RESTful APIs entirely through a well crafted URL to ServiceReg (without the need to send XML payloads, etc.)

Ruby’s Not Ready! (Or: Why Python Rules and Ruby Sucks)

A Python developer takes Ruby, rips it apart, and explains in 6000+ words why Ruby sucks compared to Python. It’s a ballsy essay, and if it were a lot shorter and not as well written, I’d be calling it Troll Of The Month. As it is, I think he’s missing the point a lot of the time (he tends to think Python’s better because he likes its conventions more than Ruby’s - not a compelling argument), but it’s an interesting read none the less. Anything that keeps our minds open to the fact that Ruby != perfection is worth a look.

Ruby: Inside Ruby

Couldn’t Be At MountainWest RubyConf? Watch The Presentations Now!

mountainwestlogo.png

If you couldn’t get to the popular MountainWest RubyConf two weeks ago, don’t fear. In conjunction with Confreaks, videos of all of the presentations are available to watch online. 14 videos are available, including the following:

Strengthening the Ruby Ecosystem Part I: Rubinius by Evan Phoenix - Evan gives a general overview of Rubinius, how the project has worked out so far, and what the goal is with its development.

Strengthening the Ruby Ecosystem Part II: Merb by Ezra Zygmuntowicz - A similarly general overview of Merb, a Ruby Web applications framework. A great executive overview of the Merb project generally.

Code Generation: The Safety Scissors of Metaprogramming by Giles Bowkett - Giles looks at the beauties (and dangers!) of meta programming and other voodoo with Ruby. This is a particularly interesting talk, and an ideal one to watch if you’re short of time.

Faster, Better ORM with DataMapper by Yehuda Katz - An overview of the DataMapper ORM, a compelling alternative to ActiveRecord.

Deep Ruby by Jeremy McAnally - A look at Ruby’s object model and other “deep” Ruby issues. This is a pretty interesting talk too, for those who like to look at the nitty gritty.

BDD with Shoulda by Tammer Saleh - Shoulda is a great, small, simple testing plugin for Rails applications with a BDD flavor.

Lightning Talks by Various - The lightning talks include Mike Moore doing a “Binary Lottery” program with _why’s Shoes, Chris Shea talking about “Guessmethod“, Ed Moss talking about Active Scaffold, and more.

It seems MountainWest had a really high quality level of talks, so give it a thought when choosing which Ruby events to attend next year.

(On another level, I’m kinda surprised by how many Rubyists seem to have ended up working in groups - whether ThoughtBot, ENTP, or Engine Yard.)

Ruby: Inside Ruby

Railscasts Releases 100th Free Screencast; Holds a Contest

railscastslogo.png

If you’re a Rails developer you will, I hope, be familiar with Ryan Bates’ Railcasts, an amazing site chock full of free Rails related screencasts, and just over a year after posting the first video, Ryan has released video #100, entitled “5 View Tips”, which presents five quick tips relating to your use of views in your Rails applications.

To celebrate a solid 13 months of top-notch screencast production, Ryan has collaborated with a number of sponsors to launch a Railcast 100th Episode Contest.

The contest’s “grand prize” includes an iPod Touch (!), a Code Spaces Subversion hosting plan, a Harvest plan, a $50 Pragmatic Programmers coupon, a $50 Amazon gift card, and a $50 iTunes gift card! The rest of the prizes, all the way down to 9th place, include lesser amounts of most of the same items (as well as some Peepcode goodies).

But what do you have to do to get the goodies? Easy. Write 5 Rails tips, share them with the community by May 5th, and send the URL of where they are to an e-mail address provided on the contest page. Also feel free to post the URL into the comments on this post. It won’t constitute an entry (you need to e-mail Railscasts to do that) but I might link to some of the best entries myself, and it’ll also allow other Ruby Inside readers to enjoy your hard work. Good luck!

Ruby: Inside Ruby

Scout: A Ruby Powered Web Monitoring and Reporting Service

scout.png

Disclaimer: Scout is a commercial service. I have received no compensation for mentioning this service and am posting about it merely due to my own interest in it.

Scout is a new “a la carte” monitoring and reporting service, primarily for tracking servers and Web applications, developed by HighGroove Studios. Scout lets you use plugins (provided both by HighGroove and other Scout users) written in Ruby to customize and manipulate your monitoring arrangements. You can also write your own plugins. Subscription levels will vary from a free account (one server, up to 3 plugins, 30 minute reporting intervals) up to over $100 per month for the highest level (supporting many more servers, shorter intervals, unlimited plugin usage, etc.)

The installation process and plugin system are what make Scout particularly unique and interesting. A Scout “client” is run on each machine you wish to monitor, and is installed with RubyGems (gem install scout). The client routinely runs its plugins and sends information to the central Scout service (rather than Scout “querying” the server, as with most monitoring services). Any plugins you install through the Scout Web interface are pulled down by the Scout client to all of the relevant servers automatically!

Scout is still in its pre-release stage (though not for long) but HighGroove have offered to give the first 20 Ruby Inside readers who mail rubyinside@highgroove.com an account! So.. be quick if you want a go :) (They’ve now all gone, sorry!)

I also decided to ask the Scout team a few questions about the service to get a better feel for how it works:

Is Ruby the only language used on Scout? If not, why not, and what else are you using?


James Edward Gray II: The Scout client and server are written in Ruby, yes. They make use of data formats like YAML and Ruby’s marshaled object binary format as well as communicate using protocols like HTTP, but the beating heart is Ruby at both ends.

However, most plugins will shell out to external utilities. Some of these utilities might be considered languages in their own right. For example, AppleScript can be used to communicate with or control Mac OS X applications. Even the shells themselves are languages and plugin writers may want to make use of that fact.

The reason to rely on these external sources of data is simple: plugins can get the data they need from the expert sources with very little effort. Duplicating the functionality of all popular system utilities in Ruby would be a massive undertaking and extremely error prone. Instead, we want users cranking out handy plugins by investing small slices of time. In short, we want to focus on the interesting problems that haven’t already been solved.

Which technologies does Scout use?


Derek Haynes: The web interface is a Rails app, but the bulk of the requests are processed by a separate Merb app that handles all of the alerts, reports, and errors that are sent to Scout. We went with this setup for 2 primary reasons - we need to continue to process data even when we’re updating the web interface, so we needed to decouple the web service from the app and Merb handles these requests more efficiently.

Why did you choose Ruby for Scout’s plugin language, and how has it worked out so far?


James Edward Gray II: Like her sister language Perl, Ruby is a powerful tool when used to glue system utilities together. The ease of talking to external processes and the powerful string manipulation features make it an ideal choice for collecting important data and transforming it into the needed formats for the server. This is a big strength of Ruby’s design that gets overlooked too often. We hope to change that, of course.

How does Scout plan to deal with availability?


Charles Brian Quinn: The Scout server is running on virtualized hardware, with two physical locations at InterNAP and the AtlantaNAP data centers. We are fully load-balanced with failover support. In the event of failure at one of the datacenters, we are fully redundant. We plan on scaling out horizontally as the need arises.

Do you have any plans or see any further innovations for Scout using Ruby further down the road?


Derek Haynes: I hate to sound like a Real Estate Scammer, but it’s practically unlimited. You can include any Ruby library when running a plugin (here’s an example that “loads the Rails environment” and “another that uses hpricot“), so anyone can extend the client. An obvious answer is a Ruby DSL for working with system commands. A couple of new libraries address this in different ways, but as James said earlier, a one-size-fits-all solution is a massive undertaking.

Ruby: Inside Ruby

Interesting Ruby Tidbits That Don’t Need Separate Posts #19

REST Client - Simple DSL / Ruby Library for Accessing REST Resources

rest-client.png

Adam Wiggins of Heroku has made available rest-client, a new library that makes it ridiculously easy to interact with RESTful resources and APIs (over HTTP, naturally.)

Racket - Raw Packet Manipulation with Ruby

Racket is a new Ruby library that “crafts and analyzes” raw network packets. It’s all pretty low level stuff, but a collection of straight forward examples are provided to get you started.

RubyDoes.Net - A Blog for IronRuby Fans

RubyDoes.Net is, effectively, like a Ruby Inside but for the .Net / Microsoft side of things. It focuses on IronRuby, Microsoft’s .Net implementation of Ruby. IronRuby doesn’t get a significant amount of press here on Ruby Inside, so for those with an interest in the Windows platform, RubyDoes.Net is a great blog to check out.

RSpecced Haml Scaffolding for Rails

Daniel Fischer writes in with news about the availability of Haml scaffolding for Rails. I’m not a Haml user myself, but it seems this adds a generator to Rails that makes it easy to generate RSpec-backed Haml-templated scaffolds for your Rails models. If so, and if you’re a Haml fan, go get it!

Ruby In Steel Developments - Debugger Improvements and Full JRuby Support Coming Soon

jruby-debugger.gif

Huw Collingbourne, the brains behind Visual Studio-based Ruby IDE Ruby In Steel, has written in with news of more developments. I swear the guy doesn’t eat or sleep with the amount of work he’s doing! First up, there have been some significant improvements to the Cylon Ruby debugger that enable you to change the values of variables in the middle of a debugging session, break on exceptions, break on a certain number of times a particular line of code has been run, conditional breakpoints, and more. Secondly, full JRuby support, including high speed Cylon-based debugging, is coming in the next major revision of Ruby In Steel. The quality of Huw’s work and his seemingly never-ending stream of releases and upgrades is inspiring.

InLine - 100% Ruby Solution for Inline Editing at the Console

Fabio Cevasco has put together InLine, a clever bit of Ruby code that makes it possible to create a console-based inline editing environment with pure Ruby. It seems a little bit like a hack, but it’s a very clever bit of coding and bound to be of interest to those developing console-based applications.

Ruby: Inside Ruby

Help Fund A Ruby Developer To Work On Open Source For 6 Months

greg.jpg

Last week, Gregory Brown, of the O’Reilly Ruby blog and Ruby Reports, came up with the idea of devoting his time to working on Ruby-related open source projects, as a sort of “Ruby mendicant.” He figured if he could raise at least $500 for each week of work, he could devote 20-25 hours per week to the project. The contributors would then be able to suggest ideas, and potentially vote on the things Gregory would work on. His initial ideas included working on the PDF::Writer and Ruby Reports libraries (the former of which could really do with some serious time on it), amongst other things.

People caught on to and supported Gregory’s idea, and now it’s going live! He has set up a Pledgie page where he’s attempting to raise $8000 to support 26 weeks (half a year) of this work. He has also written a formal proposal of his ideas for those who are unconvinced.

The more astute reader will note that $8000 does not cover 26 weeks at $500 per week ($13,000 total.) The reason for only needing to raise $8000, however, is because Ruby Central Inc. has pledged to match donations dollar for dollar up to a maximum of $5000! So if you give $50 to the campaign now, that turns into a whole $100 to support Gregory.

I can personally appreciate that some people will not want to support this because either they feel there are already plenty of people who spend serious time each week working on open source for free or because of the less-than-stellar results of similar experiments (such as Jason Kottke’s similar “micropatron” experiment or the caboo.se documentation drive - I’m not entirely sure all that money ever got spent?) Despite these points, I have a lot of faith in Gregory considering his past contributions to the Ruby community and in being the only significantly consistent contributor to the O’Reilly Ruby blog. I think he has the staying power to do some great work here and am more than happy to vouch for him.

Ruby: Inside Ruby

Shoes News: Free Shoes Books and Applications For Everyone!

shoesxplatform.png

It seems that Why The Lucky Stiff’s cross-platform, GUI application development environment, Shoes, is going from strength to strength! In the last several months, lots of new Shoes applications have been developed, and in the last couple of weeks there have been some interesting developments, such as Nobody Knows Shoes entering the public domain, and “The Shoebox,” a Shoes application repository, going live.

Note: Six months ago, there was a compilation post on Ruby Inside with links to Shoes related tutorials which is still worth referring to.

Nobody Knows Shoes - The Official Shoes Manual - Goes Free!

nobodyknowsshoes.png

Nobody Knows Shoes, the official guide to Shoes, was released in paperback form a few months ago, available to buy via Lulu.com where you can still pick up this gem for a mere $5.57.

As of March 1st, 2008, Why has released the guide into the public domain and it’s now also available to read online for free (as well as in PDF format.) Nobody Knows Shoes is well worth the read not only if you’re interested in Shoes, but if you like Why’s particular brand of illustration, design, and humor.

The Shoebox - A Shoes Application Repository

shoebox.png

The Shoebox is a new site dedicated to hosting Shoes-based applications. Currently there are 22 applications and games, including Tetris, Othello (known as Shoethello), Go, Conway’s Game of Life, and lots of graphics demos. Most of these work cross-platform and are great demonstrations of both the power of Shoes and Ruby.

Ruby: Inside Ruby

Ebb: C-Powered Web Server That Uses Rack - Faster than Mongrel *and* Thin

ebb-concurrency.png

Ebb is a small, extremely high performance Web / HTTP server designed specifically for hosting applications built upon Web frameworks such as Rails and Merb (and, in future, apps on other non-Ruby frameworks.) The design is event based (similar to that used by Ruby daemons that use EventMachine) but Ebb itself is written in C and dispatches requests to Rack adapters. This is a real leapfrog over the popular Mongrel and Thin daemons which are primarily written in Ruby, and results in scary levels of performance.

Since the start of 2008, it seems as if the Ruby and Rails deployment sectors have been on fire! Thin, a Ruby HTTP daemon that’s faster than Mongrel, made it on the scene in January, then we discussed the problems involved in deploying apps here on Ruby Inside, and my own SwitchPipe arrived in February. Other systems such as Swiftiply have also continued to innovate. These are exciting times!

Ruby: Inside Ruby

Video of Matz Speaking at Google about Ruby 1.9 - February 20, 2008

Google has a series of “tech talks” on YouTube where, presumably, Google gets technological luminaries to come in and give a talk about their work. The latest is by Ruby’s creator, Yukihiro “Matz” Matsumoto, and was given just a few days ago on February 20, 2008. In the video, Matz quips at Google’s reticence to use Ruby but spends most of the time talking about Ruby 1.9, YARV, JRuby, and other new developments, and fielding questions from the audience.

Ruby: Inside Ruby

Building a Twitter Agent with Ruby and Rails

twitteragentarchitecture.png

Dominiek ter Heide has put together a great tutorial that walks you through building a “Twitter agent” using Ruby, Rails and XMPP. For those who aren’t on Twitter yet, it’s a free micro-blogging cum “presence” information service that allows users to write 140 character messages that are supposed to represent their current state / feelings / location / etc. A Twitter agent, therefore, is essentially an automated Twitter user that can deliver information to other Twitter users.

The tutorial is quite in-depth with lots of code examples and helpful diagrams. Dominiek explains it all very directly, and even has the developed service running for real, so you know you’re seeing something that actually works.

Ruby: Inside Ruby

Bus Scheme: A Scheme Interpreter Written In Ruby (And Sometimes On A Bus)

1018557535_e3a580b2c9.jpg
License: CC Attribution Credit: conner395 @ Flickr

Bus Scheme is an implementation of the Scheme programming language (a dialect of Lisp) in Ruby being developed by Phil Hagelberg. It’s called “Bus” Scheme because it’s being developed while Phil travels on the bus, but Ryan Davis called Phil out on that sly fabrication! Curiously, Phil claims to have never used any existing Scheme implementations, relying instead on knowledge gleaned from SICP and these incredible computer science lectures (if you have not seen the Abelson / Sussman lectures yet, you are missing a major programming treat.)

Bus Scheme runs on Ruby 1.8, 1.9 and Rubinius, and the repository (where you can view the source without downloading it) is available here at GitHub, although as noted in the documentation, you can also use gem install bus-scheme

Meanwhile, in a land far, far, away Jim Weirich is working on an implementation of Lisp within Ruby too, although Jim’s clever attempt uses Ruby pre-existing data structures and not a typical parsing and interpretation system.

Ruby: Inside Ruby

ActiveMerchant E-Book by Cody Fauser

activemerchantp.png

ActiveMerchant is a new e-book written by Cody Fauser and produced by Geoffrey Grosenbach’s PeepCode which, unsurprisingly, is about the Active Merchant Ruby library and Rails plugin (past Ruby Inside reference). Cody Fauser is a key developer on the Active Merchant project, so all the knowledge is from the “horse’s mouth,” as it were!

The Active Merchant library was initially developed as part of the Shopify e-commerce system, and is an excellent library for interacting with payment gateways from Ruby (and Rails) code. It’s been in production use handling tens of thousands of payments since 2006 and it now has support for several payment gateways, including PayPal, Authorize.Net, and TrustCommerce.

Cody’s e-book comes in PDF format and is immaculately produced with helpful diagrams, concise code snippets, and it proves incredibly easy to read on the screen while retaining the ability to give a good printed copy. At 74 pages it goes into just the right amount of detail, and at $9 is a bargain for anyone wanting to get involved with processing payments and dealing with payment gateways from Ruby or Rails applications (you’ll hopefully make that back on your first couple of payments!)

Disclaimer: PeepCode is a Ruby Inside sponsor, but does not receive any special treatment regarding editorial posts such as this one. It truly is a good e-book!

Ruby: Inside Ruby

Ruby Gets Its Own Reddit

rubyreddit.png

In the past week, Reddit made it possible for some users to create “sub-reddits”, areas of Reddit focused on a particular niche or topic. Naturally, it didn’t take long for someone (James Golick, specifically) to make a Ruby-specific Reddit. It’s available at http://ruby.reddit.com/ and while it’s early days, I can see this taking off and becoming a great source for Ruby news as time goes by.

Ruby: Inside Ruby

Ruby Plus: Another Ruby/Rails Screencast Site

Ruby Plus is a site offering free Ruby and Rails related screencasts recorded by Bala Paranj, much in the same vein as Ryan Bates’ Railscasts. The screencasts are generally similar in length and overall format to those from Railscasts. So far there are 29 episodes you can download.

The first twelve screencasts in the archive (for which you have to register to download, alas) were exclusively Ruby, covering topics like blocks, class_eval, modules, recursion, and so on, but unfortunately the rest of the screencasts have been entirely Rails focused beyond those first twelve. It’s still a source worth checking for Ruby and Rails screencasts though, so give it a look.

(Update: Several people have reported to me that they have an issue with Ruby Plus being portrayed in a positive light. I’ll admit I haven’t watched a significant number of the screencasts, just a couple in fact, but what I saw seemed okay in terms of production. With all the complaints, however, I figure you should be aware that there appear to be quite a few people who are not keen on the site, so you may just want to skip this post.. but I cannot remove it as it is now part of the public record and, as you probably know, I don’t do censorship.)

Ruby: Inside Ruby

A Great Ruby on Rails Security Presentation

Jonathan Weiss recently had a session about Ruby on Rails security at 24C3, the 24th Chaos Communication Congress, in Germany. He has made the slides (44 of them) available, as well as a 45 minute long Google Video with the slides, video, and sound to enjoy. Jonathan goes into data sanitation, cross site scripting attacks, cookies, and lots of similarly good stuff.

(Credit for letting me know about this: Martin Sadler)