Monday, June 23, 2008

AMD Athlon™ Processor Product Brief

Get powerful performance for your unique digital experience

AMD Athlon™ Processor Overview
The AMD Athlon™ processor is the first Windows®-compatible 64-bit PC processor. The AMD Athlon™ processor runs on AMD64 technology, a revolutionary technology that allows the processor to run 32-bit applications at full speed while enabling a new generation of powerful 64-bit software applications. Advanced 64-bit operating systems designed for the AMD64 platform from Microsoft, Red Hat, SuSE, and TurboLinux have already been announced.

With the introduction of the AMD Athlon™ processor, AMD provides customers a solution that can address their current and future computing needs. As the first desktop PC processor to run on the AMD64 platform, the AMD Athlon™ processor helps ensure superior performance on today’s software with readiness for the coming wave of 64-bit computing. With AMD64 technology, customers can embrace the new capabilities of 64-bit computing on their own terms and achieve compatibility with existing software and operating systems.

Enhanced Virus Protection with Windows® XP Service Pack 2
With a unique combination of hardware and software technologies that offer you an added layer of protection, certain types of viruses don't stand a chance. The AMD Athlon™ processor features Enhanced Virus Protection, when support by the OS*, and can help protect against viruses, worms, and other malicious attacks. When combined with protective software, Enhanced Virus Protection is part of an overall security solution that helps keep your information safer.

Industry-leading performance for today’s software
It 's not just about email, Web browsing and word processing anymore. The AMD Athlon™ processor gives you full-throttle performance to go wherever your digital world takes you. Whether you're watching videos, ripping and playing music, or playing games, AMD64 performance helps you to fully enjoy any multimedia experience with a “you are there” reality. The revolutionary architecture of the AMD Athlon™ processor enables industry-leading performance to help maximize productivity and deliver a true-to-life digital entertainment experience. HyperTransport™ technology can increase overall system performance by removing I/O bottlenecks, increasing system bandwidth, and reducing system latency. A fully integrated DDR memory controller helps speed access to memory by offering the processor a direct connection to the main memory. As a result, end users can enjoy quicker application loading and extraordinary application performance.

With 3DNow!™ Professional technology and support for SSE3, the AMD Athlon™ processor has more ways to accelerate multimedia applications, enabling stellar performance when working with audio, video and photography software. For a superior experience with high-speed Internet, the AMD Athlon™ processor combines high-speed memory access and I/O connectivity to help ensure that end users can fully take advantage of a broadband connection to streaming video and audio, and a riveting online gaming experience.

Ready for the 64-bit future
The AMD Athlon™ processor is designed for people who want to stay at the forefront of technology and for those who depend on their PCs to keep them connected, informed, and entertained. Systems based on AMD Athlon™ processors are able to deliver leading-edge performance for demanding productivity and entertainment software today and in the future.

With AMD64 technology, the AMD Athlon™ processor is fully compatible with existing software, while enabling a seamless transition to 64-bit applications. Both 32- and 64-bit applications can run virtually simultaneously and transparently on the same platform. AMD64 technology enables new, cinematic computing experiences and capabilities, in addition to increased performance. AMD64 technology allows end users to take advantage of new innovations such as real-time encryption, more life-like games, accurate speech interfaces, cinema-quality graphic effects, and easy-to-use video and audio editing.

Protect investments with a technically superior PC processor
The AMD Athlon™ processor is the world’s most technically advanced PC processor and the first Windows-compatible 64-bit PC processor. Advanced technologies in the AMD Athlon™ processor include:
  • AMD64 technology which doubles the number of processor registers and dramatically increases the system memory addressability
  • Enhanced multimedia instructions support including 3DNow! Professional technology and SSE2/3
  • With up to a 2000 MHz system bus using HyperTransport technology with up to 14.4 GB/sec total processor-to-system bandwidth
  • An integrated memory controller with peak memory bandwidth of up to 6.4 GB/sec, supporting PC3200, PC2700, PC2100, or PC1600 DDR SDRAM
  • Native execution of 32-bit software, allowing today’s PC software to provide leading-edge performance while enabling a seamless migration to 64-bit software
The combination of these innovations and features provides customers with performance they need along with tremendous flexibility. Customers can experience outstanding performance running today’s applications and prepare for the next generation of software without having to upgrade or change hardware. For business customers, this extends system life cycles, simplifies technology transition and reduces total cost of ownership.

