Ask a Jedi: Development question - built in JRun web server versus IIS

This post is more than 2 years old.

Paul asks:

What's a better development environment?

For those of us that use a local development environment, is there any advantage to using CF Dev Edition's built-in JRun server, vs. installing IIS on Windows XP and using that?

I just looked at my task manager, and JRun is using a whopping 220 MB of memory, without having been accessed since I booted, completely idle. That's far more than anything else currently running on my system.

When it comes to a development environment, I think most people feel that the best rule is that it should match, as much as possible, the production environment. I don't think it is expected that it would be an exact match. Production would probably be Windows Server 2003 and development would be Windows XP, but you get the idea.

With that being said - you should not be using the built-in JRun web server for production. Therefore I'd recommend against it in development as well.

However - IIS is a bit of a pain. Unless you are willing to google and look up a hack, you can't run multiple virtual web servers with IIS under XP. Now if all you work on is one site, that's no big deal. If you are a contractor and work on multiple sites, you really want that multiple server setup. That's why I use Apache (well, I'm on a Mac now so I kind of have to, but even before I switched I used Apache). The only time the difference between Apache and IIS has bit me in the butt is with CGI variables.

Raymond Camden's Picture

About Raymond Camden

Raymond is a senior developer evangelist for Adobe. He focuses on document services, JavaScript, and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA https://www.raymondcamden.com

Archived Comments

Comment 1 by Brian Panulla posted on 3/10/2008 at 11:41 PM

Even if you do decide to use the built in Web server, if JRun is idle it'll just get swapped out into virtual memory and not really cause much of a problem.

I'm also dubious that running the ColdFusion service (which is just an embedded JRun instance) is significantly less than the ColdFusion service + Built-in Web server. It'd be worth a test, but I wouldn't put money on it.

Comment 2 by Ken Ford posted on 3/10/2008 at 11:43 PM

There is a workaround to creating/running multiple websites on Windows XP Pro:

With a GUI:

http://jetstat.com/iisadmin/

Scripting:

http://andreineculau.wordpr...

Windows Vista use IIS and allows multiple web sites.

Comment 3 by charlie griefer posted on 3/11/2008 at 12:34 AM

yeah, IISadmin is a cool tool, but can be a pain if you're working on numerous web sites and have to switch back and forth frequently.

at work, we're on XP on the desktop, so i have to deal with doing that. at any given point on any given day i could be asked to make a tweak to one of several sites, so i'm switching back and forth frequently.

at home i do the apache thing (even though my personal site(s) are on IIS). sure, i'd love to keep the environments as identical as possible, but the sites are fairly basic and i've yet to run into any issues at the web server level.

Comment 4 by Will B. posted on 3/11/2008 at 12:50 AM

There's always the Virtual Machine route, too. Where I'm at I have to switch constantly between a current environment and the new version being developed. One runs on Jrun with a thrice-daily updated WAR file and the other is just straight ColdFusion (not even multiserver install). To switch back and forth in the same machine is super-painful, so a VM works great for me.

Unfortunately, unless I want to map out directories (network sharing and such), I have to have Eclipse installed on both VM's...and I never have everything exactly the same, like snippets, etc. Nor is my Firefox install even the same, with plugins, bookmarks.

But it works good enough!

- Will B.

Comment 5 by Gary Funk posted on 3/11/2008 at 1:15 AM

So I was setting up my notebook for development and then realized IIS would only do on e site on XP. Then bingo, find the answer on Ray's blog. You have to love the CF community.

Comment 6 by todd sharp posted on 3/11/2008 at 1:38 AM

IIS 7 (ships with Vista) allows multiple sites with no hacks.

Comment 7 by Michael Brennan-White posted on 3/11/2008 at 3:48 AM

The caveat for Vista Basic users is that IIS is not installed(able?). Though I probably should install Apache I stuck with the development server.

Comment 8 by todd sharp posted on 3/11/2008 at 4:10 AM

People really buy Vista basic?

Comment 9 by Jeff Smallwood posted on 3/11/2008 at 5:59 AM

