login about faq

Has anyone got a triplestore to interop with node.js?

(It's evented I/O for V8 JavaScript, looks nifty kit for HTTP stuff).

Given that V8 runs native, I'm guessing it should be possible to hook into Redland somehow (but I wouldn't know where to start). Alternately, I suppose one of the Javascript RDF engines could work, but I'm out of touch with what's available.

SPARQL would be nice to have...

asked Mar 24 '11 at 19:41

danja's gravatar image

danja
1213

edited Apr 19 '11 at 08:07

Rob%20Vesse's gravatar image

Rob Vesse ♦
8.6k515

thanks for responses - interesting! some background: http://dannyayers.com/2011/03/25/Scripty-Agents

(Mar 25 '11 at 21:36) danja danja's gravatar image

Since the whole goal of node.js is to be non-blocking and since they rewrote a lot of things for that it would seem that one requirement would be that the triple store can also be accessed in a non-blocking way. If you access it via HTTP then you can just use node's HTTP support of course. But if you use a JavaScript RDF engine then maybe you'd need to account for that.

(Mar 27 '11 at 00:39) Simon Reinhardt Simon%20Reinhardt's gravatar image

Given that Node.js allows you to issue HTTP requests (see this API section) I would suggest using whatever store you prefer that has a decent/usable HTTP based interface. All your RDF IO and SPARQL queries can then go via HTTP to/from the chosen store.

Then just use whichever Javascript RDF and/or SPARQL API offers the best performance/most convenient API from your point of view to do the client side processing of the data i.e. whichever fits your use case best

There are few questions around the site on Javascript libraries for this though I suspect they'll all be mentioning libraries you are already aware of e.g.

Does the native V8 engine support localStorage or is that more a feature of a browser based implementation? A colleague here at Southampton had a fairly crude but effective demo running which used localStorage to store limited amounts of RDF. Obviously in a browser there are limitations on the amount of data storable but those may not apply in a native deployment. I don't have a link to hand (and it may have been internal access only) but can probably dig it up if you're interested.

answered Mar 24 '11 at 21:26

Rob%20Vesse's gravatar image

Rob Vesse ♦
8.6k515

Hopefully SPARK could be relevant - it is a recently announced JavaScript library (jQuery based), supporting RDF and SPARQL.

answered Mar 26 '11 at 10:20

ngn's gravatar image

ngn
11715

thanks ngn - silly me, I saw the release notice for Spark but had completely forgotten. Must have a play.

(Mar 27 '11 at 10:48) danja danja's gravatar image

Not implemented in JavaScript but Stardog (http://stardog.com) exposes an Avro RPC Interface. So one could run a Stardog server stand-alone and you could connect to it via https://github.com/fizx/node-avro

I think that would be the best and efficient way.

There are also plans for Neo4J (Graph Database with posibilities to use it as a Triple Store) to add a binary socket interface.

There is also the Tinkerpop Stack which has https://github.com/tinkerpop/rexster/wiki/ (a RESTful module on top of every blueprints enabled graph/triple store) So with this RESTful API you could access it from almost any language.

I personally hope that in case of stardog or neo4j, they implement some events when something gets stores, deleted, updated, etc. So with this events in our hands we could theoretically add a small layer on top of this events, which broadcasts this events over a tcp socket for instance. So we could connect from the node.js side to this and get events from the backend.

answered Sep 08 '11 at 11:39

thomasf's gravatar image

thomasf
311

This project is primarily intended to run on the browser and allow direct editing of RDFa marked data. It synchronizes the changes to a CMS through json-ld. It also runs on node.js so you could, for example, put a conventional form-based interface on the browser and let node convert to/from json-ld.

https://github.com/bergie/VIE

answered Mar 24 '11 at 22:01

user-1244%20%28google%29's gravatar image

user-1244 (google)
111

https://github.com/michael/data/

This is the closest I have seen. It has a way to model linkeddata.

answered Mar 25 '11 at 20:45

Shamod's gravatar image

Shamod
111

Nice find! It does seem close: [[ Based on the Metaweb Object model

The Data.Graph format is highly inspired by the Metaweb Object Model that is used at Freebase.com. So if you're familiar with Freebase and MQL, you should have already gotten the basic idea. ]] http://substance.io/#michael/data-js

(Mar 25 '11 at 22:18) danja danja's gravatar image

@danja: no not really, see also http://www.semanticoverflow.com/questions/2918/why-is-rdf-so-old-complicated-unpopular-and-still-not-discarded/2964#2964. AFAIK, data.js should be able to handle RDF.

(Mar 26 '11 at 18:08) zazi zazi's gravatar image

Just discovered an interesting guy on Github who has a bunch of Node.js and RDF stuff including https://github.com/antoniogarrote/rdfstore-js

It's a native JS based RDF store with SPARQL support that has both browser and Node.js builds

answered Aug 19 '11 at 05:11

Rob%20Vesse's gravatar image

Rob Vesse ♦
8.6k515

I'm working on integrating node.js, jQuery, the RDFQuery plugin, and Allegrograph's REST interface. I'll report back if I get anywhere with it.

answered May 09 '11 at 10:53

drobnox's gravatar image

drobnox
1255

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×125
×12
×2

Asked: Mar 24 '11 at 19:41

Seen: 2,240 times

Last updated: Sep 08 '11 at 11:39