Sunday, May 14, 2006

Loose coupling and services oriented architecture

About 8 years ago I tried to sell the development organization I worked for on the term "loose coupling" as a way to build systems. I wasn't the only one back then, the term was floating around. The concept is as old as time, certainly older than software. I wasn't aware it was being used as long ago as 2003 to describe services oriented software design, until an Aufflick pos sent me to an older O'Reily article:
webservices.xml.com: What Is Service-Oriented Architecture

... Now we are able to define a Service Oriented Architecture (SOA). SOA is an architectural style whose goal is to achieve loose coupling among interacting software agents. A service is a unit of work done by a service provider to achieve desired end results for a service consumer. Both provider and consumer are roles played by software agents on behalf of their owners...

... How does SOA achieve loose coupling among interacting software agents? It does so by employing two architectural constraints:

1. A small set of simple and ubiquitous interfaces to all participating software agents. Only generic semantics are encoded at the interfaces. The interfaces should be universally available for all providers and consumers.

2. Descriptive messages constrained by an extensible schema delivered through the interfaces. No, or only minimal, system behavior is prescribed by messages. A schema limits the vocabulary and structure of messages. An extensible schema allows new versions of services to be introduced without breaking existing services...
Those of us from the medical ontology (SNOMED) and messaging (HL-7 RIM) know deeply what this means. Saying "schema limits the vocabulary and structure of messages" is a bit akin to the famous processing step of "... and then a miracle occurs". Said schema, if implemented, will end up setting in stone the fundamental data model buried within the service. That lesson still lies ahead ...

XP on Mac: how do you backup?

The Apple (OS X) Boot Camp FAQ advises backing up prior to installing Boot Camp. Ok, but what about afterwords? How do I backup both my OS X work and my PC work? I don't have an Intel Mac yet, so the question is somewhat academic for me, but it bothers me that this FAQ doesn't mention it. If the XP partition is visible to OS X, and if it's FAT-32 formatted, then I'd guess that Mac backup software might work ...

The problem may be even greater for virtualization solutions. If XP is a disk image to the Mac, then a single changed byte in the XP world might mean doing a 200GB (for example) backup ...

There's no Apple in AAC - correcting the world

I knew AAC was not proprietary to Apple and that FairPlay is Apple's DRM technology -- but I thought the first letter in AAC was short for Apple. Wrong.

This MacWorld article is an excellent corrective.
Macworld: Editors' Notes: As the tech world spins...

... AAC (a.k.a., Advanced Audio Coding, MPEG-2 Part 7, or MPEG-4 Part 3) is an industry-standard audio compression/encoding technology developed in cooperation by AT&T, Dolby, Fraunhofer, Nokia, and Sony. Notice who isn’t in that list: Apple. Also notice who is in that list: Sony.

... Sony has actually supported AAC for some time. Sony Ericsson mobile phones have supported AAC playback for at least a year or two, and Sony’s PlayStation Portable has supported AAC since a software update in July 2005.

... iTunes Music Store tracks aren’t standard AAC files; they include Apple’s FairPlay DRM technology to restrict playback to iPods and a limited number of computers running iTunes, and Apple hasn’t licensed FairPlay...

Excel tip: Show formulas with a keystroke - Download Squad

Ctrl-` shows all the formulas. Thanks Download Squad.

Gmail replacing Mail.app and other thick clients

The link for this post isn't completely relevant too the post, but it's the 3rd blog this morning that mentions abandoning thick email clients for Gmail. I figured I might as well mention what I do.

I read my personal email on a bunch of machines, some running XP, some OS X. Like the bloggers I read this morning I switched some months ago to using Gmail as my primary mail client.

The usual practice is to use Gmail's POP support to pull older email to a thick client periodically. That way one retains ownership of data, but I believe this also deletes the messages from Gmail. I like having my searchable archive there, where the NSA can read it most readily.

I fork my email streams instead. All my mail eventually redirects to a domain I control, it sends one stream to Gmail and one to my ISPs POP server. This does mean I need to see spam twice, but that's how I periodically discover that Gmail is sending valid email to their spam folder. (In contrast my ISP's spam filters are now excellent, I really don't get all that much spam through that route.)

Bottom line -- Gmail is really good. Other than search, it's Google's hit product.

Saturday, May 13, 2006

Merging iPhoto Libraries

Apple's iPhoto does not support merging iPhoto Libraries. Apple's solution is that you should buy Aperture 1.11 and import the iPhoto Libraries into Aperture. Fair enough, and I might do that -- after 6 versions of iPhoto Library management is obviously not a priority for Apple.

Over the years I've tried and documented several hacks. None are adequate. I tried a merge with iPhoto Library Manager a while back and got some bad results, but I'm giving it another go with the latet release. IPLM has to install an evil InputManager/iPhoto Plug-In to make this work, so it's a non-trivial task. (InputManagers are the TSR*s of OS X.)

I'm only in test mode. I've copied Libraries of a few thousand images to an external drive and I'm merging them and testing. It will be a while before I merge for real -- I might buy Aperture first. So far, when merging iPhoto 6.02 Libraries, it's working better than before. A few notes:
1. It doesn't import Books, Calendars, Slideshows, etc. Those are lost. Same problem with Aperture. You can print Books and Calendars to PDF as an archival approach.
2. It changes smart albums to regular albums on import. Not a bad idea.
3. It does handle keywords, it will merge those that match. Keywords are royally messed up using older techniques.
4. You can either merge Albums of the same name or create new ones. I create new ones.
5. If there's an Original and Edited non-RAW image it imports both. (Not sure about RAW though, that's handled differently.)
6. Folders aren't copied, you just get the albums.
7. Rolls are preserved and roll names and comments are imported on merge.
8. Albums are preserved as are titles and comments on images.
9. My iMac is really working to get this done, fans going full blast. Good workout! I let it run overnight.
10. I've set the option to quit and restart iPhoto every 20 rolls. I don't trust that thing.
More testing to come, I'll update this post.
* Wow, I'm old. Wikipedia doesn't even define what a TSR is. "Terminate and Stay Resident" assembler programs were MS/PC-DOS hacks that allowed things like the original Sidekick (not a piece of hardware) to work. They were notorious for causing crashes.