Posts tagged with: php

webinale 2008 starts today

I
see me speak at webinale 2008 Still a few hours left to finish my presentations, then I'll join Germany's WebDev crowd at the webinale 2008 in Karlsruhe (It's taking place at the same location as this year's ISWC). My talks are about "Semantic Web Tech 'n' Use" (mostly microformats, RDFa, SPARQL), and RDF-based "Online Social Graph Consolidation" (FOAF, XFN, SPARQLy inference, knowee etc.), and there will be more SemWeb-related talks:
A (personally) interesting thing about the webinale is its co-location with the International PHP Conference, and the (new) Dynamic Languages World Europe, and that registering for one conference includes free access to any of the others. It's the perfect audience to talk about practical SemWeb Scripting with ARC and PHP.

Looking for paid (Semantic Web) Projects

I
Update 2: Yay, I think I'm safe for the next couple of months, should have blogged much earlier. Now I'm starting to think we could really need a Job site for SemWeb people..

Update: Ah, the blogosphere. I already received some replies. One to share: Aduna is looking for a Java Engineer.

About a year ago, I received some funds which allowed me to re-write the ARC toolkit, and also to bring Trice (a semantic web application framework for PHP) to production-readiness. However, Semantic Web Development is generally still very new, especially in the Web Agency market where I'm coming from. It's not that easy yet to keep things self-sustaining.

May well be that I should blog less about bleeding-edge experiments, but rather about how RDF and SPARQL allow me to deploy extensible websites at a fraction of the time it used to take in the past. "Release Early", "Data First", "Evolve on the Fly", and all those patterns that SemWeb technology enables in a web development context.

Anyway, to keep things short: I'm actively (read: urgently ;-) looking for more paid projects. I'm a Web development all-rounder with particular interest in scripting languages and quite some experience in delivering RDF and frontend solutions (more details on my profile page). While it would of course be great to work on stuff where I can use my tools, I'm available for more general web development as well. I'm most productive when I can work from my office, but temporary travelling is basically fine, too. The Düsseldorf Airport is just minutes away.

Cheers in advance for suggestions,

RDF Tools - An RDF Store for WordPress

T
Together with Morten Frederiksen and Dan Brickley (who is revisiting his SparqlPress idea), I've created a WordPress extension (called "RDF Tools") that adds an (ARC-based) RDF Store and SPARQL Endpoint to the blogging system. The store is kept separate from the WP tables (i.e. it's not a wrapper), but you can use WP's nice admin screens to configure it (screenshot), and given the amount of developer-friendly hooks that WP offers, I'm curious what can be done now, possibly in combination with other extensions such as those Alexandre Passant is working on. It could perhaps also be handy as a deployment accelerator for knowee.

ARC2 Progress

G
OK, I met this week's 2nd deadline and finished ARC2's SPARQL test suite report. Pass/Fail results as of today: 317/67 (Sept. 22nd: 352/84). That's a huge step forward compared to ARC1, so I'm quite happy.

Next actions: Making the knowee prototype public (deadline missed, boo!), and relaunching the ARC site, together with proper community tools and the new release.

Back from webinale 2007

s
webinale/ipc sign The webinale slides are online now. The session went OK, I'd say. I always make the mistake to look at the high conference prices and then end up trying to squeeze too much information into my talks to give the people some value for their money. It also was a bit hard to predict what the audience of the newly introduced webinale would be like. I did receive some great feedback from PHP coders (sneaking in from co-located IPC) who already had specific questions and asked about RAP and ARC. But I could see from many faces right after the session, that a very basic talk may have been better. Leo suggested to skip the ontology stuff entirely, the amount of different flavours (SKOS, RDF Schema, OWL Lite/DL/Full/+/-/1.1) is surely a whole mess marketing-wise. Next time I'll try to stick to the more intuitive stuff. At least I had a convincing demo about how (low-level) ontologies can be useful to greatly reduce custom application code.

I had a short chat with pageflakes' CEO Christoph Janz. Semantic Web technologies are not on their radar yet (maybe they are now ;), but we talked a bit about the possibility to add some RDF functionality to their widgets (which they call "flakes"). They may let us try some things in the context of the knowee project, e.g. a flake that could store contact data retrieved via GRDDL or a SPARQL endpoint. Might be worth checking out their SDK.

So, next time: less OWL, more wild colours:
semweb web 2.0 layers

CMS dev communities starting to take stock in RDF

D
A spontaneous invitation to DrupalCon got me driving to Brussels yesterday to finally meet the CivicActions folks I've been working for during the last months. Unfortunately, I missed Jonathan Hendler's NINA presentation about adding ARC's SPARQL API to Drupal for building a faceted browser, but we chatted quite a bit about it after lunch. I still have to learn a lot about Drupal, but one of the really interesting things is that it provides an extension called Content Construction Kit (CCK) that simplifies defining flexible forms and their elements. Drupal generates an HTML page for every resource ("node" in Drupal-speak) created via CCK. The thing that's missing is mapping the structured CCK nodes to RDF to enable optimized SPARQL querying while keeping editing simple and integrated. We discussed the potential of not only ex- but also importing RDF data into CCK. And how cool it could be to directly convert RDFS/OWL to CCK field definitions. Good news is that there are several hooks to RDF-enhance Drupal without running into synchronization issues or forcing the replacement of built-in components.

CivicActions was a gold sponsor and Dan Robinson introduced me to some of the core Drupal developers. And as it turned out, some of them are already thinking about direct RDF support for Drupal (partly triggered by TimBL using Drupal for blogging, partly because Drupal's internal structure isn't really far away from a graph-based model). I'm aware of three efforts now to add RDF to Drupal in some way, there may be more.

But it's not only the Drupal crowd which is looking at SemWeb technology. At lunch, I met Johan Janssens, lead developer of the Mambo spin-off Joomla!, who told me about a SemWeb project proposal for their 2006 Google Summer of Code. (There is another one in the ideas section.) The project took more than just this summer (welcome to RDF development ;), and the outcome is not going to be added to Joomla! anytime soon, but obviously the PHP community is getting aware of RDF's potential benefits and is starting to play with RDF, OWL, and SPARQL. And it's approaching the SemWeb from a practical point of view which just can't be bad.

ARC RDF Store for PHP - enSPARQL your LAMP

A
A first version of ARC RDF Store is now available. It's written entirely in PHP and has been optimized for basic LAMP environments where install and system configuration privileges are often not available. As with the other ARC components, I tried to keep things modular for easier integration in other PHP/MySQL-based systems.

A full store installation consists of just 7 files (à 10-50 KB each) but offers a variety of nice features:
  • It works with PHP 4 and MySQL 4
    It's also possible to use a single installation/DB to run multiple independent stores.
  • SPARQL queries are (almost) completely translated to SQL
    This not only avoids having to use interpreted PHP to process sub-results but also allows the RDBMS to optimize queries. (Note, however, that queries which can't be translated to SQL are not supported)
  • Cartesian Catastrophe protection ;-)
    Triple duplicates from different graphs can be moved to a dedicated table which is then only considered by GRAPH queries. GRAPH-independent queries ignore the duplicates, the combinatorial explosion is less likely to happen.
  • Application-specific table space customization
    PHP comes with certain performance limitations. And using shared, hosted Web servers often means that MySQL is running with standard settings. In order to still allow building advanced applications with ARC RDF Store, it provides options to split the triple tables. By default, triples with literal objects are separated from those with non-literal object values. On top of this, it's possible to specify so-called prop-tables to further split the table space used to store triples. For a calendaring app it might be useful to separate date/dateTime properties from the oher triples, a social networking site could define a prop-table for foaf:knows and related properties, foaf:depicts in case of a codepiction demo, rdfs:subClassOf for an ontology editor, etc. Splitting the triple space improves both query and insert speed.
  • Reversible resource consolidation
    The "Store keeper" class provides a smushing function for both functional and inverse functional properties. Pre-consolidation IDs are stored for each triple, enabling the un-smushing of merged resources to a certain extent (only one previous ID value can be restored of resources that have been smushed several times using different identifiers).
  • JSON results
    JSON results are available for all the main CRUD store methods (add_data, query, update_data, delete_data).
  • Multiple options for inserting and deleting data
    The store can add RDF/XML from the Web (including 3xx handling), RDF/XML passed as parameter, or single triples encoded in a turtle subset. Data removal is possible by providing a graph IRI, a concrete RDF/XML document, or a triple pattern including wildcards.

I've put up an ugly little demo service where you can run test queries against w3photo/CONFOTO data (~ 20K triples, prop-table for rdf:type). Might be fun to play with the JSONI generator, or to check out the SQL created by the rewriter.

Next action: A JavaScript CRUD frontend. Well, and bug-fixing...

Timeouts in RAP and ARC due to PHP5/libxml2 bug

l
Just in case you wondered why your PHP-driven XML parser doesn't work any more after switching to PHP5. There is a bug in the libxml2 character encoding detection that causes timeouts when the xml parser is created without providing a should-be-optional encoding. The bug seems to be fixed in PHP 5.0.4.

For the moment, I've set the encoding of the ARC parser I'm using at beta.bla.org to UTF-8, so that I could activate the RDF import feature I mentioned earlier today. Guess I'll have to put some more effort into the Web reader, so that I can detect the encoding before initializing the parser.

URIQA bad good news

P
A couple of weeks ago I posted a hack to enable URIQA functionality on average hosted web servers. Hannes Gassert pinged me yesterday to tell me that an upcoming PHP release is going to support arbitrary HTTP verbs. Using unknown HTTP methods won't prevent PHP scripts from being called. This is basically a nice idea as it would allow me to use my standard CMS rewrite scripts to process URIQA reguests (actually it means that URIQA can easily be implemented on any PHP-enabled web server). But it also means that php sites which use default rewrite rules (e.g. where any request is passed to a central php script) will handle an MGET request just like a GET request if they don't do any method-specific checks.

URIQA's main advantage compared to other resource description discovery approaches (e.g. doing a HEAD before requesting metadata) is its efficiency: non-understood requests are meant to either return a (short) HTTP error or machine-readable, useful data. PHP seems to be adding potential ambiguity now that doesn't devaluate URIQA's utility but unfortunately it's efficiency argument.

Note to self: Don't mention that on rdf-interest. 2005 is still too young to reawake that thread. Hm, or maybe it's the right time now to propose my absolutely unambiguous offline approach again...