Don's post about the
Sellsian Approach is right on. This dovetails nicely with what I love most about Ruby: the ease with which you can give your fellow programmers a domain specific language instead of an API. Last week I found myself leaving a comment "for the next programmer" that looked like this:
# foo must be a Hash of String to Widgets
My gag reflex took over, and so a few minutes later I committed the following executable Ruby instead:
invariant 'foo is a Hash of String to Widgets'
With regular expressions,
instance_eval, and threequals, it was trivial to make
invariant into a fairly general mechanism.
Saw
this link on
BoingBoing today. Off topic, sure, but a wonderful re-examination of the plot of Episodes IV-VI in light of the information divulged in I-III. Specifically, the roles of R2D2 and Chewbacca finally laid bare. Wonderful stuff.
There’s a growing acceptance of Ruby as a player in developing “enterprise” applications. The upcoming eRubyCon in Columbus is just another example. Which is why we are proud to be bringing you another edition of our Enterprise Ruby Studio.
In conjunction with the Pragmatic Studio, Relevance was the first to bring an open training event dedicated specifically to Ruby in the Enterprise to the market. We’re running it again March 28-30 in Reston, VA. Once again, we’ll be focusing on Ruby’s unique value in the enterprise as the “glue that doesn’t set”. Attendees will experience, hands on, building an app using the most important technologies: data access through ActiveRecord and rBatis, messaging through Stomp, Drb and Rinda, data transfer using XML and JSON, networking using Mongrel, and building RESTful web service endpoints. In addition, we’ll examine the tools that make Ruby productive, elegant and stable, like Rake, Ruby Unit, rcov, flexmock and Cerberus.
We have a blast at these events, and we think you will too. Come check it out!
I just finished creating a demo install of a suite of Single Sign On capabale Rails apps for a customer. We decided to go with CAS for the authentication management, largely because it is OSS but also because install is just dead easy (copy cas.war into the /webapps folder under Tomcat, restart Tomcat).
Likewise, installing the Ruby client for CAS was just as easy:
>sudo gem install rubycas-client
. Once that was taken care of, I just had to configure the individual Rails apps to use CAS for authentication. According to the docs for the client, you just have to add some metadata to
environment.rb
that tells CAS where to go for authentication, and a filter to
application.rb
to launch the process. I found that there were a couple of really important things missing from the instructions, especially if you want to test locally.
- You have to include the following line in the environment file to get the CAS username to show up in
request.username: CAS::Filter.wrap_request = true
.
- Don't use
CAS::Filter.cas_base_url = "your_CAS_url"
unless you already have SSL set up and working. If you are trying to test against an non-SSL setup, it won't work becase CAS will automatically assume SSL for the validation step. Instead, use: CAS::Filter.login_url = "your_CAS_login_url"
and CAS::Filter.validate_url = "your_CAS_validation_url"
.
- Always supply the
CAS::Filter.server_name = "your_domain:your_port"
declaration. Without this, it kept using the app's domain but stripping the port on the redirect after authentication, thus leaving me with a 404 error after successful login.
That's not a lot of gotchas for such a great piece of functionality. I'll post more details as we roll the implementation forward and if we see any other issues, but for now, we're very please with how easy it is to get CAS set up and working with our multiple Rails apps. Go Yale!
Found
this on
Martin's Bliki. Using
rake instead of make or
ant is our recommended approach for new Java projects. Until recently, the one drawback to this was losing ant's tight integration with Java. With
JRuby advancing nicely,
JRake will let us have the expressiveness of rake
and tight Java integration.
It is definitely true that one of the things I miss most about Java is its wealth of monitoring tools for running apps. The monitoring console for Java5 is incredible, and gives you realtime insight into how your apps are performing. We've all been waiting around for something similar in the Rails space. I've recently started looking into FiveRuns (http://fiveruns.com), and I'm very impressed. FiveRuns is a management console that spans all your infrastructure components; on our XServe, it is monitoring OSX system level information (basically, everything Apple's System Monitor tracks), two separate MySQL instances and our Apache instance.
From their website, it seems that you can also monitor JVMs, Oracle instances, JBoss, Tomcat, Linux servers, and more. Now, obviously, the thing that intrigued me most about their tour was the tease about being able to monitor Rails apps. Check out this screenshot for the tease. FiveRuns is going to be at the Rails Edge at the end of this month with a "special announcement", so here's hoping that this is the release party for Rails monitoring.
What's almost as cool is the way their app works. The monitoring console is a hosted app that received data dumps from a "Smart Client" you install on your server. All the information is pushed from your servers to their host, so no inbound tunnel is required. This is the same setup as 6th Sense, who does project development tracking through a series of "Agents" installed on developer and test boxes. It is very interesting to see the growth of the "smart agent" technologies for collecting information -- lots of tiny little sensors floating around your systems and reporting back to the mothership. Very Vernor Vinge.
Justin and I will both be in Columbus, OH for
erubycon. For us, 2007 is already shaping up as the year of Enterprise Ruby. We are seeing Ruby used for a broader variety of tasks, in all kinds of Enterprise environments.
Rails is a given, of course, but also build automation, batch processing, Rinda, and XML processing.
Our fellow speakers at erubycon can talk the talk because they
walk the
walk. I am looking forward to catching up on how they are using Ruby in the Enterprise.
As you may haven noticed, we are in the midst of the annual site update. This year we will be running the site on
Mephisto. If any old links that are important to you are broken let
us know.