Archive for June, 2007

As soon as you’ve spent some time dealing with Rails, you’re bound to hear the fact quoted that the entire Core Rails Team does their work on Macs. There are likely several reasons for this: (1) these folks really like Macs (you can’t fault them for that); (2) they’re getting kickbacks to use Powerbooks (could be; not likely though); or (3) Rails is fun, and using Windows puts a bit of damper on that fun. I think the last answer is the most likely even though I’d like to think that Steve Jobs has some skin in the Rails game.

Rails on Windows - Part 1

What you’ll also hear and experience when dealing with Rails is that it’s “opinionated software”, which it is. It just so turns out that the prevailing Rails opinions tend to align more closely with the UNIX-derivative camp (like Mac’s OS-X) than with the Windows camp. There’s a price to pay for working against the prevailing opinions and using a Windows environment to do your development. In most cases, the community that supports Rails has done a great job to make sure that this cost is very miniscule. However, once in a while, when you’re working with a Ruby Gem or Rails Plugin that is outside the core framework, you’ll hit the opinionated software wall head-on.

This is not meant to be a critique of Rails or the concept of opinionated software. Rather, the things that make Rails and some of these Gems and Plugins so special is that they leverage existing capabilities of the underlying operating system (that’s Rail’s DRY principle in action) such as the UNIX symlink command that powers Capistrano. These capabilities are difficult or impossible to replicate across operating systems; leaving the Windows-based developer with three choices: buy a Mac; install Linux, or hack your way through.

In the first of x installations of my experiences with Rails on Windows, I’ll touch on some of the learning points I had with Capistrano. As a refresher, or for the completely uninitiated, Capistrano is, in the simplest sense, a Rails deployment utility. It provides a collection of tasks that anyone with experience in deploying Web applications will immediately recognize as extremely useful. Tasks like automated deployments, checking the differences between your most recent source and the existing deployment, temporarily disabling an application and putting up a maintenance page, performing database migrations, and rolling back your application to previously deployed versions can each be performed using a single Capistrano command. Like many things Rails, the obvious utility of such functionality may lead you to wonder why a tool like this wasn’t invented much sooner and used universally.

Capistrano is quite overt about being opinionated software, going as far as to clearly document the assumptions it makes. Amongst these assumptions is that you are deploying to a POSIX-compliant UNIX shell (sorry, no Windows), you are using Subversion for source control, and that all your passwords (i.e. production server and Subversion) are synchronized. Once again, following the Rails convention, some things that Capistrano assumes are overridable. Other things, however, are not. Some of the learning points I touch on below are directly related to Windows; others are not.

  • You’re going to need the full Subversion binaries. If you, like me, had gotten by using various Subversion clients (e.g. TortiseSVN and Subclipse), the gig is up. You’re going to need Subversion anyway if you ever plan to run EdgeRails
  • Some installation instructions for Capistrano will specify that you should –include the termios Gem when installing Capistrano. Normally, termios removes the need to display and manually enter your password during the execution of Capistrano tasks. However, since the termios Ruby Gem is simply a wrapper around the POSIX termios command, this won’t fly with Windows. Solution: don’t include a termios dependency and get used to entering your password each time you invoke Capistrano from Windows.
  • If your Capistrano install fails with a Zlib::BufError, don’t fret it. Try updating your gems (gem update –-system). This seems to be a fairly common occurrence with Windows. I’ve heard of folks having to update gems multiple times for this to take.
  • Another must for Capistrano deployment, and one that escapes folks who have spent life in the Windows world, is the need to chmod files so that they have the appropriate permissions set. This is especially true for the Ruby and FCGI dispatch files (if you’re using FCGI). Ideally, you should create your Rails projects on the UNIX box you plan on deploying to, check it into Subversion, and then begin work on your Windows development machine from there. This helps to avoid a host of issues such as chmod problems and bad shebang lines that routinely plague Windows users.
  • Select a hosting provider that has one or more sample Capistrano deployment files available or that have customized the standard Shovel file for their environment. You’ll still have to do some tweaking but this will help save a good deal of time. Suffice it to say that if your hosting provider doesn’t know how Capistrano works, turn and run… fast.
  • If you maintain critical files outside of Subversion such as your database.yml or if you have multiple copies of the same file (e.g. different environment.rb files for staging and production deployments), the simple Ruby put command goes a long way. For example:
