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

Click graph visualization #104

Closed
tbarbette opened this issue Aug 26, 2018 · 13 comments
Closed

Click graph visualization #104

tbarbette opened this issue Aug 26, 2018 · 13 comments
Labels

Comments

@tbarbette
Copy link
Owner

Aside Clicky that can export the graph visualization in PDF, what other tools do you guys now about ?

I'll try to make a wiki page out of this question.

@bcronje
Copy link
Collaborator

bcronje commented Aug 26, 2018

I've used click-viz that uses click-pretty before:

# click-viz : a program to graphically visualize click scripts.
#
# The output of this program is meant to be piped to dot to
# generate a graph. Examples:
#	click-viz demo.click | dot -Tpng >demo.png
#       click-flatten demo.click | click-viz | dot -Tpng >demo.png

@bcronje
Copy link
Collaborator

bcronje commented Aug 26, 2018

I believe click-pretty can also export to html as well.

@tbarbette
Copy link
Owner Author

tbarbette commented Aug 27, 2018

With dot, the generated graph is horrible. is there a way to have the element style as in the Click paper?

@piotrjurkiewicz
Copy link
Contributor

Graphs in the Click paper were generated using MetaPost. It works out of the box with modern LaTeX distributions (Miktex for example, command mptopdf xxx.mp), but diagrams cannot be generated automatically from Click configuration files. They must be written manually.

@cffs
Copy link
Collaborator

cffs commented Aug 28, 2018

Generating the graphs automatically for MetaPost (or TikZ, or ...) might be feasible, but we would need to come up with our own node placement algorithm, as MetaPost requires some positioning information.

Improving the dot output would be an easier short-term target. It can be done by tweaking a bit the dot code itself, but would likely require post-processing of the output (should not be too hard using the SVG backend).

Finally, we could generate code for a modern alternative to dot, which handles node placement but also allows more customization of the look. Any suggestions?

@bcronje
Copy link
Collaborator

bcronje commented Aug 28, 2018

Personally I would rather look into something that generates graphs that look something like Meraki's topology map. I'm just guessing here but they probably uses D3 or similar javascript library to generate the map. Any Meraki guys want to comment on what library is used for that map?

@tbarbette
Copy link
Owner Author

I guess JS would be something different, for live view ?

I'm dreaming for a web interface allowing to drag and drop elements. The HTTPServer element is already very useful to use a REST (or web) interface to play with elements parameters.

But the original question is about "paper" visualization. Are there template for MetaPost Click-like elements ? I mean with the little square or triangles for push/pull, etc

@tbarbette
Copy link
Owner Author

Maybe @pallas can help here?

@tbarbette tbarbette reopened this Aug 30, 2018
@cffs
Copy link
Collaborator

cffs commented Aug 30, 2018

Some .js frameworks work on SVG which can then be exported for use in papers. It also has the advantage of limiting the dependencies as we can likely ship the .js library directly with the tool (depending on its license). But which one would be more appropriate?

If we choose to go the MetaPost route instead, I should be able to re-write element template macros if needed. However, we still need to find a way to position the elements. Maybe we could reuse dot output as illustrated in Supporting layout routines in MetaPost.

@bcronje
Copy link
Collaborator

bcronje commented Aug 30, 2018

I wasn't aware of HTTPServer element, what does it do?

@bcronje
Copy link
Collaborator

bcronje commented Aug 30, 2018

Never mind, found HTTPServer description in the commit message.

On that note we should probably start enforcing that new/updated elements use the Click style element documentation inside the header files?

@tbarbette
Copy link
Owner Author

Yes we should. I'm trying to go through pull requests for most changes now. Don't hesitate to beat me if that happens again :p

@tbarbette
Copy link
Owner Author

For further reference, the metapost examples are actually available in etc/diagrams

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

4 participants