"Presentations" Posts

Writing Ruby Extensions in C the Highgroove Way

Posted in Open Source, What We Wrote, Presentations Comments Comments

Matt todd
Matt Todd
10
Jul

Trying to handle image manipulation, creating PDFs, or in-memory caching in pure Ruby is like trying to win the Tour de France on your hipster single-speed bike. The single-speed works 90% of the time, but when you have demanding performance requirements, it’s not good enough. Many popular Ruby libraries, such as MySQL/PostgreSQL, RMagick, and most of the webservers Ruby applications are deployed on (like Passenger, Mongrel, and Thin), harness the blazing speed of the C language and libraries to handle the heavy lifting and performance-intensive business that Ruby can’t keep up with on its own.

In some of my recent work, I had the opportunity to delve into and expand on a Ruby extension written in C for looking up geographic information based on IPs. This library was vital to one of our client’s projects that has immense performance requirements without the possibility of full request caching. By utilizing the existing GeoIP C library for accessing their special in-memory binary database, we were able to keep up with the demand the application would be seeing.

As is common at Highgroove Studios, along with making sure our contributions to the library were open sourced, I took the lessons and experience gained from this unusual endeavor and presented them to our local Ruby User Group here in Atlanta. I focused more on exposing the bridge between the Ruby and the C environments and understanding the internals of the Ruby language from a C standpoint. However, armed with this knowledge, any Rubyist is able to open up most any Ruby extension or even the Ruby language implementation itself and understand what’s going on. My goal was to get the developers over the initial hurdle of being able to read the code and understand it enough to investigate further.

Personally, I gained from this experience a better appreciation for the real beauty of the Ruby language and the effort required to make it as fluid and dynamic as it is as well as having a more thorough understanding of the internal workings of the language. Working this close to the language core has also made a difference on my Ruby style, both in trying to fight the language less but to also use it more efficiently and effectively.

For more information, check out the presentation slides1 and some of the C examples I wrote for the presentation2. Also check out the GeoIP I contributed to which inspired this whole adventure3.

1 http://www.slideshare.net/maraby/writing-ruby-extensions

2 http://github.com/mtodd/ruby-c

3 http://github.com/mtodd/geoip

James to headline MountainWest Ruby Conference 2009

Posted in Speaking, Community, Presentations, Ruby on Rails Comments Comments

Cbq
CBQ
16
Jan

Many critics are hailing Little Big Planet as the video game of the year. Its “flexible, fun, and powerful” level creator and sharing system has created an interactive platform never before seen in gaming.

But you don’t need to tell our James Edward Gray II about it – in March, at the MountainWest Ruby Conference” in Salt Lake City, he’ll be giving a featured speech on how Ruby programmers can learn from Little Big Planet’s creative problem solving and code reading. He’ll also be discussing some of the most creative Ruby projects out there, showing how their developers build servers, optimize code, and more.

A Playstation 3 and advanced knowledge of Super Mario Brothers Level 1-1 is optional but encouraged for attendees of this talk.

Hands on with Scout at Atlanta Ruby User Group

Posted in Scout, Presentations, Atlanta Comments Comments

Cbq
CBQ
14
Feb

Last night, I demoed Scout to a room-full of Rubyists at the Atlanta Ruby User Group Meeting.

I would love to share all the wonderful feedback, but instead, I’ll share some of the excellent questions (and more elaborate answers) that were asked of Scout:

What are the security pitfalls, i.e. can someone simply write a ‘rm -rf’ plugin?

To answer that, let’s look at the architecture of Scout first:

  • You install the tiny Scout client (which is a Ruby gem) on your server.
  • The client connects over https (always) through a 256-bit secure, encrypted connection (the same encryption your bank uses).
  • Scout never logs in to any of your servers.
  • All communication is initiated by the client.
  • The client downloads a pre-loaded plugin plan, consisting only of plugins of your choosing, so it cannot run plugins you didn’t explicitly authorize.
  • The server also uses that same secure encryption for all communication. Individual accounts are protected.
  • Client keys (uniquely generated) can be revoked at any time, disabling the client.

