PHP APIs for RDF

Events happening in the community are now at Drupal community events on www.drupal.org.
dorgon's picture

Hi there,

I'd like to start a thread to discuss about available RDF APIs for PHP.

I took a look at Benjamin Nowack's ARC2 (http://arc.semsol.org). It looks sound and it's already used in several projects. It features several i/o parsers/serializers, an integrated RDF store, SPARQL query engine (didn't read anything about compliance with W3C DAWG test cases...), SPARQL endpoint, some simple inferencing and there are also some plugins I didn't look at for now.

Then there is also RDF API for PHP, shortly RAP (by Chris Bizer: http://www4.wiwiss.fu-berlin.de/bizer/rdfapi/), which is basically very similar to Jena (HP Labs, jena.sf.net). Because of the alignment with the popular Jena API I like it very much. Among usually required i/o parsers/serializers it has also an integrated RDF store (quads), SPARQL query engine, SPARQL endpoint support, RDFS and partly OWL inference, and a graphical GUI for managment of RDF store.

What I like at RAP is the ontology API. If you've ever worked with Jena, you are quickly familiar with it.

Conclusion:
if you are working with RDF triples and don't need any higher-level ontology API, ARC2 is great. Maybe it's also faster or requires less of RAM, I don't know. On the other hand, RAP is more evolved as far as I can say after this first look-at.

Any comments?
Any other APIs you know of?
Please share with us!

Andy

Comments

ARC2 extractors

dorgon's picture

a cool feature of ARC I've forgotten to highlight is the already available RDF extraction for DC in HTML, eRDF, microformats, RDFa and OpenID!
This allows you to grab RDF from traditional HTML pages without any extra coding.

So, for sure any library has it's pros and cons. What makes me a bit worrying is the proprietary backends. Because the RDF store is the heart of any SW application, it's not easily possible to use several different libraries when they implement proprietary RDF stores. At least not if you don't want or cannot keep or process all in memory. Maybe the recently formed RDB2RDF incubator group @W3C (http://www.w3.org/2005/Incubator/rdb2rdf/) will come up with some standard here.

Regards
Andy

there isn't much choice when

scor's picture

there isn't much choice when it comes to RDF stores in PHP. RAP and ARC are the only 2 options available. RAP is feature-rich and mature (2002). ARC2 aims at being faster and lightweight. It has a growing community and has been very active during the past months.
There is also Redland which provides PHP bindings but no store as such.

W3C DAWG SPARQL Implementation report

scor's picture

see http://www.w3.org/2001/sw/DataAccess/impl-report-ql.html for more detailed results on SPARQL implementation in ARC, RAP and others. (Note that RAP didn't implement the whole test suite, so it's actually better than it looks). While ARC is not 100% compliant, Benjamin is still working on improving it.

more current implementation report

dorgon's picture

hi,

just wanted to point you to http://www.w3.org/2001/sw/DataAccess/tests/implementations.html which is a more current version. Algae2 is better now and Virtuoso is listed.

Regards
Andy

OntoWiki also includes an RDF-API

soeren-gdo's picture

OntoWiki [1] includes an RDF API called Erfurt (API doc available at [2]), which is originally based on RAP, but meanwhile contains many improvements and new features (such as an comprehensive extension and event based plugin system and support for access controll), OntoWiki also contains a semantic UI widget set and an RDF API implemented in JavaScript to allow AJAX based semantics enabled user interfaces. OntoWiki is currently under heavy development and we will start a €1M EU funded R&D project in summer, which is solely devoted to extending and enhancing OntoWiki, Erfurt etc. The next OntoWiki release is planned for April (major improvements of the last months are currently only available by SVN).

Please note that the W3C DAWG SPARQL Implementation report is completely outdated reagrding RAP, since we completely reimplemented SPARQL support in the last year, which performs comparable to Triple stores (as Sesame and Virtuoso) and passes almost all test cases - please have a look at the thesis of my student Christian Weiske [3] in this regard.

[1] http://OntoWiki.net
[2] http://docs.ontowiki.net/erfurt/doc/
[3] http://cweiske.de/diplomarbeit.htm

Hi Soeren, are you planning

scor's picture

Hi Soeren,

are you planning to contribute back these improvements to RAP? Is Erfurt or the improved version of RAP usable outside OntoWiki as RDF API?

Partially

soeren-gdo's picture

We were porting back and integrating some functionality such as the new SPARQL engine implementation. Other features, however, such as the plugin infrastructure, access control etc. would be to severe, so that we decided to maintain our own RDF/RDF-Schema/OWL framework. Of course Erfurt is 100% usable without the OntoWiki frontend.

As I described earlier this will be advanced significantly in the next years, since we were able to acquire funds for the continuous development. For technical details please contact the OntoWiki/Erfurt developers on the OntoWiki mailinglist.

Semantic Web

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: