servalproject / serval-dna

The Serval Project's core daemon that implements Distributed Numbering Architecture (DNA), MDP, VoMP, Rhizome, MeshMS, etc.
http://servalproject.org
Other
171 stars 80 forks source link

cli option to dump route infos as json #97

Open gh0st42 opened 8 years ago

gh0st42 commented 8 years ago

Added command "route json" to dump routing information as a json document that can easily be parsed by other software or directly visualized by D3js - Doesn't change anything else in the code, no added libraries. In the future it would be nice to make the data available via restful API.

If wanted documentation and an example HTML document for visualization could also be added. At the moment both can be found in our repository https://github.com/umr-ds/serval-vis

lakeman commented 8 years ago

We've started designing a restful api for this data already. Over time we plan to deprecate many of our other existing cli commands, so this patch is unlikely to be merged as is.

That said, we already have an API abstraction for outputting tables to stdout. It should be possible to add json(-ish) output as an option for any cli command with minimal changes.

gh0st42 commented 8 years ago

That's too bad. Regarding route info, it's not only about outputting just some kind of json(-ish) table but by using some conventions like with the nodes and links many tools like networkx or D3 can easily use this data without converting too much of it so you might wanna consider this when designing the restful call.

Oh and btw at the moment the cli works really well for most parts. Is there a timeline when data like route information or the peer ids related stuff will be available?

lakeman commented 8 years ago

Andrew has started working on design & documentation. It's one of the tasks we will need to finish for the work we are aiming to do this year.

On Wed, Mar 2, 2016 at 9:20 PM, gh0st42 notifications@github.com wrote:

That's too bad. Regarding route info, it's not only about outputting just some kind of json(-ish) table but by using some conventions like with the nodes and links many tools like networkx or D3 can easily use this data without converting too much of it so you might wanna consider this when designing the restful call.

Oh and btw at the moment the cli works really well for most parts. Is there a timeline when data like route information or the peer ids related stuff will be available?

— Reply to this email directly or view it on GitHub https://github.com/servalproject/serval-dna/pull/97#issuecomment-191184302 .