[instaviz-users] Opinions wanted: Graphviz URL scheme

Glen Low glen.low at pixelglow.com
Fri Mar 20 06:40:29 CDT 2009


Hi All

I'd like to propose a Graphviz URL scheme for passing graphs into the  
GUI viewers and/or Instaviz. Handling such custom URL's is the primary  
IPC (interprocess communication) method on the iPhone, but would also  
have broad support in Windows and Mac OS X.

Essentially you'd take a Graphviz graph, %-encode it and whack a  
graphviz "protocol" at the beginning of it:

e.g.

digraph G { hello -> world; }

becomes

graphviz:digraph%20G%20%7B%20hello%20-%3E%20world%3B%20%7D

If you put such a link into an email or a website and click on it on  
the iPhone, you would then open Instaviz (the next version) with the  
embedded graph. Similarly on Mac OS X (or Windows), clicking on such a  
link would open the graph in the Graphviz viewer (some near future  
version, if AT&T is happy with me putting such support in the Graphviz  
package). It's a little easier for web authors to write these than  
say, convince the web server to output MIME type text/vnd.graphviz if  
they don't have control over it, and the graph would be embedded  
within the HTML rather than exist as a separate file.

(Conceptually such a URL is equivalent to a data URL of the form

data:text/vnd.graphviz;charset=UTF-8,digraph%20G%20%7B%20hello%20-%3E 
%20world%3B%20%7D

)

I invite your comments. I'm trying to keep it simple but want to iron  
out any wrinkles before rolling out something that could end up a de  
facto standard. It should be fairly easy for a human and/or some  
quickly hacked together script to convert between a Graphviz graph and  
a Graphviz URL.

e.g.

1.	Should it be graphviz:// or just graphviz:  -- do the usual URL  
recognizers in various mail programs pick it up? (Most non-host- 
referencing URL schemes omit the // e.g. mailto:, data: and  
javascript: )
2.	Is the format too verbose / not human readable? Given the  
limitations of the URL format itself... note that you could simply  
type graphviz:digraph G { hello -> world; } ... into a web browser  
address bar and it should do the right %-encoding for you, and  
automagically open in Graphviz (some future version)....
3.	What should/would happen with UTF-8 data in the graph?
etc.






Cheers, Glen Low


---
pixelglow software | simply brilliant stuff
www.pixelglow.com
aim: pixglen
twitter: pixelglow



More information about the instaviz-users mailing list