SPARQL/Developer Tool

June 18th, 2009

For some time now, I’ve been toiling away at my own RDF/OWL/SPARQL/etc. IDE. This is basically a rewrite of the “ontogon” stuff I was working on a few years back. It works, but I’ve got lots more to do, and big plans for it. For example, RDB2RDF mapping, forms editing, and a visual scripting engine for validation, business rules that can’t be expressed in the ontology, etc.

It’s written in Java with a mySQL or JavaDB based triplestore. The API is Jena-like, but totally built from scratch. SPARQL is in there, though implementation really sucks. ASK, DESCRIBE, SELECT and a convoluted MODIFY/INSERT/DELETE work also. But filtering is really poor and CONSTRUCT is nowhere to be found. Writing a recursive-decent parser for SPARQL turned out to be a challenge for some reason. But whatever, I’ll fix all that shit later. :)

Anywho, here are some screenshots.

picture-2

picture-3

picture-1

Linked Data, Semantic Web, software development | No Comments | Trackback

Alan Turing

June 16th, 2009

turing

Art | No Comments | Trackback

Nikola Tesla

June 16th, 2009

tesla

I’ve been playing around with Photoshop lately to get a little more proficient. Here’s collage I did of Nikola Tesla.

Art | No Comments | Trackback

The Sculpture of Christopher Conte

May 29th, 2009

Amazing, but dark, sculptures in steel, brass and resin. H.R. Giger 2.0?

Posted via web from bmanley’s posterous

Art | No Comments | Trackback

Owl in one slide. on Twitpic

May 28th, 2009

 

OWL in One SlideOWL in one slide. on Twitpic. via @fabien_gandon

Semantic Web | No Comments | Trackback

Semantic Systems Integration

May 18th, 2009

I’ve done systems integration work for years. Generally these kinds of things are one-off applications that integrate a few systems with some very specific business rules that are “hard-coded” into the system. This makes them very brittle and difficult to change when new systems or business rules are desired. Now as a software developer, I know that the right way to do things is to abstract a lot of the functionality so you can plugin new functionality later without a lot of fuss. But the realities of time, money and attention span often require that you “just get it done”. Customers generally don’t care about how the nut gets cracked, just so it gets cracked on time and on budget.

As part of my day job last week, I was tasked with building a proof-of-concept that linked three systems together. Happily, I have a nicely evolving RDF toolkit at my disposal which really made things easy.

Using a nice RDF toolkit in systems integration work can help realize both the customer’s need for quick turnaround, and the developers desire for an elegant and flexible solution. Because the RDF model provides a common data model that is more-or-less infinitely flexible, it becomes trivial to mesh and mash the disparate data in interesting ways.

For example, my POC was to integrate a network element management system and a network inventory system. The EMS basically keeps track of devices on a network and knows how to communicate directly with these devices. The NIS keeps track of physical stuff ( switches, routers, COs, etc.), and also logical stuff like VPN, VoIP and POTS services. The idea of this integration was to reconcile the network “as-built” (according to the EMS) and “as-designed” (according to the NIS). In other words, does the configuration of DeviceABC as expressed through the EMS jive with the data about DeviceABC in the NIS.

Additionally, we wanted to create the ability to store extra data that neither system could natively store. Examples might include notes or commands for field technicians, device user manual, etc. So essentially, we have three systems to work with.

The first thing I need to do was to identify the entities and attributes from each system that I was going to work with. For each system, I defined a number or Classes and Properties in an OWL ontology. This was fairly straightforward…most tools provide some facility to do this. But even writing it by and isn’t that difficult. In addition to modelling the entities in the external system, I also created other entities that will be stored locally. These are the notes, command, documents, etc. that I spoke of earlier.

The EMS provides an API to fetch the list of devices names, details of each device, etc. This is a SOAP-based API that returns XML. To get it in a format I could use (RDF), I simply applied a stylesheet to turn their native XML response into Turtle. Then parsed the Turtle into an in-memory triplestore. My stylesheet of course converts the data so that it aligns with the Classes and Properties in my Ontology that I’ve defined for the EMS system.

On the NIS side, it again provides a non-RDF friendly API based on Java/J2EE. But because the data is actually stored in a database (as opposed to being fetched on demand from a network element), we can simply ignore the API and query that database directly. To do this, I simply created a RDF View over the data that I was interested in. This view is structured in such a way that the data appears as a generic RDBMS-based triplestore that we’re all familiar with…subject column, predicate column, etc. This is a bit different from some other RDF-RDBMS mapping strategies like D2RQ, but it works well for me. The idea is similar to that of Triplify, but I actually query a view rather than inspect a query result. I point another kinds of triplestore at this view, which I just call an RDF View Store. It’s a read-only store obviously, but provides the same querying capabilities as my “normal” store.

So now I have three distinct sources of data, all exposed as RDF. Mashing that data together is now trivial:

Fetch a URI from the EMS triplestore and examine its properties
Based on a property, query the NIS triplestore for a match
Display the combined results to the user
Let the user annotate the relationship by creating a note instance in the local triplestore and relating it to either the instance in the EMS or NIS systems.
Profit!
Now I have a system that satisfies my functional requirements. But what about my non-functional requirements of abstraction and ease of change. I have that too. Since everything is exposed as RDF, my application is fairly insulated from changes in the EMS or NIS. New data in the EMS? No problem…I just change my XSLT. Database schema changes in the NIS? Again, no problem…I just change my RDF View. Even the UI (which I really didn’t mention) is defined in RDF. What if I want to add a new “field” to display, or remove one that’s no longer used? I can just change the UI RDF and be done with it.