put(File.read('config/database.yml'),"#{deploy_to}/current/config/database.yml", :mode => 0444)
put(File.read('config/environment.staging.rb'),"#{deploy_to}/current/config/environment.rb", :mode => 0664)

There are plenty of purists out there that have invented all sorts of ways to get unversioned files onto your productions server if need be. I don’t see the need for such complexity, especially if only one or two people have been granted deployment rights with Capistrano.

Comments No Comments »

I feel as if someone tacked a “show me your enterprise service bus” sign onto my back and I’ve been walking around blissfully unaware of this fact for months now. Client presentations, vendor presentations, casual conversations – everyone wants to show off their visuals of an ESB, SOA, and next generation architectures. Thank goodness there’s no fine print on my sign restricting me from asking tough (and not so tough) questions.

  • So how do I avoid vendor lock in?
  • Do we really need SOAP?
  • Grid computing… show me some client references!
  • JSR 168 portals… yawn.

To escalate the situation, I came up with my own next generation architecture diagram and talked it through with a bunch of my peers. People liked it at first because of all the nice icons. They really loved it when the answer to any of the hard questions was “let me show you how this works, do you have a Web browser handy?” I’ve included the diagram below for your enjoyment and jotted down some quick write-ups with the obligatory links so that you can see, understand, and convince yourself of the reality of these tools.

Web 2.0 Bus

  • Ruby on Rails – Although there are tons of free services and a number of high quality paid services that can be leveraged to enhance applications on the Web, it’s hard to go very far without having some dedicated computing power. Using Ruby on Rails and MySql will get you the maximum bang for your buck (that’s no bucks for those who are counting). While you’re riding the Rails, make sure to take advantage of Ruby gems and Rails plugins.
  • Web Service APIs – Lots of folks talk about enterprise applications that invoke common APIs to store documents, images, or access business services. For most, it’s talk of a far off and distant future. Would you like to see how this works today? Check out box.net, flickr, and salesforce.com for file, image, and business Web Service APIs in action.
  • Yahoo Pipes – The minibus within the bus, Yahoo pipes provide a visual environment for aggregating, manipulating, and mashing up data and producing value-added output. Good mashup implementation but the interactive visual editor gets most of the attention – rightfully so. Imagine your business users mashing up business data to solve problems in new and creative ways that your analysts and developers never imagined.
  • Google Base – A loosely organized, metadata-driven, data store available through Google. Data is accessible via an HTTP API with either Atom or JSON feeds.
  • Open ID – Rather than supported a single point of control system for authentication, like Microsoft’s Passport, OpenID is a decentralized system that relies upon distributed identity stores and, for the most part, ownership of a particular URI. The system is lightweight yet still manages to provide for the distribution of basic profile information in addition to straight authentication. With more and more sites adopting this service, adoption is likely to steadily increase over the next several years.
  • Amazon Web Services – Despite the lack of any hard-and-fast SLAs on their services, developers are increasingly leveraging the AWS platform for production applications. Their Elastic Compute Cloud (EC2) provides the average developer access to a significant grid computing array. Their Simple Storage Service (S3) and Simple Queue Service (SQS) provide access to globally distributed storage and messaging services, respectively. All of this is based upon a very fair “pay as you go” model that requires you to only pay for what you use and scale up and down without the usual provisioning and financial burdens.
  • Sugar CRM – For one, I like Sugar’s tagline “Commercial Open Source”. A PHP-based CRM alternative to products like Siebel and Salesforce.com, Sugar is gaining pretty significant traction in the marketplace and is proving to be the first lucrative open source business application. The software has a good look and feel to it and their distribution options will likely set the standard for all other open source business software. You can opt for off-site dedicated hosting (on-demand), fully configured appliance-based distribution, or host-it-yourself (with or without a support contract).
  • Bit Torrent – Peer-to-peer file sharing technologies have yet to find their place in the enterprise. On the open Internet, though, such technologies are said to account for as much as 40% of global Internet traffic. As desktop search technologies mature, sharing of decentralized data is going to be the best way to get at all of the knowledge otherwise hidden within the enterprise.
  • Google Gears – If you don’t have the time or inclination to build offline clients to support your disconnected users, how about just making your Web app “disconnectable”? Gone are the cross platform, DLL, and distribution issues. Your Web app can sense when it’s lost network connectivity and go into disconnected mode. A great idea that will likely only gain limited traction in the enterprise.
  • Netvibes Universal Widget API (UWA) – JSR 168 (or is it 286 now) compliant portlets seem so passé. With widget-based start pages becoming the norm and Windows and Apple both integrating widgets as integral parts of the future desktops, “write once, run anywhere” were just a matter of time.
  • Microsoft Virtual Earth – I’ve blogged about this before and even did a quick Webcast. Take the hottest Web 2.0 visualization technique (AJAX maps), add birds-eye views in 2D and realistic 3D virtual earth renderings that run in-browser for both IE and Firefox and you’ve got Virtual Earth. It simply must be experienced to be believed.
  • Simile Timeline– An equally interesting visualization technique but one that’s got significantly less press is the Simile Timeline AJAX widget for bringing time-based information to life.

