10000 `sparse visualize` command · Issue #22 · pystorm/streamparse · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

sparse visualize command #22

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

Closed
msukmanowsky opened this issue Jun 9, 2014 · 19 comments
Closed

sparse visualize command #22

msukmanowsky opened this issue Jun 9, 2014 · 19 comments
Assignees
Milestone

Comments

@msukmanowsky
Copy link
Contributor

Use an existing topology visualization tool like:

or some mix of these, add a visualization command for topologies:

sparse visualize [(--name | -n) <topology>] (--format | -f (png|jpg|gif)) output_filename 
@amontalenti
Copy link
Contributor

Actually already implemented this using digraphs. I just didn't merge into streamparse and add a CLI for it yet, but the viz code already works.

@msukmanowsky
Copy link
Contributor Author

Merge that!
merge

amontalenti added a commit that referenced this issue Jun 13, 2014
@amontalenti
Copy link
Contributor

See above -- I have it now merged into the JVM layer. Example usage:

lein run -m streamparse.commands.visualize/-main ~/repos/ptrack/streamparse/topologies/andrew.clj

Resulting in this image:

topo_img

Now just needs to be added to sparse CLI and wired up.

@amontalenti
Copy link
Contributor

Problems. Turns out storm-spirit depends on dorothy, which in turn depends on Clojure 1.5. Since Storm still isn't upgraded to Clojure 1.5 until Storm 0.9.2 is released, we can't really use this yet. I'm going to drop it out of our project.clj to make sure it doesn't pull in Clojure 1.5 accidentally. Pity.

@amontalenti
Copy link
Contributor

Storm JIRA related to 1.5 upgrade, STORM-265.

@msukmanowsky
Copy link
Contributor Author

STORM FAIL :(
STORM FAIL

@amontalenti
Copy link
Contributor

For now, I kept the visualize command in, but removed the dependency to storm-spirit, left a note for ourselves, and issue a warning when you try to use the subcommand. Once Storm 0.9.2 we can probably enable the command safely, although we'll have to use some lein magic to make the command unavailable when using 0.8 or 0.9.1 streamparse projects. See commit a7d1c2d.

@amontalenti amontalenti added this to the v0.1.0 milestone Jun 18, 2014
@amontalenti amontalenti changed the title Add sparse visualize command Add sparse visualize command Jun 18, 2014
@amontalenti amontalenti changed the title Add sparse visualize command sparse visualize command Jun 18, 2014
@dan-blanchard
Copy link
Member

Now that Storm 0.9.2 is out, are you going to re-enable this? It seems pretty handy.

amontalenti added a commit that referenced this issue Jul 17, 2014
@amontalenti
Copy link
Contributor

@dan-blanchard thanks for reminding me of this. The above commit brings the lein command back, which can now be issued from inside ~/repos/streamparse/jvm/ thusly:

lein run -m streamparse.commands.visualize/-main ~/repos/path/to/your/topology.clj

And it will open a visualization on your operating system. I also updated the bootstrap template for project.clj in new streamparse projects to include the 0.9.2 dependency by default.

The next step that needs to happen on this issue is to write the sparse visualize command wrapper and also see if there's a way I can have the visualized result go to a file instead of auto-opening in an operating system every time. Then I'll be able to close this.

amontalenti added a commit that referenced this issue Jul 17, 2014
- storm-spirit depends on old version of storm
- dorothy depends on old version of clojure

This causes classpath woes. Though I added the stub for `sparse
visualize` here, we'll need more work to get it fully working.

Related to issue #22.
@amontalenti
Copy link
Contributor

@dan-blanchard Gah, classpath woes. I tried to get this working today but hit a roadblock which you can read about in commit 52efb03; I'll need to vendorize storm-spirit and dorothy to get this to work.

@dan-blanchard
Copy link
Member

@amontalenti Have you made any progress on vendorizing storm-spirit and dorothy? I was just asked for a graph of our rather complex Storm topology, and I was disappointed to find that there was no simple way to generate one. I'd offer to help out on this, but Clojure packaging is not really my forte.

@amontalenti
Copy link
Contributor

Didn't get to it yet. Thanks for the reminder though. Working my way through the queue. :)

@dan-blanchard dan-blanchard modified the milestones: v1.1, v1.2 Apr 9, 2015
@amontalenti
Copy link
Contributor

I'm actually thinking I may be able to implement sparse visualize on the Python side if #84 gets implemented, since in that case I'll have a DAG that I can actually visualize available to me in-memory in Python. (The Clojure dependency situation is a bit intractable if I want streamparse-jvm to maintain compatibility with Storm 0.8.2 through 0.9.3.) Linking here so I don't forget about it. cc @omus and @cabiad.

@dan-blanchard
Copy link
Member

I think we might also be able to come up with a way to do this on the Python side just using the REST API. Won't work <0.9.2, but I think that's probably okay, since #52 won't either.

@amontalenti
Copy link
Contributor

Hmm, I think I like the idea of being able to visualize your topology before submitting it to Storm. I don't think it'd be too bad given that we already have a simple DAG model and plan to render to Clojure, so adding a renderer for Graphviz's digraph format would probably a piece of cake.

@dan-blanchard
Copy link
Member

I like the idea of being able to visualize your topology before submitting it to Storm

That's true; that would be nice.

adding a renderer for Graphviz's digraph format...

👍 I like that idea.

@dan-blanchard dan-blanchard modified the milestones: v2.0, v1.2 Apr 27, 2015
@rduplain
Copy link
Contributor

The current sparse visualize does not work.

@amontalenti
Copy link
Contributor

@rduplain I wanted to mention that now that Topology DSL is coming, we can write this in pure Python. And further, that we have some prior art for this that may be easy to adapt, which is the dask visualizer. It's described briefly here:

http://dask.pydata.org/en/latest/inspect.html

@rduplain
Copy link
Contributor

+1

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

No branches or pull requests

4 participants
0