Purchase with confidence
The AMD Athlon™ processor is the only industry standard x86 processor with the ability to move beyond the limits of 32-bit computing. The AMD Athlon™ processor is compatible with Microsoft Windows XP and tens of thousands of PC applications that people around the world use every day. The award-winning AMD Athlon™ processor won over 100 industry accolades and was the first 1GHz PC processor. Now, the AMD Athlon™ processor reaches a new milestone by building a path to 64-bit computing for millions of PC users.

Founded in 1969, AMD has shipped more than 300 million PC processors worldwide. Customers can depend on the AMD Athlon™ processor and AMD for compatibility and reliability. AMD processors undergo extensive testing to help ensure compatibility with Microsoft Windows XP, Windows 98, Windows ME, Windows NT®, Windows 2000, as well as Linux and other PC operating systems. AMD works collaboratively with Microsoft and other partners to achieve compatibility of AMD processors and to expand the capability of software and hardware products leveraging AMD64 technology. AMD conducts rigorous research, development, and validation to help ensure the continued integrity and performance of its products.

Thursday, June 12, 2008

Portable Multimedia Machines or Desktops?

The performance capability of notebooks has been increasing for years: in many respects, mobile computers no longer lag behind their desktop counterparts. When purchasing a new computer these days, many users wonder whether a bulky tower CPU is even necessary, given the advantages of a notebook.

If you decide to purchase a notebook, performance is often not as decisive a factor as design, or various additional functions such as wireless capability or the ability to eject CDs when the notebook is turned off. Even if such features tempt you to buy, it pays to keep a cool head, because when compared to desktop computers, notebooks can be difficult or impossible to upgrade. You should consider the hardware very carefully, to ensure that it meets all of your needs.

If watching movies on the go is important to you, then a DVD-ROM drive and a sizable screen are musts. In this respect, notebooks with 17″ screens are considered the cream of the crop. Now that Blu-Ray has won the exhausting format battle to become DVD’s successor, we can expect to start seeing a large number of notebooks equipped with Blu-Ray drives. However, playing such high-resolution video material puts even higher demands on the hardware. Intel has already responded, and in the course of introducing mobile processors in its 45 nm manufacturing process, has also rejuvenated its mobile computer platform (Santa Rosa). These modifications have also improved the playback capabilities of high-resolution video material (see also article: Notebook comparison: Penryn vs. Merom).

Manufacturers are reacting to these changing circumstances in the notebook market sector. Acer, for example, has produced various models optimized for multimedia use, to attract customers. The 6920 and 8920 series boast 16″ and 18.4″ displays respectively, and promise complete viewing satisfaction in full HDTV resolution. However, performance like this comes at a price: interested buyers have to reach deep into their pocketbooks. The smallest model in the 6920 series costs $1,855.13, while the largest 8920G-934G64BN model is tagged at a whopping $2,937.30.

But is it really worth it to anyone to pay so much for a notebook? What could you get if you were to invest an equivalent sum in a desktop? The following article will address these questions.

Sunday, June 8, 2008

DELIVER INNOVATIVE IDEAS IN PRINT

Adobe® Creative Suite® 3.3 Design Premium software is the designer's dream toolkit for print, web, and mobile publishing. Creativity is rarely confined to one medium, so put your vector illustrations in motion, moving fluidly between Adobe Illustrator® CS3 and Adobe Flash® CS3 Professional. And use Adobe Photoshop® CS3 Extended to design and slice a web page for publishing with Adobe Dreamweaver® CS3. Design Premium combines essential tools for producing everything from professional page layouts to rich interactive experiences in a unified, intuitive environment.

Now with new Adobe Acrobat® 9 Pro plus special offering: Adobe Fireworks® CS3.


Friday, April 25, 2008

Phenom X3 With Three Cores

Phenom X3. When the Phenom processor was introduced, AMD chose not to use the "X4" extension as part of the model name. All Phenom models, without exception, had four processor cores and thus there was no need for the extension. Today’s introduction of the new Phenom processors with one CPU core less, makes it necessary to add an extension to the product name in order to ensure that they can be differentiated, thus AMD officially introduced the extensions X4 and X3 for all Phenom processors. According to AMD, many customers have expressed the desire for this change.



