
  A FUNCTIONAL ("STATELESS") GRAPH SERVICE

------------------------------------------------------------------
  SERVICE                    
     |                         
     |                       CLIENT1
     |                         |
     | new                     |       a client requests the 
     |<------------------------|       creation of a graph
     | graph/e                 |
     |========================>|  
     |                         |
     | add                     |       a client can add an edge
     |<------------------------|       to a graph 
     | graph/e                 |
     |========================>|
     |                         |
     | join                    |       or join two graphs 
     |<------------------------|
     | graph/e                 |
     |========================>|
     |                         |       it can inspect the nodes
     | nodes                   |
     |<------------------------|
     | nodes/e                 |
     |========================>|
     |                         |       and the edges of a graph 
     | edges                   |
     |<------------------------|
     | edges/e                 | 
     |========================>|
     |                         |       and get its cost, too 
     | path                    |
     |<------------------------|
     | path/e                  |
     |========================>|
     |                         |

------------------------------------------------------------------

REQUESTS  
   new     = <new low=Cost high=Cost />
             creates a new graph from a cost interval 

   add     = <add from=NN to=NN cost=Cost> Graph </add>
             adds the (from,cost,to) edge to Graph
             if the edge preserves the triangle inequality 
             
   join    = <join>Graph Graph </join>
             adds the edges of the second Graph to the first Graph 

   nodes   = <nodes> Graph </nodes>
             extracts the set of nodes of the given Graph 

   edges   = <edges> Graph </edges>
             extracts the set of edges of the given Graph 

   path    = <path from=NN to=NN> Graph </path>
             determines whether there is a sequence of edges in 
             the given Graph that connect from with to
             if so: computes the cost and responds with a path/e
             if not: it responds with <false />

RESPONSES

   graph/e = Graph | Error 
             a complete Graph, optionally an error 

   nodes/e = <nodes> Node ... </nodes> | Error 
             a sequence of Nodes, optionally an error 

   edges/e = <edges> Edge ... </edges> | Error 
             a sequence of Edges, optionally an error 

   path/e  = <path cost=Cost> Edge ... </path> | <false /> | Error 
             a path: a cost plus a sequence of Edges, 
             optionally an error 

COMMON FORMS OF DATA

   Graph   = <graph low=Cost high=Cost> EdgeDescription ... </graph>
   Node    = <node name=NN />
   Edge    = <edge from=NN to=NN cost=Cost />
   Boolean = <true /> | <false />

   NN      = String, at most 20 ASCII chars 
   Cost    = String, convertable to real number 
   Error   = <error msg=String />
