In my experience of building systems in Ruby over the last 7 years, I believe there is one main feature of Ruby that made these systems successful. Before I get to that unique feature of Ruby I want to describe a few of the first systems I built in Ruby and what I learned from them.
The first system I developed in Ruby was a testing infrastructure for a distributed multi-agent system being developed and funded by DARPA. DARPA is the research arm of the US Department of Defense. This project's grand challenge was to build a software system that could survive "in theater". The system had to continue functioning in a war-like situation with enemies attacking the software or the hardware the software is running on. The main function of the software (beyond surviving) was real-time logistics planning. Logistics includes routing supplies to people and places where its needed. That may not sound very interesting but logistics happens to be the key function that makes large groups operate effectively.
What I built for DARPA was a testing framework that observed the events being generated by the software agents using XMPP and then sent commands to these agents using HTTP. The core of the framework was a Domain Specific Language (DSL) which allowed us to script the multi-agent system. Initially this scripting was limited to simple things, but that basic automation helped the program significantly. In the first four months I wrote all the scripts.
During the next year the DSL was rewritten and then expanded to include all the forms of network and system attacks the program was tasked with creating. What was really cool was the majority of the extensions to the DSL were written by other non-Ruby developers in the program. The multi-agent system was written in Java, but each of the 80 people contributing to the attack-side of the program ended up learning enough Ruby to encode their attacks. We also expanded the DSL to generate the logistics rules and from the rules the agent society definition.
This was a large deployment. We had 300 dual core machines with 4GB of RAM and 10,000 agents running across them. The Ruby script that was generated for a single agent society definition was over 1 million lines of code. The events that Ruby handled per hour were well over 3 million messages of 1-10k each.
By the end of the program, Ruby was used to generate the entire agent configuration, drive the simulation, generate the attacks, record the results, generate reports and summarize them for the Program Manager. This development taught me three very important lessons about Ruby:
- Ruby is an excellent language to encode domain specific logic in. Its flexible syntax makes Ruby almost disappear and what's left is domain terms. Once the domain is encoded its very easy for domain experts to use the Ruby DSL. These domain experts may not be able to write it, but they most definitely can read and validate it. When people talk about a 10x developer productivity increase, I believe this is the primary reason for it, the close communication between domain experts and those building the system.
- Programmers can quickly learn Ruby and can be effective in it, especially if they learn it in the context of something they know. Every person on our project that wrote Ruby enjoyed it. Their enjoyment was the main motivator to them becoming more and more proficient in Ruby. I believe any good programmer can be a good programmer in Ruby.
- Ruby scales. We pushed Ruby to unbelievable levels on this program and it exceeded our expectations. The application under test was critical which made the testing framework even more critical. There were places in our code where we had to drop into C to perform computationally intensive operations. The ease of doing this is another key aspect of Ruby's scalability.
The second system I developed in Ruby was a desktop-based functional prototype for a complex system that was being designed for the US Air Force. The goal of this system was to create a unified view across the 18 different groups that coordinate the movement of military aircraft and provide mid-air refueling with tankers.
The team that hired me to do this was a Human Computer Interface research organization that had spent the prior 3 years traveling the world to interview and capture the requirements of all 18 groups. They had written a very detailed user interface specification for the system. They wanted to deliver this user interface specification along with a functional prototype to show the final implementors what they meant in the text & pictures of their design.
The primary challenge was time. They had less than 2 months left to build the functional prototype after a failed 24 person-month Java effort. I chose Ruby and Flash to build the prototype in. I will not focus on the Flash side of what I did because the Ruby side of this, although non-visual, ended up being transformative to the project.
My first meeting with the research scientist (who had become the domain expert) occurred in Boston. On the flight up, I had no idea where to start with the massive tome of information in the specification they had created. After arriving in her office we sat down in front of my computer and I brought up a text editor. I asked her to describe the the concepts in the domain. As she described it I typed in what I knew was valid Ruby syntax. As we encoded her domain knowledge we created a DSL on the fly. After 5 hours of talking and typing we had produced a very elegant 400 line script that she could read as her domain and I could read as code. On the flight back to DC, I wrote the code behind this syntax to enable the construction of the domain model objects (I called this approach syntax-driven development.)
Over the next 4 weeks we iterated on the domain model. I wrote scripts to parse flight plans and convert them to DSL code and flushed out more of the domain. I sent snippets of the DSL to domain experts for review. What amazed the team was the DSL encoding of the specification exposed numerous examples where the specification was incomplete or contradictory---something that none of them had seen in their reviews of it.
The final 4 weeks were spent developing the Flash-based UI which was driven by the domain objects in Ruby. In the end we met our goals. The functional prototype was delivered along with the updated specification. Although the user interface specification was main product delivered to the implementation team, the Ruby DSL was an important tool they could use to better understand the domain.
So, what did these two projects have in common? In both projects I used Ruby to implement the system through a language customized to the project domain. These domain specific languages became effective mediums for team communications. In my experience, this is the single most important feature of the Ruby language---capturing the domain in a language the entire team can speak. If you believe clear communications is an essential quality of highly effective teams, this feature is something that you should strive to exploit in your own Ruby projects.
Thank you for posting your experiences. In my opinion the built in "Halbpreissucher.php" ist the most useful feature.
Posted by: Partnerhoroskope | Tuesday, October 04, 2011 at 04:36 AM
Very nice post even i would say that whole blog is awesome. I keep learning new things every day from post like these. Good stuff!
Posted by: SEO Company | Tuesday, October 04, 2011 at 06:57 AM
Congratulation for the great post. Those who come to read your article will find lots of helpful and informative tips.
Posted by: SEO Services | Tuesday, October 04, 2011 at 07:40 AM
Congratulation for the great post. Those who come to read your article will find lots of helpful and informative tips.
Posted by: SEM Services | Tuesday, October 04, 2011 at 07:45 AM
Good post. Fight lovers around the world will find it very interesting! Thanks.
Posted by: Social Media Marketing Services | Tuesday, October 04, 2011 at 07:51 AM
Thanks for such a nice and updated information. I got some interesting tips from this post.
Posted by: Pay Per Click Services | Tuesday, October 04, 2011 at 07:53 AM
Very nice post even i would say that whole blog is awesome. I keep learning new things every day from post like these. Good stuff!
Posted by: Link Building Services | Tuesday, October 04, 2011 at 08:26 AM
Found very cool and unique info here in this blog. This is a great addition in my favorite blog list.
Posted by: Logo Design | Tuesday, October 04, 2011 at 08:41 AM
I am completely impressed! Keep stuff like this coming
Posted by: Affordable Logo Design | Tuesday, October 04, 2011 at 08:45 AM
Thanks for such a nice and updated information. I got some interesting tips from this post.
Posted by: Logo Design Contests | Tuesday, October 04, 2011 at 08:50 AM
Congratulation for the great post. Those who come to read your article will find lots of helpful and informative tips.
Posted by: Cheap Logo Design | Tuesday, October 04, 2011 at 08:55 AM
Great post your given information does help me a lot knowing that you have shared this information here freely.
Posted by: Essay Help | Tuesday, October 04, 2011 at 09:02 AM
Yes i agree with you these designs are looking so unique and unexpected. Really quality work.
Posted by: Buy Essay | Tuesday, October 04, 2011 at 09:09 AM
Nice post with awesome points! Can’t wait for the next one.
Posted by: Cheap Custom Essays | Tuesday, October 04, 2011 at 09:19 AM
Yes i agree with you these designs are looking so unique and unexpected. Really quality work.
Posted by: Help With Essay | Tuesday, October 04, 2011 at 09:21 AM
Good post. Thanks for sharing this useful information with us.
Posted by: Write My Essay | Tuesday, October 04, 2011 at 09:22 AM
Congratulation for the great post. Those who come to read your article will find lots of helpful and informative tips.
Posted by: Dissertation Help | Tuesday, October 04, 2011 at 09:23 AM
Thank you for this post, It was a great read which was extremely helpful.
Posted by: Charlottesville VA Shutters | Sunday, October 09, 2011 at 09:31 PM
Thanks for this information. This is very eye-opening. It seems as though Slenda is not so splendid!
Posted by: justin bieber supra | Monday, October 10, 2011 at 09:05 PM
I have to know if the future plans gets well with the American people, It will get the best results only in the long run.
Posted by: Online Shops | Wednesday, October 12, 2011 at 02:22 PM
thanks for this interesting information I will publish a link on our blog so my personal readers can benefit from it too
Posted by: SEO India | Thursday, October 13, 2011 at 02:12 AM
I am very much enjoyed for providing the good articles in this blog that to sharing the nice info in this blog.
Posted by: Florist online | Thursday, October 13, 2011 at 06:47 AM
I had really superb info is visible in this blog and thanks a lot for providing the amazing services in this blog.
Posted by: Uggboots | Friday, October 14, 2011 at 07:27 AM
More about menstruation and the gender earnings gap, and I think this is some thing that peoples does not know about a lot, such information is really one that needs to be read with concentration.
Posted by: image upload | Friday, October 14, 2011 at 05:56 PM
Fully agreed. It's make me want to jump in Martin Fowler's Domain Specific Languages Immediately.
Posted by: Finn | Monday, October 17, 2011 at 12:37 PM
excellent info. definitely worth the read.
Posted by: Ellay Jewel | Monday, October 17, 2011 at 01:21 PM
Yeap Ruby is my best friend! Just kidding great environment to develop intelligent apps.
Posted by: Foot Problems | Friday, October 21, 2011 at 01:12 PM
Thank you for sharing to us.there are many person searching about that now they will find enough resources by your post.I would like to join your blog anyway so please continue sharing with us
Posted by: Agen Bola | Saturday, October 22, 2011 at 12:50 PM
really interesting story in your post. .thanks for sharing it to us ... really much appreciated. . .
Posted by: cell spy now reviews | Sunday, October 23, 2011 at 05:46 PM
great post here. i really loved it! i hope that it just gets better and better. keep posting! i'll bookmark this.
Posted by: Boston Market Coupons | Tuesday, October 25, 2011 at 06:58 PM
I really enjoyed reading on your post, your idea it more helpful for me and to may friends as well. Thanks for sharing!
Posted by: Watch beauty and the beast online | Friday, October 28, 2011 at 08:02 PM
These kind of post are always inspiring and I prefer to read quality content so I happy to find many good point here in the post, writing is simply great.
Posted by: Jason Aldean Tickets | Thursday, November 03, 2011 at 06:44 AM
I have been using ror for several years now, and I have to agree that it is very scalable and you can learn the basics fast. But, I think it takes quite a bit of time to master it.
Posted by: Start a Business | Friday, November 18, 2011 at 03:24 PM
Those are super cute. I like you on Facebook.
Posted by: justin bieber supra | Sunday, November 20, 2011 at 05:46 AM
I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts.
Posted by: recruiters | Monday, November 21, 2011 at 06:53 PM
What types of other organizations or programs exist that support the Ruby cause? There has to be more than just one
Posted by: Plastic Bins | Monday, November 21, 2011 at 09:33 PM
Kudos to you! This is a really good blog here and I love your style of writing. How did you get so good at blogging?
Posted by: New Smyrna Beach Blinds | Wednesday, November 23, 2011 at 12:53 AM
Im glad to see that people are actually writing about this issue in such a smart way, showing us all different sides to it.
Posted by: Hamilton Beach | Thursday, November 24, 2011 at 09:33 AM
scarpe prada
 Di solito l' diverso giorni in cui viviamo riguardo introdurre e che per . Così di che primaria sforzo ora possiamo condividere la nostra vita in cui molto che un tempo non poteva veramente non deve immaginare. Ma cosa significa questo una business?
,scarpe mbt
 efficacemente attenzione, io non la penso così. I nostri propria unica cosa che la maggioranza dei è solo deve essere ancora più simile a questo compito !
http://www.scarpeprada2012.com
Scopri i qualsiasi una risorsa il fatto che in tutto il mondo con successo propri clienti, creare dei flussi di cassa e inoltre mettere più fra pratique riguardo di loro di tra le prospettive.
Posted by: werroulally | Thursday, December 08, 2011 at 04:00 AM
Very nice post even i would say that whole blog is awesome. I keep learning new things every day from post like these. Good stuff!
Posted by: nco financial | Tuesday, December 13, 2011 at 06:55 AM
I'm happy when reading through your site with up-to-date information! thanks alot and hope that you'll publish more site that are based on this website.
Posted by: mx gear | Monday, December 19, 2011 at 05:58 AM
I understand this site that I take in be amazingly useful as well as I believe it awfully necessary all population.
Posted by: Tony seruga | Tuesday, December 20, 2011 at 01:32 AM
This is a Great Job..! I even told my friends to take a look at your blog and in fact your blog is already bookmarked on my computer. Hope to see more of this. Great!!!
Posted by: Edmonton Web Development | Tuesday, December 20, 2011 at 06:38 AM
Hey there! Do you know if they make any plugins to protect against hackers? I'm kinda paranoid about losing everything I've worked hard on. Any recommendations?
Posted by: xeitepabte | Wednesday, December 28, 2011 at 04:10 AM
It's so nice to have you do all of the research for us. It makes our decision making so much easier!! Thanks.
Posted by: supra for boy | Saturday, January 14, 2012 at 02:52 PM
Great website! I am truly enjoyed reading on your post your idea is very nice very well written and useful to all blogger.
Posted by: block drains melbourne | Sunday, January 15, 2012 at 09:32 PM
I am becoming fan of your articles. Now i am checking your post daily for latest updates.
Posted by: executive recruiters chicago | Monday, January 16, 2012 at 03:07 AM
Let's not get taken away with all the hoax actions that are developing in the internet community.
Posted by: promotional codes | Tuesday, January 17, 2012 at 01:30 PM
I will definitely read and other articles related with this subject. Thanks a lot for the informative entry and keep up publishing these great posts in the future.
Posted by: Form an LLC in PA | Thursday, January 19, 2012 at 09:22 PM
Very nice and informative post. Keep up the good work. Please remember that i m waiting for your next awesome post?
Posted by: lilash | Friday, January 20, 2012 at 03:50 AM