Comments No Comments »

With the 2007 NASCIO IT recognition award submission process closed and the evaluation process in full swing, I’m anxiously awaiting the publication of the nominations from across the country. It’s always interesting to see what new and innovative practices are being applied in different state governments. With Web 2.0, blogging, wikis, multi-media, and social computing firmly established in the Internet at large (see Time Person of the Year 2006), it’s high time that this wave hits the government sector, which usually lags behind in such trends by a couple of years.

IT Trends in State Government

I’ve been catching up on blogs the last couple of days and took in a couple of interesting sites. Dave Fletcher, who I believe is the CIO or CTO of Utah, has re-emerged with a vengeance in his blogging and is to thank directly or indirectly for much of this information.

  • Kansas’s new state portal features a MyKansas page with drag-and-drop type widgets similar to what you’d find on the Web 2.0 style portals like Netvibes. The portal has some other interesting features but still belays the shallow integration with other state sites that characterizes most state portals. As is to be expected, it is likely to be a multi-decade initiative to provide deep multi-channel integration across the different state government agency service offerings.
  • The federal Department of Health and Human Services (HHS) looks to have really done their blogging presence right on their Pandemic Flu Leadership Blog. Well laid out, with expert contributions and a wealth of comments (albeit moderated), the site is a great example of opening up a dialog with the experts in this area and making participation and information accessible to the public at large.
  • The State of Delaware is using VoiceXML to provide telephone-accessible services to citizens across different agencies (here’s that multi-channel thing again). This directly addresses the fact that e-government doesn’t flow exclusively through the Web browser. Citizens requiring state assistance services are less likely to have access to a high-speed Internet connection, less likely to be comfortable with these services, and more likely to have some degree of physical or cognitive impairments; all of which make Web-browser based applications less than ideal. VoiceXML solutions can leverage XML technologies in existing Web-based applications and provide access to citizens through a very important alternative channel.
  • I’d be remiss if I didn’t mention some of the trends in Dave’s own state, Utah. Dave has a bunch of information in his blog. I appreciate especially the Google search function as I’ve heard anecdotally, on a number of occasions, tales of state employees bypassing their own state portals and going to Google directly when they really want to find something within their states.

In Pennsylvania, as I believe in many other states, IT consolidation is the order of the day. The recently re-issued executive order from Governor Rendell has a specific section covering IT Consolidation and Services (Section G) and has strengthened the IT review and governance processes significantly from the previous revision. BSCoE’s implementation of the Logidex product, which I’ve blogged about previously, will provide some support in the area of reuse, consolidation and measurement and will be one of the NASCIO submissions that is publicized in the next couple of months.

Comments No Comments »