Hi Peter,

thanks for including the SPIN API in your project.

I would like to better understand your changes (and there are tons of files to 
go through even in the diff!).

- What do you mean with global rules: aren't the rules already local to each 
execution of the inferencing engine? Or do you mean SPIN templates 
(instantiated by rules)?

- Have you looked at SPINThreadFunctionRegistry?

In my experience, it is perfectly common to have different contexts with 
different sets of available modules. A classical use case is a server that 
hosts multiple RDF models with different sets of functions. Since servlet 
requests are coming in on individual threads, doing thread-local variables as 
implemented by SPINThreadFunctionRegistry usually works for us.

Even if not, you can still have the SPINModuleRegistry as a singleton: 
instantiate a subclass that delegates to a thread-specific instance when 
called. This would allow you to stick to the original API without branching.

BTW we use git and maven ourselves with the SPIN API, but we also have a 
non-maven environment and build set-up due to the dependencies of SPIN with the 
Eclipse-based TopBraid product line.

Regards
Holger



On Nov 1, 2011, at 3:55 PM, Peter Ansell wrote:

> Hi,
> 
> I am using the open source SPIN API as one of the rule languages for
> the Bio2RDF webapp. To do so, I needed to be able to specify
> non-global rule and function registries to use for different
> situations within a single JVM instance. Otherwise rules that are
> meant for one location only may affect those used in other locations.
> 
> To remove the singletons, I downloaded the spin-api-1.2.0 source code,
> made up maven build scripts for it and hosted it on Github, before
> making the necessary changes today. There were quite a few changes, so
> I only mostly only preserved the original API for the functions that
> previously directly accessed the singletons, and none of the spin-api
> functions rely on those original functions, as I made them proxies to
> the configurable versions.
> 
> The relevant Git commit is at:
> 
> https://github.com/ansell/spin/commit/b34deea250334dfb45d49ff11b7631b869751cff
> 
> I don't mind signing over the copyright for that commit if you want to
> use this in the dual-licensed SPIN-API that you distribute. I am using
> SPIN-API in my AGPL queryall library [1], which is in turn used by the
> AGPL licensed bio2rdf-webapp [2] (and any other websites that want to
> use it, as it is a generic linked data server underneath).
> 
> Thanks,
> 
> Peter
> 
> [1] http://github.com/bio2rdf/queryall/
> [2] http://github.com/bio2rdf/bio2rdf-webapp/
> 
> -- 
> 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

-- 
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

Reply via email to