I give a huge vote for the VM route too. We use them on my team and we've found having multiple VM images with different server configurations is a great way to develop for multiple environments. And one huge plus that I like is that unless I actually need the servers up, my computer isn't bogged down by running all the services in the background all day, every day. Makes my PC more reliable and run smoother. It also allows me to simulate a closer client-server setup like the production environment. I user VMWare to save the "state" of each server when I'm done rather than turning it off. What way I can shut down one server and bring another one up in less than 20 seconds.

Comment 10 by Raymond Camden posted on 3/11/2008 at 6:36 AM

@Todd: People really buy Vista?

;)

Comment 11 by Steve &aposCutter&apos Blades posted on 3/11/2008 at 4:04 PM

@Ray - What were the differences in the CGI variables? I haven't run into that yet, so it would be good to know in advance...

Comment 12 by todd sharp posted on 3/11/2008 at 4:36 PM

@Ray

I guess I stepped right into that one...

Comment 13 by Raymond Camden posted on 3/11/2008 at 5:06 PM

@Steve- I don't have an exact list. But since CGI stuff comes from the web server, each one does things a bit differently. In fact, that's one reason you can output CGI.RAY in ColdFusion. ColdFusion allows you to use ANY CGI variable since it is so... well variable.

Comment 14 by Steve &aposCutter&apos Blades posted on 3/11/2008 at 7:57 PM

@Ray - Thanks Ray, I figured as much. I haven't had any problems with the basics (server_name, script_name, path, etc), but I figured I'd ask.

BTW, we've gone back and forth enough, you can call me Cutter;)

Comment 15 by David McGuigan posted on 3/11/2008 at 8:13 PM

I've been on Vista with infinitely many IIS sites (our production
environment will shortly be Server 2008) for forever and a day now and
it's worked REALLY well. By far the most stable OS I've ever been on.
Like, I've been in love with it and am contemplating marriage to it.
Granted, I've completely overhauled the look and feel of Vista and
turned off all of the 'aero' stuff, but still. I'm so much happier than
when I was on OS X. That sounds like a joke, but I'm totally serious.

Another quick, random development tip while we're at it is to write a
simple batch file to start or stop all of your disparate 'server'
software automatically.

What that lets you do is boot into your OS without all of the services
starting automatically so that if you work off of a laptop, for example,
you can have those resources freed up for better performance when you're
not developing without having to manually shut them all down after
startup. It's pretty effective for heavy apps, playing Crysis for instance.

Here's an example of one that will launch IIS, CF8, and MySQL (in that
order).

Start.bat contents:
Net Start "IIS Admin Service"
Net Start "ColdFusion 8 Application Server"
Net Start "MySQL"

That's it. Pretty simple but way h-core sweet and a bag of chips you
feel me dawg?

What makes you feel even cooler is creating a shortcut to it in your
taskbar (to make Vista look way mo betta, use TrueLaunchBar) and
swapping out the ColdFusion logo for its icon.

Here's a screenshot:
http://www.fleet19.com/Shar...

Comment 16 by Julian Halliwell posted on 3/12/2008 at 1:43 PM

+1 for using a VM. And (@Will B) you can easily map drives so that you can use an editor on your host OS to work with the files on the VM: exactly the same as if you were mapping to a physically separate dev server, but with the speed of a local drive.

Only downside is the additional Windows licensing.

Comment 17 by Jeff Smallwood posted on 3/12/2008 at 4:08 PM

One other thing about the VM arrangement that Julian reminded me of. When I first started using VMs, I actually disliked the idea of having my code inside the VM. It meant if I had multiple server arrangements I needed to keep more copies of the code than I wanted. I typically have the code in one spot but need to test against different server setups (that can mirror different customers). Plus, sometimes I just need to check a file w/o firing up the VM and getting all the servers running.

So what I do is keep all the code and my IDE (CFEclipse) on the local PC. Then all my VM webservers have virtual directories that point to the code on my physical PC via UNC paths. I can keep the code in one place (with minimal copies) but load any server I want to run it. I've been using this arrangement for almost a year and have found it to be the most flexible development setup I've ever used. But I know other's mileage will vary.

Comment 18 by David Johnson posted on 3/26/2008 at 5:41 PM

When developing on an XP box you can just spawn multiple virtual directories under the main site. It's not entirely the same as multiple websites, but I've never had a problem moving my applications.