Carp Version 0.2

Hot on the heels of SemPlan RdfLib 0.2 is Carp 0.2, our Mono/.NET RDF API. As I mentioned earlier, we've refactored the two projects and pulled a lot of stuff out of Carp down into RdfLib. This leaves Carp leaner, but still as easy to use. Because of this, if you're using Carp and you want to upgrade RdfLib then you need to upgrade Carp too. Carp is now under the less restrictive MIT license too.

The introduction of non-memory based triple stores in RdfLib has meant that we've had to rethink the way ResourceDescriptions work. There are some (slightly out of date) design notes on the wiki which help describe the problem. The summary is that because each ResourceDescription needs access to the complete subgraph relating to a Resource the old implementation took a copy of the relevant triples. Modifications to the ResourceDescription never affected the underlying KnowledgeBase so was always safe to get a Foaf.Agent, add a weblog and some knows properties and then add it to another KnowledgeBase. You'd never change your original data by manipulating a ResourceDescription. However, when it comes to database backed triple stores, it's dangerous to assume that a ResourceDescription could fit into memory. Therefore we had to devise a new model that preserved the consistency we had before, but didn't require a complete copy of all the data. So now, each ResourceDescription is read-only by default which allows it to read triples on demand from it's underlying triple store without side effects occuring. We call this an "attached" read-only ResourceDescription. You can get a writeable copy of the ResourceDescription by invoking the copy() method - you get a complete copy of the subgraph as before so you'd better be sure you know how much memory you need. This is a "detached" writeable ResourceDescription. Finally, you can specify that you want a writeable object when you query the KnowledgeBase. getDescriptionOf now takes an isWriteable parameter. When you do this you get an "attached" writeable ResourceDescription. Changes to the object will affect the underlying triple store so you need to be careful passing this thing around your application unless you like dealing with non-local side-effects. It's not an ideal solution, but it is a convenient one, in the spirit of Carp.

There have been some other small API changes, mainly because we've clarified the resource/node relationships in RdfLib. There shouldn't be anything that breaks existing code though. Let me know if you have any problems.

The main new feature is full RDFS entailment. This utilises the new query and rule capabilities in RdfLib and is triggered by calling think on a KnowledgeBase. Now your foaf:Persons are foaf:Agents and the rel:fatherOf someone really does foaf:know them too!

Direct downloads: binaries, source, docs, license

SemPlan RdfLib Version 0.2

I've just uploaded version 0.2 of our Mono/.NET RDF library. We've improved just about everything that was included in 0.1 and added lots of new features, laying the groundwork for the future. The most important change is in the licence which is now less restrictive. We've adopted the MIT license which is the same license that the Mono project uses to license their class libraries. Our previous license was BSD based and required an attribution in the documentation for any application using RdfLib - that's all gone now.

Over the last few months we spent a lot of time examining RdfLib and Carp and we've pushed a lot of the useful classes from Carp down into RdfLib. Carp is lighter and RdfLib is more functional. One thing that emerged from Carp's KnowledgeBase class was a TripleStore interface that represents some storage for triples. We've refined this and moved it into the core of RdfLib and it's now responsible for the organisation of any RDF data that is being processed. There are two implementations at the moment: MemoryTripleStore is an in-memory store suitable for small, ad-hoc processing and MySqlTripleStore which will become capable of storing much larger quantities of data for long durations. We've had some ups and downs with MySQL, mainly around the quality of the drivers available for use with Mono. At this stage we consider the MySqlTripleStore to be alpha quality. It's usable but performance is a big issue. One of us will write more on that another time hopefully.

Feature-wise the biggest addition is the query capabilities. We have a pattern-based query implementation including a backtracking query solver that can be applied for any triple store and one optimised for mySQL. Our general principle is to provide default implementations of interfaces that work as efficiently as a general purpose algorithm can, while creating much more performant implementations for specific situations. Unfortunately there are no query language parsers yet, all queries have to be constructed out of objects. We plan to turn our attention to parsers in the next release (see the roadmap). The next exciting addition follows straight on from querying: rule processing. We have implemented a very basic rule processor capable of expressing the RDFS entailment rules. Version 0.2 of Carp uses it for that exact purpose.

There's lots of work yet to be done, but we're having fun, learning a huge amount and hopefully producing some useful software.

Direct downloads: binaries, source, docs, license