The Web Graph Database

wiki:Docs/ModelModuleAnatomy

Anatomy of a ModelModule

General

Any Module, regardless whether it is a StandardModule or a ModelModule, is distributed in two parts:

The ModuleAdvertisement tends to be small and thus can be downloaded very quickly, while the JAR is often orders of magnitude larger. By allowing independent download of the ModuleAdvertisement, it becomes more viable to implement software architectures in which applications can dynamically evaluate Modules on the network for possible use during the current application run. InfoGrid originally implemented this architecture to enable Java WebStart-based rich client applications to learn about, and possibly add, additional available Modules at run-time.

ModelModuleAdvertisement

The ModuleAdvertisement of a ModelModule is automatically generated by the build process from the ModelModule's model.xml file that defines its Model.

As part of the default build process:

  • the model.xml file is exported not using the generic model.xml name that is used by developers to define it, but using the name of the ModelModule and potentially a version identifier with a .xml extension. If the ModelModule was named com.example.mymodel, the exported Model file would be named com.example.mymodel.V.xml.
  • the generated ModuleAdvertisement is exported using the name of the ModelModule and potentially a version identifier with a .adv extension. In the example above, this would be org.example.mymodel.V.adv.
  • the XML form of the ModuleAdvertisement is translated in a more efficient form using Java object serialization. This is an alternate form of the ModuleAdvertisement, named org.example.mymodel.V.ser.
  • both ModuleAdvertisement forms are also included in the Module's JAR file at location infogrid-moduleads/.
  • the Model file is included in the Module's JAR file at location infogrid-models/.

See also:

Last modified 5 years ago Last modified on 07/17/09 19:16:15