Site Contents
My Blog
Wireless & Networking
Hardware & Gadgets
Software Picks
Contact Me

My Articles & Papers
Flex Performance
Server/Client Under the Hood
Multiple Instances of CFMX
Multiple Instance Config
NLB with ColdFusion
Clustering CFMX for J2EE
Multi-Tier Hardware LB w CFMX
Cisco CSS & Coldfusion MX
JRun 4 Jini based Clustering
WiFi Growth

2ID Tacweb

Other Hobbys
Body-For-Life Challenge

Personal Projects
Family Pool
Deck Gate



Welcome to, the personal homepage of Brandon Purcell. I started building many, many years ago to share information I ran across everyday in my role as a Support Engineer and Consultant for Macromedia/Adobe. As a support engineer and consultant I always had a lot to blog about but as I moved into managment roles at Adobe my technical content dwindled.

I currently work as the Director of Technology for Universal Mind. My primary responsiblity is managing the SpatialKey project and it has been an amazing experience. I have been spending a lot of time working with Amazon Ec2 and will share my experiences through the blog in the future. I truly believe that Cloud Computing is the IT platform of the future and we have built the SpatialKey architecture on top of Ec2.

Viewing by Category: General Web Dev / Main
September 8, 2008

Utah State Senator and Ogden City Police Chief blogs about Spatialkey and the power of bringing together relevant data sets from multiple places. Here is a small sampling of Chief Griener's posting.

"Not just any map - it's a combination map of satellite images, street map, and my geographically assigned patrol beat map in layers. The company (Universal Mind) has made it so user friendly that I can literally research and plot over 400,000 calls for service in the last 5 years in about 30 seconds. The system is web based so quickly analyzing What-Ifs can be accomplished anytime, anywhere, on any computer with an air card. You can begin to see how this would be valuable to me and my law enforcement team."

SpatialKey Law Enforcement continues to evolve and improve to provide cutting edge technology to the Law Enforcement community. It is exciting to be a part of great team with so much potential. Keep an eye on the SpatialKey blog for other important news around SpatialKey in general.


The most recent issue of ComputerWorld magazine features a cover story called "Can Web 2.0 Save B.I.?" that features a case study on SpatialKey. In the article they interview Chief Jon Greiner of the Ogden Police Department in Utah. Ogden is the first installation of the enterprise version of SpatialKey Law Enforcement Dashboard (see the press release), and Universal Mind has been working closely with the Ogden PD to use the SpatialKey platform to develop what we think is a game-changing crime mapping product.

Yes that is our application on the cover. Check out the online version of the article on ComputerWorlds' website

September 1, 2008

Something has really been annoying me with Firefox 3 where it would open a new tab for pop up windows. It was particular annoying when I was using a Content Management System that normally opens an HTML editor in a popup window and resize the popup window to a particular size. Instead of opening a new window the HTML editor would open in a new tab and resize the browser so that after I was done with the HTML editor I had to resize the browser back to its original size. I searched in the configuration for Firefox but the only configuration change is to change the behavior so that new links open in a new window and not a new tab, there was nothing about changing the behavior for pop ups.

With a little searching around Google I found a solution that solves the problem. The first step is to enter about:config into the address window to enter the advanced configuration panel. In the filter enter

The original setting for "" is set to 3, set this value to 2 close the browser and reopen it. Now Firefox will open popup windows normally. I found the tip here.

October 28, 2006

Since the debut of Flash 6 video has been available in the Flash Player. It has taken quite a while to catch on but if you are browsing around these days it is impossible not to stumble across a site that uses Flash Video. Sites like YouTube, Google Video, and MySpace have embraced flash video as their standard for delivering video to millions of users per day.

I am a common visitor to and I usually find most of the comments bashing Flash. Advertisers and ugly "skip intro" home pages have been the reason behind most of the bad blood. For video though Flash is hands down the best option. Flash is ubiquitous, universal and works across every common operating systems. It also is integrated with most of the gaming consoles that enable browsing.  I can't say that I always agree with John C. Dvorak but I definetily agree with a recent quote in PC Magazine. Unless you're streaming hi-def content to the TV over the network so that  you can watch IPTV shows, anything you plan on your computer should be Flash and only Flash. One of my favorite websites has driven this point home for me. They have interviews and audio available on the site, if you attempt to click on the player UI you just get a broken image with no explanation. Most users wouldn't have a clue why it is not working. The video requires real player but without it you don't have a clue what is wrong. With Flash Player there are well-documented detection techniques that can provide alternate content and messaging to users that do not have the correct player installed. You just can't beat the experience you can provide as a developer. There are other options  (Windows Media Player, Quicktime, and Realplayer) each of them have the positive and negative points but if you compare all of the options across all OS's and browsers Flash definitely comes out the winner.