The Phenom X3 will only be available with B3 stepping without TLB error to end customers who purchase the processor as a tray or in the box pack.

For OEMs (Original Equipment Manufacturers) who produce complete PCs, the Phenom X3 model is available with the older and faulty B2 stepping. AMD considers it important that end customers are only able to access a fault-free processor in future.




The tri-core Phenom X3 is technically identical to the quad-core Phenom X4. Each individual CPU core has a 512 kB L2 cache and all three cores are connected to a 2 MB L3 cache. Like all of the Phenom X4 processors, the X3 is made using 65 nm process technology.

The code name has simply been changed from Barcelona to Toliman.

AMD is introducing three new Phenom X3 models:

- Phenom X3 8750 (2.40 GHz)
- Phenom X3 8650 (2.30 GHz)
- Phenom X3 8450 (2.10 GHz)

Since the new models do not contain the TLB bug, they contain a 50 at the end of the product name.



AMD does not yet intend introducing a Black Edition with a freely selectable multiplier.

In order to run the Phenom X3, AMD suggests installing the latest Bios version on the board. The tests showed that the 790FX boards from Asus, Gigabyte and MSI started with no problems. All programs used in the course of benchmark testing were able to complete their work with the Phenom X3.





The one exception was Sandra by Sisoft. The program could be started, but showed no reaction when executing the benchmark tests. Since this is a synthetic benchmark utility, this can be ignored, particularly as this behavior occurs frequently when using Sandra on new processors from both Intel and AMD.

Testing the AMD Phenom X3 8750, 8650 and 8450

Phenom X3. Four core processors followed hot on the heels of the dual core, and now there are even three core models. For the uninitiated, this begs the question, how are the CPU units placed physically. The explanation: In principle, it is a Barcelona core with just three cores activated. The AMD 780G chip set is very popular for use in cheaper PCs, multimedia computers or HTPCs (Home Theater PC) because it is lower in price than the Intel CPUs, as well as being lower on power consumption and functions. This platform now finally has a cheaper Phenom processor with more performance as well as the Athlon 64 X2.


Many users wishing to put together a lower cost PC or to upgrade used the Athlon 64 X2 in the past. Extremely low prices for the fastest 6400+ model gave the Athlon 64 X2 an unbeatable cost/performance advantage over Intel’s CPUs. Anyone not satisfied with performance, was able to use a quad core processor, but the added costs of these were too high for many users.

Now AMD has introduced the first three core desktops CPUs, the Phenom X3 8750, 8650 and 8450. With the X3s, the company has undercut the price for quad core models significantly. And the costs compared to the dual core models are attractively low.


Only very few applications are able to really make good use of the performance capabilities of a quad core processor which means that, generally speaking, the performance benefits are definitely not doubled up. The vast majority of programs only support two processors cores and, when this is the case, the computer is simply overworked by the application. If additional performance is required by the operating system, for the numerous applications running in the background such as Messenger, audio chat, video output on a second monitor or SHH encrypted downloads, the dual core application (for example, a 3D game) loses performance and runs at a slower rate. The third core is ideal for handling these additional tasks. It reduces the load on the other two cores and allows the dual core application to continue operating without disruption.

The Phenom X3 with the three processor cores makes the system capable of multi-tasking, but is considerably cheaper than a quad core CPU from AMD or Intel. AMD, in conjunction with the Phenom X3, is now in a position to offer a considerably cheaper PC system with more functions than Intel.

Friday, April 18, 2008

SEO Training – How to Get the Most Out of It

by: Tracy Fredrychowski


Let’s set the stage…

You’ve just invested valuable time and money by completing your hands-on SEO Training. You are now sitting back in your office contemplating all the wonderful information you just gathered, but you’re really confused on where to start. You pick up your notes leafing through them hoping something will inspire you to know what to do next. You start to drift back to class wishing you where still there. You hated to leave, you didn’t want it to end, you silently wish your instructor was there telling you where to begin.

Good news! I am going to share with you a detailed search engine optimization and internet marketing plan to get the most out of your seo training and to get you started today.

Step #1 – Setting Goals

Before you can really get started you have to know what you want to achieve with your Web site. There could be a number of goals that you have in mind but your first step is get a clear picture of what you want the outcome to be. It could be:

