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

you can add an api for dot #1

Open
epiphyllum opened this issue Jan 19, 2017 · 4 comments
Open

you can add an api for dot #1

epiphyllum opened this issue Jan 19, 2017 · 4 comments

Comments

@epiphyllum
Copy link

val inputStream = dot.getInputStream

so that it can be easily used for browser rendering in many scala web framework or lib

@Ldpe2G
Copy link
Owner

Ldpe2G commented Jan 19, 2017

@epiphyllum thanks for your advise, but I am not sure what you mean. Could you provide a more
specific details of how will you use this api?

@epiphyllum
Copy link
Author

for example:

when browser initiate a request GET /give/me/graph/of/:flow_id.png to my webserver, webserver will first load data from database using :flow_id, then webserver should create a Digraph class provided by you, and render an image to the browser

val flowConfig = loadConfigFromDB(flowId)
val flowDot = new Digraph(comment = "The Flow Graph")
val inputStream = flowDot.getInputStream

val httpResponse = new HTTPResponse(inputStream, `Content-Type:image/png`)

blah blah...

@epiphyllum
Copy link
Author

this project provide an DSL wrapper for graphviz command. it is a good start.
I think it is also can be used in the web for image rendering where performance is not some critical

@Ldpe2G
Copy link
Owner

Ldpe2G commented Jan 20, 2017

Thanks for your detailed explaination. I will take a look into this.

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

No branches or pull requests

2 participants