Monday, May 26, 2008

Government and the Web

Matt Ball recently pointed out an article coming to press at the Yale Journal of Law and Technology, titled "Government Data and the Invisible Hand". Since I just got back from San Francisco, where I gave a talk titled "Robocop: Public Service in the Internet Age", it feels like the universe is vibrating on a particular wave length right now, saying
"free your data, let the world play in your garden!"
My talk was itself organized around the ideas presented in the UK "Power of Information" report, which I learned about from a high level civil servant in the BC government.

Vibrate, universe, vibrate!

Coles notes of my talk:
public service
on the internet
is a new medium
it requires a new approach
serve online communities
serve alternative users of information
provide open access to your information
remove policy barriers
expect re-use, encourage it
use standard formats
become part of the internet

Why use ArcSDE?

Those not on the PostGIS users mailing list will have missed an interesting thread that pulled together some good comments from both the usual suspects and some unexpected participants.

Some choice quotes:
"Yes, using SDE effectively castrates the spatial database. It still walks and talks, but it's a shell of the man it was before. "yours truly

"The 'economical' route for those that want to use PostGIS and have edit capabilities inside ArcGIS desktop would be to use the ZigGIS professional which (from my understanding) implements an editable PostGIS layer in ArcGIS desktop."Rob Tester

"If you compare [pricing] with Oracle then yes probably so... But honestly if you are talking about SQL Server vs. PostgreSQL, I think the savings you get from running PostgreSQL would be dwarfed by the cost of SDE."Regina Obe

"Spatial databases are being commoditized, but SDE is not a spatial database, it's a revenue enhancer for ArcMap, and ArcMap is *not* being commoditized."yours truly

"A few disclaimers and background : Until last year, I worked at ESRI. I contributed with some of bug fixes for the PostgreSQL/PostGIS support in the ArcObjects side of things."Ragi Burhum (read this one!)

"There is one thing to note in a mixed-client environment and that is this: if a non-ESRI client writes an invalid geometry to a the database then when ArcSDE constructs a query over an area that includes this feature ArcSDE will discover the error (as it passed all queried features into its own shape checking routines) and stop the query"Simon Greener (read this one!)
I'm thinking of becoming an instigator. Apparently there's money in p***ing people off.
 

Wednesday, May 14, 2008

Elephant vs Dolphin

Elephant crushes dolphin, but dolphin drowns elephant?

More folks doing real work needing a real spatial database, this time RedFin a real estate information company.
Specifically, we were having some major performance problems with queries that were constrained by both spatial and numeric columns, and all of our attempts to squeeze more performance out of MySQL (including hiring expensive outside consultants) had come to naught.
Guys, if you're going to hire expensive outside consultants to help with your spatial database problems, they should be (a) me and (b) conversant in PostGIS! :)

Update: It is worth explaining that their main problem, the slow results when the spatial clause was weak, is a direct result of MySQL having an inferior query planner. PostGIS is fast because PostGIS provides good statistics on spatial index selectivity to the planner, and the PgSQL planner is flexible enough to accept selectivity information from extended types. I know this is a big performance problem because before PostGIS had a decent selectivity system, performance bottlenecks like RedFin's happened all the time.
 

Tuesday, May 13, 2008

Feel the Burn

My purchase of a house in central Victoria eight years ago just keeps getting better and better (I can walk everywhere I want to go, daily amenities within 500m, all of downtown within 2km). Paul Krugman posts on a map from the Sydney Morning Herald, showing the expected proportion of family income that will go to petrol as prices rise.



I will refrain from gloating to my colleagues in exurban Atlanta and Phoenix. Except this probably counts. Oh well, in for a penny, in for a pound: suckers!

I wonder if David Brooks will recant his (surprisingly recent) love letter to the exurb. James Howard Kunstler hasn't been that good at predicting the future, but his take on Atlanta from five years ago is looking more and more spot on.

ArcServer vs Geoserver

Props to Chris Holmes, posting about the work going into making the next version of Geoserver fully crawleable (not a real word! (yet!)) by web spiders, right in synch with Jack Dangermond's announcement of the same feature coming in ArcServer.



The government here in British Columbia is moving haltingly towards a more service-oriented approach to spatial data publishing, and this has included a strong awareness that being consumable by Google tools, and spidered by search engines is key to improving general accessibility. If the citizen's first stop in searching for information is Google or MSN, it makes sense to spend some effort ensuring your relevant information is properly exposed via those services.