• To gain higher rankings.
• To redesign your Web site to be more user friendly.
• To implement SEO basics throughout your site to make it search engine friendly.
• To increase your visitor response online.
• To open additional windows to your site through social media marketing.
• To launch an article marketing plan.
• Or all of the above.

What ever your goal is it is important to write it down and post it where you can see it every day. “Goals that are not written down are just wishes.”

Step #2 – Keyword Research

Any new project should always include this step. Keyword research is the basis for any successful page on your site. Let’s take the goals above and see how the keyword research you learned to perform in your seo training can be used.

• Higher rankings can be achieved by finding those keywords in your industry that have a high KEI (Keyword Effectiveness Index) and low competing pages. You should concentrate on finding five phrases that you can work on simultaneously.

• By redesigning your Web site you can be including your new found phrases and work them into your sales copy. If you are creating a new site this is the ideal time to make sure you are concentrating on your visitors experience while on your site.

o Include a call to action above the fold
o Contact information above the fold in straight html including area code and zip code.
o Only use Flash in small elements and not as the whole page.
o Include something that will grab your user’s attention. Something out of the normal that will make your visitor stop and take notice of your page.

• Implementing SEO basics can be a daunting task if your site is large or it is many years old. Tactics that where used years ago are no longer useful and most times are being flagged as spam. Depending on how many elements need to be addressed you need to determine if it would be better to start with a fresh page or redo the existing page. A determining factor would be if the current page is already indexed. If this is the case then it would be best to fix the existing page. If the page has too many errors and creating a new one would be wiser be sure to name the new page the same as the old one or do a 301 redirect to the new page. Include your keyword phrase when implementing your basic search engine optimization.

• Visitor response will increase if you are giving your visitors exactly what they are looking for. Only your keyword research will help you with this. We are in an instant gratification world and your visitor will only give you a few seconds to answer their search, so make sure it exactly what they are looking for.

• Open additional windows into your site by using your keyword phrases in your social media avenues. A couple great places to include your keyword researched phrases would be in your blog post and creating a lens in Squidoo around your researched phrase.

• Article marketing is not for everyone but it does allow you to open multiple windows into your site but writing articles around your phrase and submitting them to places like Scribd, ArtcileFactory.com and EzineArticles.com.

Step - # 3 – Which one to choose?

I know you want to implement each and everyone of those goals into your site and you still don’t know where to start.

Stop here and go find five phrases to work with and don’t even think about anything else at this point.

After you find those phrases refer back to your SEO training notes and refresh your memory on how to create a search engine friendly Web page and create content for each of the new keywords you found.

It is going to be hard not to get side tracked but stick to the project at hand. Your only concern is finding 5 phrases, creating content and designing five search engine friendly pages.

Once that is done go ahead and publish the five pages to your Web site. Include each page on your site map, link it from and to relevant pages on your site and include keyword rich link text within the body of the page.

Make a note of the day you added the new pages to your site for later use.

Now that you have the first three steps under your belt you are ready to move onto step four.

Step #4 – Addressing Existing Web Site Issues

Now that you have gotten a good start with the above steps, you can start working on bringing your current Web site up to par while you are actually waiting for indexing on your 5 optimized pages. Your next plan of attack would be working on existing pages within your site. You may not be able to change every issue with your site but remember every small change could result in increased ranking for your site. You may only be able to change your title and Meta tags and not be able to change your corporate sites navigation so tackle what you can and don’t worry about the rest. Each and every issue is just one of the over 200 factors so learn to pick your battles and fix what you can.

Step #5 – Social Media and Article Marketing

Your whole goal is to open as many windows into your site as possible. You have already started this by creating 5 new pages into your site now it is time to open the windows even further. Whether you decide to use article marketing or all the endless possibility of social media marketing now is the time to concentrate on one or both of these window opening wonders.

You can use the five phrases you found in your first step or you can find 5 new ones but at this stage you are creating content to be used in articles, on blogs or bookmaking pages within the many social media avenues. Your title is the most important element when tackling this step. Make your title keyword rich, compelling and deliver what your title describes in the article or blog post.

If you are not quite ready to dive into social media start at least with adding a blog to your Web site. Your best results will come from the blog residing on your server and not one that is hosted on a free blogging site. Make a commitment to blogging regularly and always about your industry so your site and your blog are industry related.

