This post originated from an RSS feed registered with Agile Buzz
by James Robertson.
Original Post: Fire and Forget Smalltalk
Feed Title: Cincom Smalltalk Blog - Smalltalk with Rants
Feed URL: http://www.cincomsmalltalk.com/rssBlog/rssBlogView.xml
Feed Description: James Robertson comments on Cincom Smalltalk, the Smalltalk development community, and IT trends and issues in general.
Our marketing folks wanted to put together an RSS feed for Cincom's press releases, but weren't sure how to proceed. All the releases live in a database (SQL Server) with all the info necessary to create a feed - it just had to be put together. This is one of the places that most people would reach for a scripting language like Perl, or something like PHP. I reached for Smalltalk, of course, and it turns out to be pretty simple to support a small job like this in VisualWorks. Here's what I set up
I created a small, loadable package that reads the data from the DB and dumps it to an RSS file
The package depends on a small settings file to figure out what to read and where to write
I created a small (4 MB) Windows executable with the package pre-loaded, and ready to run at startup
On the server in Cincinnati, this thing starts, reads from the db, writes the RSS file, and quits in less than 3 seconds. I was amazed, to be honest. Better yet, it's easily updated from my office in Maryland. If I need to change the code, it can reload the package at startup from an application directory, and then run with the new changes - so if anything big needs to be done (for instance, someone decides we need an Atom feed as well) - it can be updated without my having to make any changes to the executable itself, and it'll "just work" on the next run cycle. It's going to be set up as the Windows equivalent of a CRON job - run every N hours (days, whatever). So brush aside your preconceptions - Smalltalk is easily used for this kind of "small" job!