Version 5 of e4graph

Updated 2002-09-28 05:44:04

http://e4graph.sourceforge.net

e4graph is a C++, Tcl and Java library for providing persistent storage for graph data.

[Explain.]

[Cool things: swappable, even scriptable, back end, at least architecturally. Arbitrary data stores. Conceptual power. Embeddability. Portability of data and source. Screaming performance. ...]


e4Graph makes a prominent appearance in a developerWorks article [L1 ] on high-performance XML (which subject, incidentally, ought also focus attention on tDOM.


27Sep02 Jacob Levy e4Graph has a very powerful XML binding, it is able to store XML natively and allow natural manipulation of XML data as tree structured data. It also has an excellent Tcl binding, and provides an extensible object model where Tcl procedures can be stored inside the graph and extend the functionality of nodes.

Here's an example of this idea:

 % load tgraph                   (1)                  
 % set s [tgraph::open foo.db]   (2)
 % set r [$x root]               (3)
 % $r add bar last hello         (4)
 % $r method square {x} {        (5)
         return [expr $x * $x]
   }
 % $r call square 5              (6)
 => 25

Explanation: line 1 loads the tgraph library, which contains the Tcl binding for e4Graph. Line 2 opens the storage 'foo.db' and stores the result in 's'. Line 3 makes 'r' refer to the root node of this storage. Line 4 adds a new vertex named 'bar' as the last vertex with the string value 'hello'. Line 5 defines the method 'square' which takes one argument, a number, and returns the square of it. Finally, line 6 invokes the method to compute the square of 5.


Category Package