Step #6 – Tracking Your Progress

Web analytics can show you information about all of your optimization projects. Not only will it show you your results for the 5 keyword phrases you are working on but it will open your eyes to how your visitor is moving through your site. Record your results on a weekly or daily basis. This step will help you in testing each one of your projects and help you decide which one you should concentrate more on. Usually I find 2 or 3 phrases that are really performing and those are the ones I concentrate on blogging and adding it to the social media venues.

Step #7 – Keep Up With the Changes

There is no other step as important as this one. The internet changes its landscape on a daily basis so it is imperative that what you learn in your SEO Training is always the latest information. Your Web site and or clients are depending on your expertise so don’t let them down by applying out of date or useless techniques. There are many places you can turn to for guidance.

The first place would be Google, Yahoo! and MSN’s Webmasters guidelines. Each is posted on their site and is updates each and every time they have made changes to them.

Another place would be to subscribe to one of many search engine optimization and marketing blogs created by industry leaders. Your instructor should be able to point you in the right direction to their most trusted resources.

Continue learning by attending your favorite SEO Training provider’s courses on a yearly basis. Principles and techniques change often so always keep on top them.

Often students are overwhelmed with the amount of information they are given at class but if you learn to take them in small steps starting with setting your goals you will find that your seo training is working for you and your Web site.

Deploying Ruby on Rails Applications to Microsoft IIS and Windows Server

by: Rahoul Baruah

The process I've followed here has worked on IIS on Windows 2000 Server, Windows XP and now Windows Server 2003. I don't know which versions of IIS were involved but the same basic process has been used across all three. I've not quite managed to get web services working over IIS but I reckon I'm not far away - so follow the instructions below and I'll update you when we get there.

So where do we begin? First of all, collect all your bits and bobs together. In particular you will need

* the Ruby Installer http://rubyforge.org/frs/download.php/4174/ruby182-15.exe
* the Rails Framework http://rubyforge.org/frs/download.php/7655/rails-1.0.0.zip
* the Ruby DBI-ADO Interface http://ruby-dbi.rubyforge.org/ (if you are using SQL Server)
* Ruby for IIS http://rubyforiis.sosukodo.org/
* FastCGI for IIS http://www.caraveo.com/fastcgi/
* and the Ionic Rewriter http://cheeso.members.winisp.net/dl/IonicIsapiRewriter.zip

Ruby is for obvious reasons.

Rails is useful as I found that 2003 is so locked down that gem did not have access to download the framework from rubyforge.

The DBI-ADO interface is needed for a single file, ADO.rb, that allows the SQL Server adapter to connect to MS-SQL.

Ruby for IIS does some patching to Rails and Ruby to allow IIS to route its requests to FastCGI and eventually to Rails. In the interests of full disclosure I should say that I have not looked at the source of this and so do not know exactly how it works. I will get round to it, promise.

FastCGI keeps a number of Ruby/Rails processes running within IIS. This means that when a request comes in from a client you do not need to start a new Ruby process (and hence incur the not insignificant cost of loading all the libraries) every time. Instead FastCGI starts N processes and if all are busy will start more, upto a maximum of M processes and routes requests to whichever process is free.

The Ionic Rewriter takes a Rails-friendly url (controller/action/id) and rewrites it into a form that IIS understands. IIS then dispatches this new URL to FastCGI which in turn passes it to Ruby.

So, you've installed Rails (into C:Ruby) and copied your application files over (into D:MyApp). You've added the Rails framework into your application's vendor folder (D:MyAppvendor) - this is because we will be altering some of the framework files so we want to keep our changes (in D:MyAppvendor) separate from the main Rails installation (in C:rubylibrubygems1.8gems). You then need to extract ADO.rb from the DBI file and place it in C:rubylibrubysite_ruby1.8DBD - you will need to create an ADO folder and place the file into there.

Next up, edit your application's configuration file (either one of the environment specific ones, or your general one - you decide) and add the line:

ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:tmpdir] = 'D:Temp'

