Some smart people pointed me at this Rio thing, and the fifty-thousand foot view makes it sound like about what I need. So I signed up over at Jini.org and downloaded Rio 3.1 and started studying it. Wow.
Being detail-oriented and very bad at abstraction, I naturally started by looking for the “Hello World” example. Even though it’s on the front page of the doc suite, I didn’t think to glance down under the “Javadocs” heading and see a link labeled “Examples” until I’d spent quite a bit of time crawling through a maze of twisty Rio passages, all different.
Hmm, the Rio “Hello World” requires one interface and six classes:
HelloEvent, HelloEventConsumer, HelloImpl, HelloProxy, HelloUI, and
LogFormatter; 625 lines of Java in all.
I have long been a firm believer in Larry Wall’s dictum: “Easy things should be easy, hard things should be possible.” Either these people disagree, or Rio isn’t about doing anything that’s easy.
Editing Required · While I’m in griping mode, someone needs to apply a ruthless editorial blue pencil to the Rio overview docs. While I was thrashing around looking for that “Hello World”, I discovered that the FAQ contains questions frequently asked by people who already understand what Rio does and the “Getting Started” doc contains no information for the programmer.
The “Overview” document is both wonderful and terrible. Terrible, because its first section is advertising (OK, I’ve done that myself), and the next section contains one of those dreaded stacked-block architecture diagrams with labels like “Web” and “Substrates” and “Federation” that convey exactly no useful information to someone who doesn’t already know what those words mean on Planet Rio.
The next section, entitled “Dynamic Allocation” actually starts to talk about what Rio does, albeit with some pretty heavy arm-waving. But it does divulge that the low-level functions are built around something called an “OperationalString”. And what’s one of those? It says it’s an “architectural meta-model”. Pardon me for being technically illiterate, but what’s one of those?
Anyhow, at this point I deduce that the next step is to figure out these OperationalString thingies, and hey, there’s a whole section of the docs labeled “Rio Operational String”. Good news; the first sections of the OperationalString docs are written in language I can understand; it seems that they describe the services you’re going to offer, and the section describes some of the good effects that can be achieved.
Then we come to this: “In configuration, an Operational String can be articulated as an XML document.” Suddenly I’m getting a warm glow; this seems like a declarative kind of thing so XML might make sense. Only... what does “In configuration” mean? And what does it mean to “articulate” something as an XML document? I mean, I can parse the sentence, but those words aren’t being used in the way I’m used to. I think they’re saying “An OperationalString is an XML document” or maybe “An OperationalString can be persisted as an XML document”. What do you think?
Stop the presses! The next paragraph starts “First an example.” and my straying eyes see some XML tags a little further down, and dammit, I do know how to read XML tags.
Scrumptious Taggy Goodness ·
So I’m looking at the XML and all of a sudden all sorts of things make
sense; there are elements called <Codebase> and
<JAR> and <Interface> and
<ImplementationClass> and so on, I’m starting to get the
picture.
But it gets better; each tag is a hyperlink to the discussion of that element; this is almost like reading Javadocs. I follow a couple and am pleased to find that for each element, they give a little chunk of DTD declaration. Kind of quaint, these days, but highly interoperable, easy to understand, and it tells you what you need to know about the syntax. Good stuff.
The Story Thus Far · Rob Gingell once said “Those who do not use Jini are doomed to re-invent it” and I’ve invented a few things and it’s hard work, best avoided. So I’m going to give this thing a real try because it’s supposed to do what I think I want to do. It really doesn’t seem to me that it should be this hard to understand. Really. Quite likely I’m missing something. Stay tuned.