.. Does Work Like You Think It Does In (Some) URIs

Paul Brown @ 2007-06-17T18:09:00Z

I recently came across a WSDL import statement of the following form:

<wsdl:import namespace="some://uri"
             location="../a/relative/path.wsdl" />

My first thought was that this is wrong, but I found out that it is actually standard behavior according to RFC 2396:

Within a relative-path reference, the complete path segments "." and ".." have special meanings: "the current hierarchy level" and "the level above this hierarchy level", respectively. Although this is very similar to their use within Unix-based filesystems to indicate directory levels, these path components are only considered special when resolving a relative-path reference to its absolute form (Section 5.2).

The RFC also specifies a sensible set of fallbacks for determining the base URI, rendered in ASCII art:

.----------------------------------------------------------.
|  .----------------------------------------------------.  |
|  |  .----------------------------------------------.  |  |
|  |  |  .----------------------------------------.  |  |  |
|  |  |  |  .----------------------------------.  |  |  |  |
|  |  |  |  |       <relative_reference>       |  |  |  |  |
|  |  |  |  `----------------------------------'  |  |  |  |
|  |  |  | (5.1.1) Base URI embedded in the       |  |  |  |
|  |  |  |         document's content             |  |  |  |
|  |  |  `----------------------------------------'  |  |  |
|  |  | (5.1.2) Base URI of the encapsulating entity |  |  |
|  |  |         (message, document, or none).        |  |  |
|  |  `----------------------------------------------'  |  |
|  | (5.1.3) URI used to retrieve the entity            |  |
|  `----------------------------------------------------'  |
| (5.1.4) Default Base URI is application-dependent        |
`----------------------------------------------------------'

Nonetheless, this can still be a bit confusing. In this case, the WSDL that I was looking at was in a source code download, and the referenced resources were not. The best practice should be to specify an xml:base in every WSDL document that uses a relative wsdl:import location. (The WS-I Basic Profile doesn't say anything about relative wsdl:import locations.)

(comment bubbles) 0 comments

First Pet Food, and Now Thomas?

Paul Brown @ 2007-06-14T05:07:00Z

Just saw this over on Thingamababy:

RC2 Corp. Recalls Various Thomas & Friends™ Wooden Railway Toys Due to Lead Poisoning Hazard [...] Manufactured in: China [...]

While this is not necessarily an example of the same kind of wanton (wonton?) disregard for health and well-being as melamine in pet food and the ensuing food safety debacle, there won't be any more Chinese-made toys (or food or anything else) in our house until we've got a good reason to believe that their safety standards are significantly higher. As I understand it, lead paint dust is the major hazard as opposed to skin contact with intact lead paint, so the kid probably consumed very little if any lead playing with the toy trains. But that's not the point.

This is a failure on the part of the distributor to properly monitor and police their suppliers — someone at some level at some point knew better. Class action anyone?

(comment bubbles) 0 comments

No iPhone for Me

Paul Brown @ 2007-06-13T14:55:40Z

My cellular service contract was coming up for renewal this month, and I'd been thinking about buying an iPhone as an experiment. After thinking it over and without waiting for WWDC to happen, I bought a BlackBerry 8800 instead, and this fragment from the WWDC "Jobsnote" transcript (gone missing, so no link) on MacRumors explains my reasoning perfectly:

11:22 am, Head of Apple iPhone software had some trouble typing with the iPhone on-screen keyboard.

With all of the various mobile devices and phones that I've used (since the Newton was unable to decipher my handwriting), I've never thought that the UI wasn't pretty enough or "If only I could watch a tiny movie right now..." I've always hated the user interface and data synchronization experience.

So far, I'm pleased as punch with the Blackberry. The QWERTY-esqe (QWERTY for letters, modifier keys for numbers and symbols) keyboard and scroll nub is the only usable user interface that I've ever used, and that includes touch screen keyboards accessed with a stylus on PDA devices. The application stack is also a win for me, since there's direct support for GMail, Google Talk, Google Maps (the 8800 has GPS functionality), and the combination of Missing Sync and Spanning Sync synchronizes the Blackberry's calendar with my Google Calendar with my iCal on my various Macs. (I opted for Missing Sync over PocketMac after talking with some other Blackberry/Mac users about their synchronization experiences.)

The one open item is whether and how to push my open items from Remember The Milk, since the mobile interface isn't that usable (IMHO), but I'll probably use the offline support via Google Gears to just leave that laptop-only functionality.

All of the various user interfaces (web, mobile, console) for the different components and the multi-hop synchronization will make an interesting case study in whether this works well from a user perspective.

(comment bubbles) 2 comments

Maybe Double-Pane Windows...

Paul Brown @ 2007-06-10T02:32:34Z

A consulting customer of mine who deploys Java apps on Windows had an issue with an otherwise well-behaved system that was suddenly thrashing. A quick glance at the virtual sizes of various processes showed an instance of winlogon that had sucked up over 2GB of memory was the culprit, and the underlying reason was amusing:

[...] If you do not log on the computer, a system memory leak may occur. Over time, the operating system may leak memory in the Winlogon.exe process at a rate of approximately 1 to 2 megabytes (MB) an hour. [...]

At that rate, ~2GB of leakage meant that the system had been up for between one and three months, which is not so good.

But then maybe it's not really so bad, either. My choice of a deployment platform would be different (Solaris or Linux), but that's more out of familiarity and personal experience than any hard data. Realistically, rebooting once a month shouldn't be a big deal. A reboot is a dry run for a recovery scenario, so bringing a machine down and back up should be routine. In an N+1 configuration, a rolling reboot shouldn't impact the customer, either.

In any case, I don't think that Windows Server 2003 was designed with recovery-oriented computing as one of the guiding principles.

(comment bubbles) 0 comments

Know Thy Database

Paul Brown @ 2007-06-06T19:52:00Z

I sometimes get to thinking that from the Java side of a layer like Hibernate or OpenJPA a database is just a database, but that's never quite true. One example is date/time granularity. The SQL standard specifies that TIME or TIMESTAMP datatypes can support fractional seconds but doesn't require it, and different databases do different things. For example, MySQL drops the fractional component of seconds altogether, while SQLServer rounds to the nearest 333rd of a second ("increments of .000, .003, or .007 seconds").

The SQLServer behavior manifested itself as a Heisenbug in a lightweight database-backed caching algorithm. An update timestamp was maintained by the application in the form of a Java java.util.Date, which has millisecond precision. The update timestamp was passed to newly created or updated objects and then round-tripped to a SQLServer instance in the course of an update pass, and the cache was throwing out all entries about one-third of the time because rounding of the round-tripped value made the entries look old to a numeric comparison of the long within the java.util.Date. Adding a second to the object timestamp before comparing solves the issue.

(comment bubbles) 0 comments

Devil's Definition of Heisenbug

Paul Brown @ 2007-06-01T04:47:00Z

Another entry for my personal Devil's Dictionary:

heisenbug, n. A error in a software system that can only be observed in the absence of detailed logging and/or a debugger.

For what it's worth, there are situations where heisenbugs do exist, e.g., toString() implementations with side-effects that are called in logging statements and other such pathological silliness.

(comment bubbles) 0 comments

Delete Me

Paul Brown @ 2007-06-01T01:55:00Z

Earlier in the week, I received an email from Ancestry.com informing me of how to change my password. This was of interest, since I'd never signed up on their site or even heard of them, and the company at least looks reputable enough that I doubt that they're artificially boosting their membership stats by shanghaiing people with guessable gmail addresses.

I poked around enough to find out how to turn off their marketing spam, but what I really want is a way to say "delete me" — remove any and all records of my personal information (including otherwise innocuous information like name and email address). Every app should have that functionality, but very few do.

(comment bubbles) 0 comments

All Posts contains 397 items in 57 pages of 7 items each:
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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57