This is the first software release for Ripple since its debut at ESWC last June. While the syntax and computational model of of the language have not changed, the implementation contains a lot of new material in its libraries, and also makes better use of Java concurrency, speeding up queries and improving interactivity. Particular new features include:
- Streaming query results. One shortcoming of previous releases was that there was no way to interrupt a query. It was all too easy to find yourself stuck waiting on a program which either would never terminate or was busy churning out far more results than you needed. What’s more, you had no way of seeing what was going on in those situations, because query results were tucked away in a buffer until the program halted. Now, individual query results stream onto your terminal as soon as they’re computed. A double tap to the ESC key tells the query engine that you’ve seen enough.
- Floating point math. Ripple 0.3 was limited to integer arithmetic. Ripple 0.4, on the other hand, has over two dozen math primitives (borrowed entirely from Java), including trig functions and a random number generator, all of which play well with both integer and floating point numbers.
- RDF document primitives. Ripple’s RDF-specific features are largely hidden behind its syntax. RDF documents are requested, parsed and manipulated transparently, as needed to answer queries. That’s as it should be. However, so often do I find myself using document-centric tools in conjunction with Ripple that it’s been very handy to just stick a couple of document-centric primitives in Ripple itself: the graph:triples primitive consumes the URI of a Semantic Web document and produces each of the statements contained in the document, while graph:namespaces produces each of the namespaces defined in the document.
- Literal reification and type-casting primitives. A list of rewiring scenarios by Stefano Mazzocchi inspired a number of primitives for manipulating data types, including graph:toUri which consumes a string literal and produces a URI. Additionally, xsd:type and xml:lang are no longer mere URIs in Ripple: they’re primitive functions. xsd:type gives you the data type of a typed literal, and xml:lang gives you the language tag (if any) of a plain literal.
- Even more new primitives. This release makes most java.lang.String methods available through a new string: library. I’ve thrown in a few new stack: primitives, too, as well as a services: library with hooks into selected Semantic Web services, including Sindice and Swoogle.
- owl:sameAs smushing for backwards compatibility. Ripple’s primitive functions are identified with URIs which are as cool as my domain name (and I think that’s cool enough for alpha software). But what happens when primitives change? Older versions of Ripple will not understand programs which reference newer primitives, and that’s just how it goes. However, new versions of Ripple must be able to understand old programs, which is where owl:sameAs links come in. If a primitive described in a newer namespace is linked through owl:sameAs to a primitive in an older namespace, the application understands them to be the same thing. It makes publishing library descriptions that much easier.
- Extension loader. Previously, if you wanted to add new primitives to Ripple, you had to insert them into Ripple’s own source code and rebuild. Now all you need is a Ripple dependency and a text file called extensions.txt which tells the application what to load when it starts up. To include custom libraries in the query environment, just list them by name.
- Improved crawling. Ripple is now able to handle multiple HTTP connections in parallel, which means dramatically faster crawling. In keeping with crawler etiquette, Ripple maintains a history of HTTP requests as it goes, taking care not to burden any one host with rapid fire requests.
- Miscellaneous: this release has a better ratio of unit tests to core classes than 0.3, as well as an improved launcher script, new command-line options, and a context-preserving TriG cache.
Finally, you might notice a side-project called the “Ripple media extension” alongside Ripple proper on the downloads page. It includes some new functionality which doesn’t necessarily belong in a command-line tool, but which I find interesting:
- media:play — plays an audio (for now: MIDI) file
- media:show — displays an image
- media:speak — speaks a passage of text in the default FreeTTS voice
I expect this to grow into something of an experiment in visual and spoken Semantic Web UI.