On Nov 1, 2011, at 5:07 PM, Peter Ansell wrote: > Hi Holger, > > The webapp resolves queries across a large number of different > datasources using a range of different normalisation and > denormalisation rules depending on the users context and the data > location. So far, I have only implemented Regular Expression, XSLT and > SPARQL Construct rules. SPIN is another rule method that people can > use to create rule modules that they can then apply to any or all of > the datasources and queries as they feel necessary. > > The SPIN model of applying a set of rules is well designed and suits > the overall goals, but I don't want all of the known rules to apply to > each request. Each of the SPIN normalisation rule modules in the > system reference the SPIN functions/templates that they are relevant > to and only apply those functions/templates when they are used in the > overall rule chain. > > The registries will only be created once for each of the SPIN > normalisation rule modules for each servlet lifetime, but they need to > be segregated.
I apparently don't have enough background to fully understand this, so apologize my naivety. To me (and Jena), the library of registered SPARQL/SPIN functions is global. Even if you have different rule sets or queries, there is no harm in having a single global registry of all functions. The other functions simply will not be used but they are there in principle. What matters is the selection of spin:rules and spin:constraints and this is not controlled by the module registry. In a couple of applications that we have developed, all functions and templates are loaded in the beginning, from all .spin.* files. For cases like TBC where additional functions may be visible from the currently open file, we use something like the SPINThreadFunctionRegistry, set up when the thread starts. SPINModuleRegistry itself is not thread-safe, and you would need to control access to it from the surrounding code. Holger -- You received this message because you are subscribed to the Google Group "TopBraid Suite Users", the topics of which include TopBraid Composer, TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/topbraid-users?hl=en