You will need to create a Temp folder on D: or your application will silently fail to work. The point of this is to force Ruby to place its session files into a known folder - if you read back through this blog you will find that at one point I was having strange behaviour with sessions. It turns out that as you run under different configurations (CGI, FastCGI and WEBrick) Ruby sometimes places its files in different locations and you get unpredictable behaviour. Plus it also helps when you need to clean up your sessions (which you will need to do later).

Now run your application under WEBrick. This is vital. If it doesn't work here it definitely won't work under IIS. Don't say I didn't warn you. What? It didn't work under WEBrick. I bet you forgot to edit your database.yml file. Go and do it now and test it again. Still doesn't work? Seems to fail silently with no entries in your log file. I told you - create a D:Temp folder and you should be OK.

Copy your ISAPI files to a safe place - I tend to put them in C:InetPub - they are associated with IIS but not available to the public. This means copying your FastCGI.DLL and IsapiRewrite4.DLL and IsapiRewrite4.INI files to wherever. Watch out, the Ionic Rewriter DLL and INI file must live in the same folder.

Fire up the trusty pain-in-the-arse Internet Information Services configuration manager. The instructions here are for setting up one site on the "Default Web Site" - I don't think it will be too hard to set up multiple Rails sites on one IIS site and even easier to set up multiple IIS sites, each containing a single Rails site. But I've not done it so I won't go on about it here.

Right-click on your "Default Web Site" and select "Properties". Select ISAPI Filters. Click Add and enter a filter name of "Rewriter" and select the IsapiRewrite4 DLL.

Next, switch to the "Home Directory" tab. Make sure "a directory stored on this computer" is selected and set D:MyAppPublic as the local path. Put your application name into "Application Name" (if this is greyed out then click "Create" to set up the site as an application) and make sure "Scripts and Executables" is selected for "execute permissions". Next up, click "Configuration". Under "Mappings" click "Add" and select FastCGI.DLL as the executable, .fcgi as the extension (if you are going to have multiple Rails applications on a single server you need to vary this extension on a Rails-application-specific basis - for example .myapp1, .myapp2 etc), with "All Verbs", "Script Engine" and "Check that file exists" all selected.

If you're on Server 2003 there is an extra step. You have to allow IIS access to the executables you are going to be using. Create a new Web Server Extension in the IIS Configuration Manager, calling it "MyApp". Add FastCGI.DLL, IsapiRewriter4.DLL and RubyW.exe to this extension and make sure that it is enabled.

Phew - what have we done so far?

* We've installed Rails and our application and made sure it works OK under WEBrick
* We've told IIS that the default web site for this server is our application's public folder
* We've told IIS that any request to the default web site should be fed through the Ionic Rewriter
* We've told IIS that any request for a .fcgi file should be fed through FastCGI

What we've not done is tell Ionic or FastCGI how to behave.

Ionic first. Edit IsapiRewrite4.INI - get rid of the contents of the file and replace it with

# Ruby on Rails
IterationLimit 0
RewriteRule ^(/[^.]+)$ /dispatch.fcgi?$1

This takes the URL that IIS recieves and matches it against the given regular expression. I'm no grexpert but I'm reliably informed that it matches any string starting with a '/' that does not contain '.'s. If you are setting up a web-service then this has an implication - by default Rails makes the WSDL available via a URL ending in service.wsdl. You will need to edit D:MyAppconfigroutes.rb to change this to something like service_wsdl - otherwise the URL rewriter will spot the '.' and will not feed the request to Rails at all. (Of course, I haven't got web services working with these instructions yet). Anyway, so it matches any URL starting with a '/' and not containing a '.' - and rewrites it to /dispatch.fcgi?$1. So /controller/action/id will be matched to /dispatch.fcgi?/controller/action/id.

Hang on - our URL is being rewritten with a .fcgi in it - ring any bells? That's right, next up we configure FastCGI. Open RegEdit and open the Local Machine/Software key. Create a key (folder) called "FastCGI". Under here create another key (folder) called ".fcgi" - when FastCGI is invoked with a file extension of .fcgi it will use the settings in this key. This is why, when we have multiple applications on a single server, we need to vary the file extensions (.myapp1, .myapp2 as detailed above - likewise we need to rename dispatch.fcgi to dispatch.myapp1/dispatch.myapp2 for each respective application). The basic FastCGI setttings we need (we'll add some more later) are:

