Example of collisional node¶
Materials¶
This example uses some data from IDEDB, contributed by Johannes Postler. One collision is included. This example demonstrates a node constructed on an existing database [1]. The data are provided as an SQL dump for MySQL [2].
The Python files were derived from the empty example-node in the node-software by Guy Rixon during the Innsbruck tutorial of early 2013 [3]. They “wire up” just enough of the data to get the single collision to come out in XSAMS. This node is not complete and the software is not derived from the operational IDEADB node. The files suit the 12.07 version of the node software, which you need to download separately. When you have that tree of software installed on the demonstration machine, you should copy the first three Python files from this page into the directory NodeSoftware/nodes/thud/node/ [4]. You then need to edit NodeSoftware/nodes/thud/settings.py to get a runnable node. I’ve included on this page a settings.py that should work if your RDBMS is MySQL, set up according to the infrastructure checklist elsewhere in this tutorial package.
Recommended order of demonstration¶
This is an outline. Follow the node-software user-guide for the details. You will need to run through this sequence before the tutorial to make sure that you understand all the details and can avoid the traps.
Copy in the settings.py file so that Django can see the database.
Show how Django can create a models.py file by inspection of the database. [5]
Explain that one would now fine-tune models.py manually, with a text editor. Copy in the supplied models.py, replacing Django’s version.
Explain that the node software know knows the structure of the database but not how it maps to VSS2 or XSAMS. [6]
Copy in the dictionaries.py file [7], explain what it means, and demonstrate that the node now understands queries. [8]
Show the node’s capabilities document and explain how this links the node to the registry. [9]
Show how to test the node in the TAP validator.
Optionally, show how to enable the node software in a production-quality web-server.
Footnotes