As a nice side effect, I’ve just opened these systems to any other application that can speak RDF. If I up a web server in front of these new triplestores, I’ve now opened up a new source of data to the entire enterprise. Enterprise Linked Data, baby!

Linked Data, Semantic Web | No Comments | Trackback

RFID and the Semantic Web

May 18th, 2009

I just happened to run across a nifty little hardware/software service from Alcatel-Lucent called Tikitags. The Tikitags product consists of touchless RFID reader, a set of RFID tags and some software to drive the reader. They also offer a web site where you can “program” different actions to be executed on your local machine when the reader detects a specific tag.

For example, suppose I put a Tikitag on my new Western Digital external hard drive. When I put my hard drive on or near the RFID reader, it could then launch a browser that takes me to the WD web site that describes the model of hard drive that I bought. Or maybe the page with the technical specs. That way I never have to keep the paper documentation around, can always remember where to download drivers, etc. Kinda cool!

What’s this got to do with the Semantic Web or Linked Data? Well, suppose I can map the RFID value in my Tikitag to a Linked Data URL that serves up RDF. Now I can get linked data about my drive. And depending on how that data is managed, I can include links to the WD web site, the date I bought it, how much I paid for it, warranty information, reviews, etc. I’ve created a real-world, physical analogue to the URI. Instead of a textual string to represent a “thing”, I can actually use the thing itself. Well, I know the RFID->URL mapping is still there. But the owner of the thing doesn’t necessarily need to know about those kinds of details.

How might this be useful in other ways?

What if my “thing” ( in this case, my hard drive) was connected to the web? Maybe it could pull down the RDF to find the latest firmware release and install it? Maybe it could learn about and join a “cloud” of other storage devices to create a distributed file system?

What if my “thing” was a box of rice? I could pull down recipes supplied by the manufacturer, or ones that consumers have uploaded on their own. I could find out if the product has been recalled due to contamination during production.

Since a number of mobile phones have RFID readers in or available for them, I’m not limited scanning and retrieving information within reach of my PC or Mac. I could use my phone to scan my car tires to find out optimal air-pressure values. Or scan items at the store for additional information and perhaps compare options.

I think the possibilities here are quite interesting. And Tikitags look to be a step in this direction…but I think it could be taken much further with a little hardware/software hacking and some imagination.

RFID, Semantic Web | No Comments | Trackback

Staying True to the Triple

April 12th, 2006

As expected, I got a few puzzled looks over my OPML bookmarks decision. What can I say?

bookmarks_04122006

I needed something, and in the absence of anything else, I used it. And it worked. But it admittedly undermined the underlying goal of creating an purely RDF based PIM. It made me feel dirty, and I was ashamed. Well, not really. I’m not really into the whole RSS/OPML sucks/rocks thing. But I digress…

So in the interest of Keepin’ True to the Triple, I’m now using RDF for Ontogon’s bookmarks. Specifically, I’m using Annotea’s bookmark schema and storing the instance data right along with everything else…in the triple store. This makes the bookmarks annotatable, SPARQL-able, etc. which might come in handy for some.

Semantic Web | No Comments | Trackback

Cardinality Restrictions

March 19th, 2006

By default, Ontogon will let you enter any number of distinct values for a property. For example, if you created a Book class, you might give it a author property. Books usually have authors, but sometimes they don’t. Sometimes they have more than one author. If the book is by Wrox, it might have a dozen authors. :)

Sometimes though, you need to constrain the number of values that a property can have. The number of pages, for example. Or the price. Or the number in stock. Generally, these kinds of properties are constrained to having at most one value.

Ontogon let’s you define these cardinality restrictions in the Ontology editor. Simply set the minimum and maximum number of values that the property can have. Note that the restrictions are local to the class and are not inherited from the super-class or passed on to sub-classes. The grey items are properties from the super-class, but the restriction is set at the current class level.

cardinality2_031806

Once a restriction is set, the UI will then enforce the constraints. Here, we can see that exactly one title, any number of authors, exactly one price, page and in-stock count are allowed. Easy peasy lemon squeezy.

cardinality1_031806

Semantic Web | No Comments | Trackback

My Evil Second Head Has No URI

February 15th, 2006

One of the nice things about RDF, and therefor Ontogon, is the concept of a blank node. Commonly referred to as bnodes, they have no URI of their own and don’t really “exist” without having a relationship to some other resource. The evil second head growing out of me is like a bnode…it can’t exist on its own.

bnode_02152006

While evil second heads are almost never desirable, bnodes often are. In Ontogon, bnodes are optionally created when relationships are established. If you attempt to relate resource A to a non-existent resource B, you have the option of creating B as a bnode. To do this, just check the “Create inline?” checkbox.

inline1_02152006

Once created, it’s rendered in the UI as if it where a reference to any normal resource. Typically, you’ll see a hyperlink whose text is the resource’s human readable name.

inline3_02152006

Normally, clicking on the link will force the UI to jump directly to that resource…just like a web browser jumps to the referenced URL. For bnodes however, the resource is displayed inline within it’s “host” resource. It’s displayed “inline”.

inline2_02152006

Of course, bnodes can be related to other bnodes and you’re free to create a big ol’ tangle of nested stuff. In practice, you probably won’t want to do this, but why should I stop you?

You might be curious to know what happens to the second evil head if the host body gets deleted. Well, it goes away too. Without a relationship to something, it simply floats off into the ether. Cool.

Uncategorized | No Comments | Trackback

Search

Categories

Monthly Archives

Blog Roll

Meta

Recently on Flickr

P1010798.JPGP1010791.JPGP1010789.JPGP1010788.JPGP1010800.JPGP1010796.JPG