-
Notifications
You must be signed in to change notification settings - Fork 489
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
Client-side Javascript DAG visualization / explorer #56
Comments
@whyrusleeping I think this script is awesome. To clarify, what I'm thinking of is kind of an extension of this functionality -- an interactive node/link visualization/browser running in JavaScript. If this was running in the webui, or in a similar application, where would we imagine it getting data from? From the node api? Still figuring out the moving parts around here... |
This is perfect! I think the webui needs dag viewer, if only a basic one - especially once more exotic data formats start to emerge (we already have the geoip stuff, append only logs anyone?). The webui gets its data through node-ipfs-api. For the standalone case, you might like to experiment with node-ipfsd-ctl which can spin up the go implementation and passes you ipfs-api clients (temporary right now, persisted by passing a dir just needs to be documented iirc? cc @krl) |
TL;DR: After really a lot of research, I recommend a D3 expandable tree layout to visualize the IPFS DAG data. Additional data would be fetched either on each tree node expansion, or (preferably IMO) pre-fetched, at least for a reasonable number of next possible tree nodes. For those who may be interested, some of my research notes follow. Force Directed Graphs I was hoping for a graph-shaped solution, rather than tree-shaped, and Force Directed Graphs are the best way I've seen to automatically arrange a graph in a readable layout. D3 Force Directed Graphs http://bl.ocks.org/MoritzStefaner/1377729 | Force-based label placement Arbor.js Force Directed Graphs http://arborjs.org/halfviz/#/date-with-destiny Springy.js Force Directed Graphs D3 Hand Curated Graph http://www.nytimes.com/interactive/2013/02/20/movies/among-the-oscar-contenders-a-host-of-connections.html?_r=0 | Among the Oscar Contenders, a Host of Connections - Interactive Feature - NYTimes.com Sigma.js Graphs http://wikiproject.oii.ox.ac.uk/networks/ | Co-editing among Wikipedians in English D3 Trees http://bl.ocks.org/mbostock/4063530 | Circle Packing |
Thanks for the info @cryptix 😄 |
@jbenet @cryptix @whyrusleeping I am interested in what you think of something like http://mbostock.github.io/d3/talk/20111018/tree.html to visualize IPFS DAGs before going much further. |
@harlantwood that expanding tree is awesome. i would love that! |
Sorry for delay will take a look in a bit — On Thu, May 28, 2015 at 1:16 PM, Jeromy Johnson notifications@github.com
|
Cool, glad you like @whyrusleeping. Just had a good call with @fractastical of Swarm... Once this and other data visualizations of IPFS are up and running, it would be awesome to start reflecting the blockchains in from Swarm, Etherium, Counterparty, Bitcoin, etc... IMO IPFS could be an ideal permanent place to store and visualize all this immutable data. |
@harlantwood very much agreed-- ok looking now. sorry for delay |
After looking at all of those, and remembering some myself, Entirely agreed. i think "expandable tree layout" is one of the best out there today. btw @harlantwood also if you haven't seen these you'll love them:
Regardless, i think we should have an intermediate format, between merkledag and these visualizations, that makes it easy to plug into all the graphs. So we could visualize the same data in a bunch of different graphs. Basically something like:
How does this sound @harlantwood @krl ? |
@jbenet this is very cool. Let's call what you have described here [option 1]. What I love most about [option 1] is that we are serving visualizations of IPFS through IPFS itself, as static HTML/JS. Proposing an [option 2]: Background: the IPFS project has this fantastically cool JS example visualizer which can load in examples from other IPFS nodes:
Sooo... we could create a visualizer in the same way, which could be accessed at http://gateway.ipfs.io/ipfs/[HASH_OF_VISUALIZER]/visualize#/ipfs/[HASH_OF_TREE_TO_VISUALIZE] The cool thing is that once the visualizer was up and working, you could plug any IPFS directory in as the HASH_OF_TREE_TO_VISUALIZE -- so only updates to the visualizer need be published to IPFS, instead of having to publish for each directory you want to visualize (as in [option 1]). Now to how it would work: (caveat: I am new to IPFS) -- [option 2a] Right now the IPFS gateway serves up HTML for any directory object, including links like: <li><a href="/ipfs/QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/home">home</a> - 3947 bytes</li>
<li><a href="/ipfs/QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/lib">lib</a> - 268261 bytes</li> A naive approach would be to construct a 1-level tree from this directory info, and either prefetch or fetch upon click the next level of the tree, by loading and interpreting the objects/directories linked to. [option 2b] We could add functionality to the IPFS gateway to serve directories either as HTML or as JSON, depending on the This JSON response could be depth 1 by default, and (perhaps) have an optional depth parameter that you could pass as a query string, eg Interested in your thoughts on options 1 vs 2, and 2a vs 2b -- @whyrusleeping @jbenet @cryptix @krl. |
After discussing briefly at the Sprint meeting today, I'll pursue [option 2] (hopefully 2b, though I may need help on the go gateway side for that). In any case, this no longer looks like part of the My suggestion: make a new repo using a lot of the same ideas as ipfs/examples -- perhaps If this seems clearly awesome, go ahead and make the repo... if not sure, I'll just start it in my account and we can push it to the IPFS org when its working. |
i want to expose the Read part of the API's maybe there's a separate case where we want to allow things to plug transforms into the gateway that transform objects server side before serving them (based on header, query, or path)
yeah, i think this is nice. this may make sense as a separate API route though. (and we can expose readonly api parts via the gateway).
Sounds good! yeah we can make an issue in go-ipfs to "Expose read-only API via Gateway"
yeah for sure. done! https://github.com/ipfs/dataviz |
Awesome. Hopefully will have some time to work on dataviz tomorrow.
I love them. |
Closing this thread, for the latest see: |
It seems like it would be immensely cool to have a visualization of data stored in ipfs.
[Edit: To clarify, what I'm imagining is an interactive node/link visualization/browser running in a JavaScript app, either in the webui or a separate application.]
If we were doing graph-shaped viz, I'd lean toward Sigma, because it creates beautiful graphs pretty much out of the box, and renders to webgl (when available) for use with large data sets.
If I get time I'll hack on it a bit; meanwhile any feedback very welcome.
The text was updated successfully, but these errors were encountered: