|
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... |
|
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 |
|
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. |
|
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/michael/data/ This is the closest I have seen. It has a way to model linkeddata. 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 @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. |
|
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 |
|
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. |



thanks for responses - interesting! some background: http://dannyayers.com/2011/03/25/Scripty-Agents
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.