* AppPath - set this to C:rubybinrubyw.exe
* Args - set this to D:MyApppublicdispatch.fcgi
* BindPath - set this to MyAppRailsCGI

AppPath tells FastCGI that we want Ruby (the "windows" version that does not produce a command line output) to execute our scripts, passing it the Args (our dispatch.fcgi script) as the entry point to the application, using the Named Pipe "MyAppRailsCGI" to communicate.

Now, use the IIS Configuration thingy to restart IIS - right-click on the Server, select All Tasks and restart. This seems to take forever on Server 2003. Now open your favourite browser and point it at your application (http://myserver/controller/action/id or whatever). Now I'm betting that you get a "recognition failed for dispatch.fcgi".

Let's take a walk on the dark side. I'm not 100% sure what is going on here. It involves regular expressions and environment variables that I can't access in debug mode and it all seems to happen before Rails' logging is invoked. So this is guesswork that seems to be effective. Go to D:MyAppvendoractionpack-versionlibaction_controllerrequest.rb - this is the Ruby file that ActionPack uses to route URL requests. Under Apache and WEBrick, it returns the REQUEST_URI environment variable, and if it can't get at it, it manipulates PATH_INFO and SCRIPT_NAME to get the same result. Under IIS it doesn't work - what the method is expecting is a "SCRIPT_NAME" of "/dispatch.fcgi" (which is what we have) but a "PATH_INFO" of "/dispatch.fcgi/controller/action". In other words, instead of extracting the original URL and making it into a query string, it expects the original URL to be tacked onto the end of the dispatcher script. The problem with this is that if the URL looks l!
ike that, then the URL no longer ends with .fcgi so IIS does not know to ask FastCGI to process the request. Our PATH_INFO looks more like "/dispatch.fcgi?/controller/action" - note the all important question mark in the URL. However, if we modify the request_uri method in request.rb to look like:

# Returns the request URI correctly, taking into account the idiosyncracies
# of the various servers.

def request_uri
if uri = env['REQUEST_URI']
(%r{^w+://[^/]+(/.*|$)$} =~ uri) ? $1 : uri # Remove domain, which webrick puts into the request_uri.
else
# REQUEST_URI is blank under IIS - get this from PATH_INFO and SCRIPT_NAME
script_filename = env['SCRIPT_NAME'].to_s#.match(%r{[^/]+$})
uri = env['PATH_INFO']
uri = uri.sub("#{script_filename}", "") unless script_filename.nil?
uri
end
end

I'm 99% sure that this edit is what is making the web-services fall over. However, it does mean that traditional sites (that don't use query strings) are routed correctly.

Restart IIS (again .. yawn) and try connecting once more. After a long pause (as FastCGI invokes Ruby for the first time) you should see your application. Congratulations. Have a cup of tea.

Now to reconfigure FastCGI again ... reopen RegEdit and move to your .fcgi key. Add entries for StartServers (DWORD), IncrementServers (DWORD) and MaxServers (DWORD). This tells FastCGI how many copies of Ruby to start initially (I tend to use 5), how many to start at times of high load (I tend to use 3) and the maximum number of Ruby processes to have running at one time (15 if your server can handle it). I also tend to set the Timeout (DWORD) to 600 - if FastCGI needs to start extra Ruby processes it will keep them alive for ten minutes before shutting them down again. And your last one - add a BINARY key called Environment - and type in RAILS_ENV=PRODUCTION for the value. In Regedit you can directly enter the value for binaries by typing in the right hand side of the edit box - you don't need to convert each character into Hex, like I did the first time I was confronted with this editor!

And there you have it. Your Rails application (sans web-services) should be up and running on your IIS server. It should have 5 concurrent Ruby processes dealing with incoming requests, increasing to 15 processes under load.

Hope that helps ... enjoy.

Oops - almost forgot. Create a batch file (D:MyAppScriptscleanup.cmd) that contains the line del D:TempRuby_Sess*.*. Then add a scheduled task to run that batch file every night at some god-forsaken hour. This cleans up Ruby's session files and prevents too many from being created. Of course, ideally, you would examine the last-changed-time and only delete those that hadn't been touched in twenty minutes, or whatever, but, for my application at least, getting rid of all of yesterday's sessions is good enough. Your mileage may vary.

Rahoul Baruah, Ruby on Rails Development at http://www.3hv.co.uk/