One of the common complaints with Flash video is full screen mode. With WMV content you can double click on the content and push it out to full screen. With a recent beta release of Flash 9 on 9,0,18,60 introduces full screen mode. This allows sites to deliver on the full immersive experience many people posting video to the web would like to provide for their viewers.

There is a lot of great content over at the Flash Video Devcenter  that can help you get started with Flash Video.


February 20, 2006

In a previous blog posting I discussed how to obtain a users geographical location based on their IP with IP2Location and ColdFusion. In this article I explain how to import the data, break the data into multiple tables for optimization, then create the UDF to perform the lookup. I have had several requests for the stored procedures used to break up the IP2Location data. I have posted them along with the CF code.

You can find the full article here

February 7, 2006

I recently was encountered with a problem where I needed to find what location a user was logging in from based on their IP. There were several reasons why such a system was needed that I highlight below.

Benefits of building such a system

  1. Targeting fraudulent users that share their accounts
  2. Reducing credit card fraud
  3. Display native language and currency
  4. Redirect web pages based on geographical region
  5. Filter access from countries you do not do business with
  6. Geographical targeting for in house ad serving

I first started looking for third party solutions that could be accessed through a webservice but quickly arrived at IP2Location offers a downloadable CSV database that you can run on your own system. The cost is not significant depending on the amount of data you need. They offer IP-Country-Region-City-Latitude-Longitude-ZIPCode-ISP-Domain Database if you need that level of information.   Anyways&on to the technical part.

The CSV format that is provided is simple to import into any database, I was using MS SQL server and imported the data using DTS. There are over 4 million rows in the table so it does not make sense to query directly against the data that was imported for performance reasons. Instead to make the queries very quick that return location data I split the main table out into 20 tables, this left 200,000 rows in each table and proved to scale much better. Since IP2Location offers regular updates I wanted to be able to handle the update process and splitting of the data with very little work on my part. To do that I created two stored procedures.

1. IP2RangeTable The first stored procedure looks at the main table containing 4 million records and divides it into 20 different ranges. Those ranges are then stored in a range table containing the start, end and table name that will store the data.
2. The second stored procedure uses the IP2RangeTable created previously and bulk inserts the range of data from the main table into the range tables. They were simply called range1 - range20.

Both of the stored procedures were written in such a way that the data could be broken out into X number of tables. It just takes the number of tables as a parameter. In this case I used 20. The further you break it out the better it will perform.

Next, I created a UDF in ColdFusion (could be done in a stored proc as well) that takes an IP as an argument. The IP is converted to an IP Number. IP Numbers are used in the database to store the IP2Location content. An example for conversion follows.

IP Number = 16777216*w + 65536*x + 256*y + z     (1)
IP Address = w.x.y.z

For example, if IP address is "", then its IP Number "3401190660" is based on the formula (1).

IP Address =

So, w = 202, x = 186, y = 13 and z = 4

IP Number = 16777216*202 + 65536*186 + 256*13 + 4
          = 3388997632 + 12189696 + 3328 + 4
          = 3401190660 looks at the IP2Range

Once we have the IP number we need to find what table the record is stored in within the range1-rangeX tables. A query retrieves the values stored in IPRangeTable, from that data we can find the correct range table. Next a query is used against the range table to retrieve the location data.

This may sound complicated but it is really simple. Unlimately you could just query the original table that you imported from the CSV but I found the queries to take way to long and caused a lot of stress on the db server under load. Even with the right indexes in place. By breaking the data out into range tables you increase the scalablity exponentially.

Let me know if you have any other questions about this process and the benefits that the data provides.

Later I will explain how the event gateway was used to log this information for every user that logged into the site as a background process.

January 7, 2006
I found this link on and it has several good tutorials on regular expressions. They are good a refresher if you are already familiar and good for newbies as well. You can find them here...

January 7, 2004

I have always found search engines interesting and based on some of the statistics I collect from referring pages I wrote some code that displays the latest referrals from the google search engine. I also like to see where my pages rank and what topics are most viewed on my site. I collect the data by using the cgi.HTTP_REFERER variable and storing it in a db. I parse out the google querystring using a UDF called GetGoogleKeywords from

You can view the realtime google keyword searches on this page.

