Ce diaporama a bien été signalé.
Le téléchargement de votre SlideShare est en cours. ×

Modern PHP RDF toolkits: a comparative study

Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité

Consultez-les par la suite

1 sur 6 Publicité

Modern PHP RDF toolkits: a comparative study

Télécharger pour lire hors ligne

This work presents a comparative study on the RDF processing APIs implemented in PHP. We took into consideration dif erent
criteria including, but not limited to: the solution for storing RDF statements, the support for SPARQL queries, performance, interoperability,
and implementation maturity.

This work presents a comparative study on the RDF processing APIs implemented in PHP. We took into consideration dif erent
criteria including, but not limited to: the solution for storing RDF statements, the support for SPARQL queries, performance, interoperability,
and implementation maturity.

Publicité
Publicité

Plus De Contenu Connexe

Diaporamas pour vous (18)

Similaire à Modern PHP RDF toolkits: a comparative study (20)

Publicité
Publicité

Modern PHP RDF toolkits: a comparative study

  1. 1. Modern PHP RDF toolkits: a comparative study Marius-Gabriel Butuc Alexandru Ioan Cuza University, Department of Computer Science, Iasi, Romania , mbutuc@info.uaic.ro http://www.infoiasi.ro/ Abstract. This work presents a comparative study on the RDF pro- cessing APIs implemented in PHP. We took into consideration different criteria including, but not limited to: the solution for storing RDF state- ments, the support for SPARQL queries, performance, interoperability, and implementation maturity. Key words: API, PHP, RDF, SPARQL. 1 Introduction Today, we can find a myriad of Web applications that can be considered in- telligent, accomplishing the visionary ideas that were once considered ahead of one’s time. Since we are relaxing more and more the constraint of physicality of information, we now take the challenge of finding the ultimate way of exchang- ing information. Following this path, the Semantic Web development aims at defining the meaning of information and services on the Web, allowing enhanced information discovery, data integration and the automation of a variety of tasks. At the core of the Semantic Web we find the Resource Description Framework (RDF) and all the specifications and tools that provide solutions for structuring and semantically describing data. For the rest of this paper, we will compare the current solutions addressing these perspectives. We will start by discussing the architecture of a Semantic Web application in Section 2, briefly browse the history of the PHP toolkits developed so far in Section 3 and continue by comparing the two main pure- PHP RDF application programming interfaces (API) today. 2 Architecture of a Semantic Web Application RDF allows us to model information as statements–sets of triples which can be exchanged over the Web. Believing that a connected Web is a smarter Web, the Semantic Web goal goes far beyond building a web of machine-processable data, aiming at enriching lives through access to information [1]. Given this goal, many companies began developing components of Semantic Web applications both as
  2. 2. free software and commercial. The main components that embody a Semantic Web deployment [2] are: – RDF Parser: a system component that reads and interprets the statements from RDF files. A RDF parser can understand one or more serialization formats (e.g., RDF/XML, N3, Turtle, N-Triples etc.). – RDF Serializer: the component that writes the triples to file in one of the several serialization formats. – Scraper: an instrument for extracting structured information from websites. – Converter: an instrument for transforming data from one form (e.g., rela- tional databases) into RDF. – RDF Store: a purpose-built database optimized for the storage and retrieval of triples. It is also called a triplestore and one of its main operations is to merge RDF stores. – RDF Query Engine: brings the ability to retrieve information from the triplestore using a query language, habitually SPARQL. – Inference Engine: frequently integrated with the query engine, it performs inferences according to given inferencing rules. – Application Interface: uses the data from the triplestore in the interaction with users. The relation between these components is depicted in Fig. 1 Fig. 1. The relation between Semantic Web application components [2] 3 Brief History of PHP RDF Toolkits Given the new technologies, two complementary perspectives [3] arose: 1. How can PHP developers benefit from the Semantic Web (technologies)? 2. How can Semantic Web projects benefit from PHP (developers)? Facing this challenge, several new projects emerged developing from the PHP version of Repat RDF parser [4] to battle tested Drupal components and even full blown APIs like ARC and RAP. As we can see in Fig. 2, only some of them
  3. 3. Fig. 2. Searching for modern pure-PHP RDF APIs. survived [5], while there are still parts of the Semantic Web big picture that are not within reach for PHP developers (e.g., Description Logic reasoners). For the rest of this work we only focus only on ARC RDF Classes for PHP [6] and RAP: RDF API for PHP [7] because those APIs provide most of the com- ponents of a Semantic Web application, as detailed in Fig. 3. Fig. 3. Components implemented in both Semantic Web APIs
  4. 4. 4 ARC vs. RAP RAP is a Semantic Web toolkit for PHP developers. RAP started as an open source project at the Freie Universit¨t Berlin in 2002 and has been extended a with internal and external code contributions since then. The motivation behind ARC [3] was the need for a set of tools that are easy to combine with existing software, in contrast with contemporary toolkits that had non-standard extensions. There was a need for supporting the already existing Web 2.0 data formats (e.g., microformats, JSON, Atom, RSS2), for a toolkit that was light-weight and optimized for PHP. Thereby, ARC uses object- oriented code for its components and methods, but the processed data structures consist of simple associative arrays, which leads to faster operations and less memory consumption. Also, as of June 2008, ARC’s structures are aligned with the Talis platform. 4.1 API-Paradigm Both solutions offer Statement-centric and Resource-centric APIs, but RAP goes one level further, offering an Ontology-centric API in extension to the Resource- centric one. 4.2 RDF Parser/Serializer RAP supports RDF/XML, N-Triples, N3, TriX, GRDDL and RSS/ATOM, while ARC has both generic and specific parsers for RDF/XML, Turtle, N-Triples, RSS 2.0, SPOG or HTML and can only serialize in RDF/XML, RDF/JSON, Turtle and N-Triples. 4.3 Triplestore and Query Engine Both toolkits offer in-memory and database storage. While ARC only supports MySQL as RDBMS, RAP supports any ADOdb compliant databases (30+). Even if both solutions support SPARQL, here ARC takes the lead, supporting SPARQL+ which is a subset of the SPARQL Update [8]. A protocol-compliant endpoint class which can be used for HTTP-based data access as well as a client for remote SPARQL endpoints is delivered by both APIs. 4.4 Licence Both toolkits are Free Open Source Software, RAP being distributed under LGPL and ARC under GPL + W3C Licence.
  5. 5. 5 Conclusions We can use both APIs servers running PHP5 as well as PHP4, but after test- ing, the ARC toolkit proves to be more focused on core tasks (e.g., parsing RDF/XML) thus providing better performance. Still, this performance comes to the cost of lacking functionality, especially compared to RAP which delivers from the essential reasoning support (e.g., RDFS and some OWL Rules) till a GUI for managing database-backed RDF models, or a graph visualization mod- ule, and an in-depth documentation for all features. While RAP stagnates at version 0.9.6 since February 2006, ARC enjoy a more effervescent development and community, the latest ARC2 release dating November 2009. As a bottom line, it’s best to master them both and to use one or the other depending on your projects requirements. References 1. Davis, I.: If you love something... set it free. http://slidesha.re/haCax (2009) at Code4Lib. 2. Allemang, D., Hendler, J.: Semantic Web for the Working Ontologist: Effective Modeling in RDFS and OWL. Morgan Kaufmann (2008) 3. Nowack, B.: RDF and SPARQL for PHP Developers. http://slidesha.re/eHQtN (2009) at New York Semantic Web Meetup. 4. ***: PHP XML Classes. http://phpxmlclasses.sourceforge.net/ (July 2002) 5. Bergman, M.: Sweet Tools (Sem Web). http://www.mkbergman.com/new-version-sweet-tools-sem-web/ (2009) 6. ***: Easy RDF and SPARQL for LAMP systems—ARC RDF classes for PHP. http://arc.semsol.org/ (November 2009) 7. ***: RAP—RDF API for PHP V0.9.6. http://www4.wiwiss.fu-berlin.de/bizer/rdfapi/index.html (2009) 8. W3C: SPARQL Update. http://www.w3.org/Submission/SPARQL-Update/ 9. Argerich, L.: Parsing RDF documents using PHP (2002) An introduction to the RDF XML syntax and how to parse RDF documents using the PHP version of Repat. 10. Beckett, D.: Dave Beckett’s RDF Resource Guide. http://planetrdf.com/guide/ (September 2005) 11. Bizer, C., Westphal, D.: Developers guide to semantic web toolkits for different programming languages. Technical report, Freie Universit¨t Berlin (2007) a http://www.wiwiss.fu-berlin.de/suhl/bizer/toolkits/. 12. Buraga, S.: Managementul datelor RDF. SPARQL. Technical report, Alexandru Ioan Cuza University Iasi (2009) , http://profs.info.uaic.ro/~busaco/teach/courses/wade/presentations/ web04ManagementulDatelorRDF-SPARQL.pdf. 13. Oldakowski, R., Bizer, C., Westphal, D.: RAP: RDF API for PHP. Technical report, Freie Universit¨t Berlin (2005) a http://www.semanticscripting.org/SFSW2005/papers/Oldakowski-RAP.pdf.
  6. 6. 14. Davis, I.: 30 minute guide to RDF and Linked Data. http://slidesha.re/oEUTQ (2009) at Code4Lib. 15. ***: PEAR Package Information: RDF. http://phpxmlclasses.sourceforge.net/ (September 2004) 16. ***: SemanticWebTools—ESW Wiki. http://esw.w3.org/topic/SemanticWebTools (November 2009) 17. ***: Tagging. Aggregating. Interlinking. The LOD-way. http://lodr.info/ (November 2009)

×