Aldonline

Looking Back a bit; Semtech2009

So I missed ISWC because I was just too busy to spend a week drinking beer and talking my mind off.
But there is this mind trick to avoid feeling left out: look back and say. "Nah, nevermind. There is no way this conference matches the last one I went to".

Now, unfortunately, this is usually NOT true in the tech world because things move so fast that in six months time you see a lot of advances and there's always something new. So every conference is effectively better than the last one in at least one level. And that makes every conference worth attending.
And that's why working in technology makes you feel younger each day. It never ceases to impress you ;)

However, in this case, I DO look back and say: "There is no way this conference matches the last one I went to". And I feel great.

Why? because the last one was Semtech2009 at San Jose and it was loaded with surprises. Not tech surprises, but something much deeper.
The biggest surprise to me was this: No longer was I on the lunatics side talking about a "possibility". But I was on the doers side and all my baggage instantly turned into experience. There was a new sense of mission, no longer fed by informed anticipation but by real facts.

Although it was no surprise, because I have a pretty clear idea of where this is going. But god I was glad it finally arrived.

Where are we going? Well, we're going to a very wild place where a lot of rules will change. Well, not too many of them, in fact just one of them. But it will have a huge impact. A HTTP URI can be a simple thing, but when used right, it can very literally changed the whole world.

I don't like to take pics but this one is special:
Semtech2009 after a super luxury mexican burrito dinner and quite a debate on the whys behind the what by some of the whos behind the what. ...What?



LTR
  • Aldo Bucchi
  • Peter Mika ( Yahoo! Research )
  • Sean Golliher ( Semj, SEO Guru )
  • Kingsley Idehen ( P/CEO OpenLink Software )
  • Mark Birbeck ( RDFa Guru )
  • Juan Sequeda ( PhD UT Austin )
  • Ben Godbout ( VP/CTO Copernic )

Coding Linked Data; Some quick thoughts from a hacker POV

So this doesn't fit in a Tweet, I'll just dump my mind here.
I have been working on tweaking Scala and Python to play along nicely with SPARQL. In particular, with SPASQL which is a blend of SPARQL and SQL. It can be mixed and matched with a PL-style language and together they comprise the main programming paradigm for OpenLink Virtuoso.

SPASQL is really productive when dealing with Linked Data middleware deployments, but it lacks the conciseness of modern languages, so coding large systems can become a bit annoying. Both the code itself and the codebase organization in general. Even so, the language is so powerful that it trumps the best contender in a second so I have walked the extra mile trying to find how to mix the best of both worlds.

How good is SPASQL? Well,  I have reduced Java codebases by a factor of 3 when moving to Scala, and then again by a factor of two when moving to SPASQL. Yeah, that sounds crazy, and it is. The first reduction is mostly syntactic. Scala lets you get away with less accessory code such as redundant typing and then there is also some more expressiveness to be found in functional programing, etc. The second reduction, when moving to SPASQL, is deeper as it is about moving away from control structures in the code and into complex SPARQL expressions against a graph based datamodel. Basically, most of your loops, filtering and conditionals can be gone and replaced by smart query composition. Then, if you wish so, you can also toss away most of your indirection model.
No more Business Classes and modeling at the scripting/code/controller level. RDF is already object oriented (or even better), so you should not be scared to just totally forget about Classes and encapsulation most of the time.
(There are also other tools that will help tackle the common cases behind encapsulation and getter/setter kind of patterns, such as bult-in inference).
In the end, using SPASQL, inference and other stuff becomes a much more "declarative" way of stating what you need. Don't code your way in, just ask for it in an elegant manner.

Anyway, back to scripting. I don't intend to explain the nuances and little details behind the execution ( be it interpreted or generating code ) or the possible solutions for remoting ( for example, hacking the continuations plugin in Scala ), nor the problems when trying to match the grammars and coming up with escape sequences for all the possible productions, etc.
I won't because frankly, I don't think I made a very good job. I only skimmed through the possibilities and ended up using a cheap (from an investment POV) code generator. I also know MANY C.S. students are going to realize this is the next frontier rather soon. All I want to say here is a simple trick I discovered and I hope it helps someone avoid hell.


Here it is:

Most modern languages, including Javascript, are really scared of URIs and that is your biggest problem when trying to make them play along. You will have a really hard time trying to fit them in as identifiers. Not because you can't model them in their value space ( they can be objects/entities, etc ) but because the lexer will go crazy on you when it runs into all the "?#&:/" stuff.

alert( http://foo.com/aldo.foaf:name ); 

Is not really a valid Javascript statement, so you can kiss any OOTB JS parser goodbye. Same thing applies for most modern languages you can find out there. URIs are not valid identifiers.
So you will most probably have to create an API atop the language and end up with something like:


alert( store.getResource("http://foo.com/aldo")
  .getProperty("foaf","name" ) 
  );

But that isn't really integrating, it's just an API and forces you to operate on a layer of indirection with an immense overhead. Then, some languages might allow you to create DSLs ( such as Ruby and Scala ), but you will still have a very hard time just trying to make a URI behave like a native citizen. And that sucks. Because URIs are all there is. That's the crux of the matter really.

Now, what about this?


alert( $$Hfoo$Ccom$Saldo.$$foaf_name ); 

Looks horrible, I know. And I just made it up. But the point is that there are many ways in which you can create a bijective transformation between URIs and the identifier system of the language you choose to extend. Hopefully you can take the time to make it easy to remember and nice to read.

Anyway, just keep this in mind. URIs will make you bleed. And if you want to see why you want to go down this road for you EII projects, just take a Virtuoso SPASQL for a ride and feel the power of Linked Data.

LOL, it sounds like a pitch. But I'm serious. You will end up doing this anyway sometime soon because SPARQL will eventually knock on your door. In the end, if you do it now you are just... way cooler ;)

Cya!