Wolf in Sheep's Clothings (Part III)
The Python client shipped with the distribution is using it, so I wondered how this would pan out in Perl. Pan out on CPAN, so to say. Last weekend I did some tinkering and concocted a first, naive Perl client.
The Commodity Interface
Rather than simply exposing the Sesame-ness to the programmer, on the surface I wanted to have things look mega-trivial:
my $model = $storage->model (
mode => O_CREAT);
my @tuples = $model->sparql ('SELECT ...');
The plan is that at that level all methods should allow a wide range of parameters. One example is add:
Here obviously N3 is parsed. And several of these strings can be passed in. But also this works:
and that too:
Depending on the data, the client will choose different ways to communicate with the AllegroGraph backend.
Underneath I started to capture the most important AllegroGraph concepts: catalog, repository, server. In that I have not spent any thought yet on speed, size limits and other profane things. So beware if you load DBpedia.
Much functionality is missing, such as named graphs, indexing, all the full-text stuff and, of course, the geospatial types. I'll concentrate on that in another iteration.
Any thoughts (or help) is appreciated.