Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LevelGraph or PouchDB or both? #9

Open
3 tasks
BigBlueHat opened this issue Dec 13, 2016 · 4 comments
Open
3 tasks

LevelGraph or PouchDB or both? #9

BigBlueHat opened this issue Dec 13, 2016 · 4 comments
Labels

Comments

@BigBlueHat
Copy link
Owner

I've stared with PouchDB for storage--because it syncs!

However, it doesn't do graphy stuff...

I then remember @tilgovi's mention of hexastores, and did some digging which resulted in finding these slides: http://nodejsconfit.levelgraph.io/ This slide in particular fits the bill: http://nodejsconfit.levelgraph.io/#31

However, I still want things stored in named graphs (the original JSON-LD Annotation documents), and I still want those to sync.

So...

  • implement hexastore style indexes in PouchDB http://nodejsconfit.levelgraph.io/#16
  • store in PouchDB for sync and re-store in LevelGraph for query
  • store only in LevelGraph and use JSON-LD compact + Annotation schema to create any Web Annotation docs?
    • risk here is that the input JSON-LD and the compacted version may be different (needs research)
    • at the very least, it'd loose anything not in the @context used for compaction--possible data loss if consuming someone else's Web Annotation (afaik)

Hrm...

@BigBlueHat
Copy link
Owner Author

Another JS Hexastore: http://crubier.net/Hexastore/

@BigBlueHat
Copy link
Owner Author

@jmatsushita here's the particular issue I'm trying to solve for, fwiw. Might be of interest given your past CouchDB experience and (of course) your LevelGraph & JSON-LD expertise.

Lots of options for solving for these things...but each seem to have trade-offs. What doesn't...I guess.

@jmatsushita
Copy link

Hi! I haven't had to address this type of requirement yet but its a really cool use case.

There's also another approach which would be to try to wrap your underlying leveldb below levelgraph with couchup and synchronise with a couchdb server.

Although I've been trying to implement named graphs in levelgraph-jsonld, it's not quite ready and there should be some performance problems trying to use them extensively right now. Not sure if that would prevent using them in your case.

I'm not sure why it would be a problem if the compacted version is different from the input JSON-LD. Could you give an example?

@BigBlueHat
Copy link
Owner Author

Yeah, the couchup idea crossed my mind as well, but I think it's a bit deeper (atm) for this exploration. I'm also pondering building a hexastore plugin for pouchdb--which would be simpler and could probably use levelgraph...but still digging.

However, the current limitation is less about shape mismatch as it is about incomplete graphs. It's quite possible I'm Doing It Wrong though. 😛 Some of the graphs I'm trying to re-json-ld (via db.jsonld.get()) are incomplete--typically missing sub-graphs. However, others come out fine... I'm trying to narrow it down.

Also, named graphs (the tree I was barking up earlier) isn't a complete solution in this case as most of the JSON-LD I'm getting doesn't use named graphs--though I suppose I could reshape the input to do that...but then I'm wrapping other people's JSON-LD in my JSON-LD. 🐢 🐢 🐢 ad infinitum

Anyway. Thanks for thinking here with me. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants