The problem with standards

Standardised formats are essential to connections in the digital society. On the hardware side, USB is so ubiquitous and well defined that I can connect essentially any peripheral to any PC. In many cases I can even expect them to work without drivers. For sound, the 3.5 mm headphone plug has been ubiquitous as long as I can remember. For video, there is VGA, DVI, and so on. Even if some of these change every now and then, we can always buy converters to convert from one format to another. The changes happen infrequently enough that this is a bearable burden.

On the software side, from a user perspective, it gets tougher. In terms of document formats, everybody is expected to have a web browser, to be able to read PDF documents, and to play MP3 files. There’s also a certain expectation that people can read and edit Microsoft Office documents, but in general, unless people have Microsoft Office itself, they are likely to use some program that does an imperfect job of converting to and from the office formats. More exotic formats people do not expect to share unless they know that the receiver has the same software.

One of the worst situations (and maybe one of the sources of these troubles) is software architecture. To look at just one subset of this universe, let’s consider some popular Java frameworks. There are many Java frameworks. I can think of Struts, Spring, Enterprise JavaBeans, Tomcat, JBoss, Websphere, OSGI. Each one is trying to be a universal, or near universal, component based framework for large scale Java applications. (Some of these are intended specifically for web applications, but the distinction is a bit arbitrary these days). Each one defines a particular behaviour and API that its users need to fit into.

One problem is that once you’ve developed your application in one of these frameworks, it’s tough to move to a different one. At best it’s “just” a matter of using a different API. At worst, the new framework has different expectations of component behaviour and forces you to either refactor your old application majorly or write lots of adapters.

Software has this particular kind of stickiness: objects designed in one context tend to be difficult or impossible to move to other contexts. Here are some problems brought about by this fact:

  • Across several different devices and services, I have many different lists of my various contacts. For instance, I have an address book on my computer, which fortunately is shared with my iPhone. However, there’s also a list that Gmail maintains, one list on MSN messenger, one on ICQ, one on Facebook, one on the Playstation Network… etc. In a world with perfect software, I would have a single contact list that could be updated and accessed from any of these services (and I would still be able to selectively hide things from any one service, if I wanted to).
  • Most social networks support some kind of status update feature (Twitter, Facebook, …) but they generally can’t share this information with each other. There’s a tool called ping.fm which is able to update lots of networks at once, but this is just for a single feature. And it took a third party tool to do it. And I have to give it all of my logins and passwords.
  • The health care systems in many countries are a mess (UK’s NHS and probably most US systems fall in this category). Different medical offices in different medical IT systems establish different journals, but they have no way of sharing the journal if the patient wants to use a different care provider. As experiences in the UK showed, achieving the ability to share these records can be very difficult sometimes.

So how can we design really future proof standards? Here are my intuitive, unqualified answers:

Favor openness over closedness. Allow unknown entities to enter your protocol at many different stages and in many different roles. Even if you don’t design for this, it will tend to happen. Better to design for it.

Allow extensibility in many directions. Frameworks often allow you to make more specific versions of their components, but it’s rare that you can generalize or inject behaviour at a middle level of a concept hierarchy.

Use semantic metadata. Ontologies are under heavy research in computer science. They are formal classifications of concepts and their relations. One popular format for developing ontologies is RDF(S); for an example of what the concepts can look like, check this RDF(s) directory. I will have reason to come back to this topic in the future.

One example of a brilliant long-lasting standard: TCP/IP. Somehow in this case, the designers got something miraculously right at the first try. I’m amazed at how we keep building on this standard every day.

Two new-ish search engines

Recently, while reading about methods for manipulating RDF, I discovered the search engine PowerSet. More recently, Wolfram Research’s Wolfram Alpha launched. There’s been no shortage of new search engines in the past year or so – Cuil is one that was much publicized but ended up remarkably useless – but these two still impress me.

PowerSet impresses me because of its interface – I can easily see what a particular match is about without leaving the list of search results. Speeding up the typical use cases like this is very important for usability.

Wolfram Alpha impresses me because of the quality of the results. Maybe I’m in the minority thinking this – the press seems to have been giving it mostly negative reviews. Clearly WA is not intended as a Google replacement, but perhaps it was described as being one at some point. Today, being available to the public, it’s something different. It lets me look at data, mostly of the quantitative sort, and make all sorts of semi-interactive charts and comparisons. Here are some searches I liked: earthquakes in Japan, 1 cup of coffee, Tokyo to Osaka. I especially like the interactive earthquake graph.

WA is not without its problems though. Sometimes it’s hard to figure out what kind of queries you can make. I found the above mostly by experimentation. If they exposed more details about their data model and what they knew about each kind of object, maybe this would be easier. Right now I’m wondering why I can do a query like “largest cities” but not “largest cities in mexico”, for instance. I suppose this is mainly a question of maturity both on behalf of the system and of its users, though.

Search engines like PowerSet and WA are indicative of a broader trend towards semantics in computing and internet usage. While the semantic web isn’t here yet in the sense that we don’t have a semantic web browser or a unified way of querying the internet, clearly services that are based very heavily on semantic models are becoming mainstream. More on the impact of this in a future post.

Research idea: a snapshot

As part of an application form I had to fill out recently, I had to write a summary of my research ideas. Of course this changes all the time, since I’m still searching for a precise topic (and probably will be for a long time). But this is what a snapshot of those thoughts, taken now, looks like:

One of the most important problems in software engineering is reducing the impact of change. To this end, recently methods such as inversion of control (dependency injection) have become popular, in order to reduce the coupling to concrete interfaces. However, even with these schemes, there is still a dependency on specific names and abstract interfaces.  My project aims to investigate the possible use of semantic methods to address this problem. In essence, I want to allow developers to use semantic interfaces rather than syntactic ones to describe and access their components. 

Specifically, I am investigating techniques commonly used in the context of Semantic Web Services, such as ontologies and semantic/syntactic mediation, and their applicability to this problem. 

We may regard services as being somewhat large scale components. However, I am interested in applying these methods not just for large scale services distributed across the web, but also for small and numerous software components running in a single process. In such a setting, performance and scalability are important issues to investigate, in addition to the usual problems of reliability, correctness of composition, etc.

Realtime disease tracking

I just found out about BioCaster, a tool made by people at my institute. It tracks news in real time and lets you view the spread of diseases geographically.

I’ve seen similar services before (related to swine flu, etc), but this one lets you break down the data by disease and even by symptoms.

Asahi Shinbun mentions it in an article (Japanese).

Exploring Scala

I’ve started experimenting with the programming language Scala. I’ve been wanting to get back into functional programming for some time, but I’ve found it impractical for the time being to dive right into something like ML, Haskell or Scheme. Scala has gained notoriety since Twitter announced that they’ve rewritten their engine in it. Some of its benefits are:

  • Mixes multiple paradigms, including imperative, functional and actor programming
  • Runs on the Java VM – interop with Java libraries and frameworks is trivial
  • Lightweight syntax

There is much to like in this. I’m hoping that it will turn out to be useful as a rapid prototyping language for trying things out, especially since so many third party tools are available in Java world.

For now I am using exercises from Project Euler as a means to experiment with and learn it. This works surprisingly well.

Also see this list of the most popular programming languages – Scala is now number 27, ahead of Prolog, Erlang, Haskell and ML.