August 28, 2003
Yahoo! News is now offering several feeds in the RSS format. The feeds are free of charge to use for individuals and non-profit organizations for non-commercial use. Combine this with a RSS reader like FeedDemon and you don't even need to browse the web for news just open up your RSS reader.

August 27, 2003

With the upcoming release of MX 2004 the website has added several articles highlighting the new features of each product.

Macromedia MX 2004: Creating Better Experiences
by Norm Meyrowitz
Norm Meyrowitz tells how the new family of products will help you make a big difference for your users.

What's New in Macromedia Flash MX 2004
by Phillip Kerman
Data binding, forms, video, more: Find out about revolutionary new features for app developers from Phillip Kerman.

What's New in Dreamweaver MX 2004
by Jennifer Taylor
Hear what Dreamweaver Product Manager Jennifer Taylor has to say about the new version.

What's New in Fireworks MX 2004
by Kim Cavanaugh
Hear Kim Cavanaugh's top 10 reasons to love Fireworks MX 2004. 2004 Update
by Al Ramadan
Al Ramadan introduces you to 2004: the experience that is the new site design.

The New An Experience That Simply Works Better
by Les Schmidt
Les Schmidt tells you why and how Macromedia executed the new design of

Behind the New, New
by Tony Lopez and David Hatch
Learn how the new site structure improves user experience, addresses core concerns, and makes good business sense.

New in the Developer Center: 10 Improvements, MX 2004 Content Preview
by Craig Goodman
Find out what's changedand what's comingin the Developer Center.

August 19, 2003

This article has been around for a while but it is worth revisiting if you are still using ColdFusion Studio. I switch between Dreamweaver and Homesite + while developing CF but I am comfortable with Dreamweaver. It does take some modifcation to get it setup similar to Studio. This article will get you moving in the right direction.

If you are a fan of Homesite then you have to check out this site.  I stumbled upon it while searching on google.While a lot of the content is geared towards ASP development there are several color coding extensions for other languages that are not included in Homesite.  The one that I was particularly interested in was color coding for Actionscript files.  I am a fan of Flash, but not a fan of the built in actionscript editor.  I would rather just include an actionscript file and work on it within Homesite.

July 11, 2003
  1. Build database schema based off of Ray's blogger (use SQL Script in a CF page)
    1. create new accessdb called contentV2.mdb
    2. rename existing tables
  2. Write scripts to migrate data to new format, ensure I migrate the category (data will be multi-category going forward) Scripts will migrate final data on go-live date.
  3. Rename existing table for content management content (links, section headings, etc) Rename the old myblog.cfc to sitecontent.cfc and change all references from blog to content along with the directory /blog to /contentmanager
  4. Remember to keeps /blog/index.cfm?blogID=xx so search engines can still refer to my contents (will be depracated later) May want to write a system that will redirect or just include the content.  I decided to use Rays links now
  5. Integrate Ray's blog.cfc into the site as a base for building the blogger
  6. Integrate Ray's index.cfm into my index.cfm (keep content header)
  7. Integrate Ray's index.cfm into each section (I still need to figure this one out)
  8. Build a new blog editor integrating soEditor and Rays blog editor (use pop up?)
  9. Test Jimg from DRK v4 (need JDK 1.4 or RedSky) talk to Cass about moving to RedSky

Enhancements/Features of v2.0

  1. Blogs will be multicategory
  2. Calendar will be provided on home page, CF, JRun etc
  3. Will be able to view postings by category, month, day and last X days
  4. RSS feed (need to explore RSS 2.0 feed) 
  5. Add error handling in case the blog ID doesn't exist (bullet proofing)
  6. Finish Photo Album feature (Test Jimg)

Remind Cass that he should update to RedSky when it is out. I will need to update my internal CF admin to the redsky bits

April 25, 2003

Part of my content management solution included a utlitility to upload and manipulate images.  I am using a tree control in a framed layout to display the directories. Then in the right frame I display the image and use a custom built CF solution to manipulate the images.  Check back later for all of the details


  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      

Subject Archives
Amazon EC2 (15)
ColdFusionMX (155)
Corvette (3)
Flash Lite (4)
Flash Media Server (5)
Flash Player (3)
Flex (39)
General Web Dev (14)
HDTV (3)
Jboss (1)
Jquery (2)
JRun (59)
Max 2003 (3)
Other (33)
PC Hardware (16)
Software (17)
SpatialKey (7)
Wireless (8)
Working Out (1)

RSS Feed
Feed Listing
Corvette - October 2005 brandonpurcell's Corvette - October 2005 photoset
Macromedia ColdFusion MX

Featured Links
Stock Footage
Page Render Time:15 user:""