Free business opportunity: establish button-down search engine optimization firm targeted exclusively at government clients.

Now, why is Google sharing the stage with ESRI? ESRI needs Google's stamp of approval a lot more than Google needs ESRI's – what's in it for Google? Is the Google worried that Virtual Earth is doing better cultivating government application development opportunities than the Google suite? Google plays well with the hacker set, but is a harder sell with the suits than tried-and-true Microsoft, particularly in a big, conservative organizations.

Monday, May 12, 2008

Riding the Shark

My annoyance at learning that OS/X 10.5 doesn't really support gprof has turned into ecstasy at finding the wholly superior Shark profiler that comes with XCode.

Unlike gprof, Shark doesn't require that you compile with special profiling flags, it can run on unaltered binaries. In fact, Shark doesn't even require that you run it against any binary in particular! You can run it against everything on your system, then view the profile of any process post-facto.

I just did a profile of Mapserver running as a FastCGI process, just by running some load against Mapserver and letting Shark collect statistics on all processes at once. Then I pick the mapserv.fcgi process from the sample data, and voila!

screenshot_03

I can see that the most costly small function is longest_match, from the bottom-up view at the top, and that it is called in the image saving routines, in the top-down view at the bottom. Good news, Mapserver is so efficient that the biggest cost is compressing the output image.

Even cooler, I can flip to chart view and see what the CPUs were doing throughout the sample period. The blue spikes are mapserv.fcgi calls.

screenshot_04

Zoom into one of those, and we can see the CPU ticks through one map draw, including the kernel (the red bit) taking a slice out. End to end, Mapserver is taking about 15ms to draw this particular map.

foo_01

In addition to the "Time Profile" mode I'm showing here, there's also a "Java Time Profile". I wonder if Java developers can make use of this excellent tool too?

FastCGI on OS/X Leopard

A post for posterity.

OK, so you want to run FastCGI on OS/X 10.5, how does that work? If you've just followed the directions and used your usual UNIX skillz, you'll have dead-ended on this odd error:

httpd: Syntax error on line 115 of /private/etc/apache2/httpd.conf: Cannot load /usr/libexec/apache2/mod_fastcgi.so into server: dlopen(/usr/libexec/apache2/mod_fastcgi.so, 10): no suitable image found. Did find:\n\t/usr/libexec/apache2/mod_fastcgi.so: mach-o, but wrong architecture

This is the architecture of your DSO not matching the x86_64 architecture of the build shipped with OS/X. So we must build with the correct flags in place.

Here's the steps from scratch.
curl http://www.fastcgi.com/dist/mod_fastcgi-2.4.6.tar.gz > mod_fastcgi-2.4.6.tar.gz

tar xvfz mod_fastcgi-2.4.6.tar.gz
cd mod_fastcgi-2.4.6
cp Makefile.AP2 Makefile
Now edit Makefile and change top_dir to /usr/share/httpd and add a line CFLAGS=-arch x86_64.
make

sudo cp .libs/mod_fastcgi.so /usr/libexec/apache2
Now edit /private/etc/apache2/httpd.conf and add a line LoadModule fastcgi_module libexec/apache2/mod_fastcgi.so. Run sudo apachectl restart and you are now loaded. You'll need to enable FastCGI for your applications as described in the documentation.
 

Friday, May 02, 2008

Too Big to Explain

I spent the morning yesterday at an Oracle Technical Session, lots of government employees and contractors crammed into a ballroom listening to Oracle reps talk about the latest-and-greatest offerings from the beast.

The best part was, after a one hour presentation on "Oracle Fusion Middleware", by quite a polished speaker, he asks for questions, and someone says:
"Thanks for your presentation, but, I still have no idea what Fusion Middleware does."
Ouch.

Fair comment, too, the presentation was all market-speak, how data was "integrated", decisions "made more quickly", and so on. Clarity is not aided by the fact that "Oracle Fusion Middleware" is itself a suite of a dozen different bits.

To quote Oracle's web site, a "portfolio of customer-proven software that spans from portals and process managers to application infrastructure, developer tools, and business intelligence".

Some cone-head in the Oracle marketing department has decided that all these bits and pieces will be easier to sell if they are all wrapped under one product brand, "Fusion Middleware". But really, pretending it is all one thing has made the product too big to explain.

What does it do? Everything. Nothing. It depends.

It brings to mind The Elephant and the Blind Men.
 

About Me

My Photo
Victoria, British Columbia, Canada

Followers

Blog Archive

Labels