The security measures needed for Scout are the same as for any other software. In fact, in some ways, it’s easier to be more secure – the plugins are relatively few lines of code and easy to review. For a more closed environent, you can create a copy of the plugin code and host it on one of your own servers (a plugin is plain text).

Is Scout open source?

The Scout client is completely open source. The gem is a normal Ruby gem, open for development, and distributed under the MIT and/or Ruby License (whichever you prefer). The Scout Plugins people write are also completely open, in fact, they are surrounded and fostered by a community that encourages branching, fixes, and general open-ness.

The Server, where you aggregate your data, do reporting, and in general, collect information about your account is not open-source. We maintain the server, and keep all your data safe and sound.

When does it launch?

We’re doing the plumbing now – account subscriptions, a new home page, privacy policies, backup procedures, etc. We’ve recognized that lots of people are anxious to get going and we’re working to get it ready for public use as fast as possible.

Talking in Texas

Posted in Community, Presentations Comments Comments

James
James
04
Sep

I’ll be representing Highgroove at the Lone Star Rubyconf this weekend. I’ll give two talks, one for the charity event the night before and another at the main conference.

At the charity event I’m going to go over Ruby’s block syntax. I’ll cover what blocks are, how they are used, and give a lot of great examples. This is a good talk to sit in on if you’re new to Ruby and it’s even for a good cause.

For the conference I’m going to talk about heroes and super powers. I’m sure I’ll manage to sneak a little Ruby in there too, for those that enjoy that. This talk takes an in depth look at glue code and Ruby’s features supporting such. It’ll be fun stuff that doesn’t get talked about enough.

If you are attending the conference, do flag me down and say hello. I’m always interested in meeting fellow Rubyists.

Hope to see you there!

The Dime Tour of Rails

Posted in Oklahoma, Presentations, Ruby on Rails Comments Comments

James
James
14
May

If you are just getting into Rails or still don’t get what all the fuss is about and you happen to be near Oklahoma, you may walk to catch my talk tomorrow night for Refresh OKC. The meeting starts at 6:30 PM in the Oklahoma City Public Library.

I’ve got a massive talk prepared covering as large a portion of Rails as I can possibly fit in given the time. I do include some cool topics like using the Rails console and even AJAX. I even sneak in a little magic.

Do drop by if you are in the neighborhood…

A Presentation on Capistrano to the Atlanta Ruby User Group

Posted in Presentations, Atlanta, Ruby on Rails, Slingshot Comments Comments

Cbq
CBQ
04
Oct

A Presentation on with Screech Powers, Cesar Milan (The Dog Whisper), Sean Penn, and guest Ruby celebrity (and Atlanta native) Obie Fernandez. Despite the antics, Capistrano is a powerful, yet simple, bona-fide, big-boy tool. It sure does make our life easier. We like it so much, we’ve made it our goal with Slingshot Hosting to get your Ruby on Rails application up and running with our customized Capistrano Recipes, so you can focus on development.

Capistrano – Atlanta Ruby Users Group PDF

Record-Shattering SF Ruby Meetup

Posted in Presentations, San Francisco, Ruby on Rails Comments Comments

Derek
Derek
13
Jun

Another San Francisco Ruby Meetup. Another record-breaking attendance mark (has any Ruby group in the world brought together more than 110 people?).

Here’s the slides from my presentation on how Highgroove Studios molds its team and development process to utilize Ruby on Rails:

Download Utilizing Ruby on Rails PDF

Real Rails Apps: The Guided Tour

Posted in Oklahoma, Presentations, Ruby on Rails Comments Comments

James
James
10
Jun

I'll be giving a Rails presentation to OK.rb this coming Tuesday (June 13th). Anyone in the OKC area is more than welcome to attend.

My talk will be a tour of some live production code HighGroove has generated for clients. I'll cover sections of interest from three different applications. This should be a good chance for us to explore how Rails applications come together.

For more in formation visit OK.rb's meeting schedule or email me with your questions.