- One of the things we need to be able to do is to choose particular service implementations at startup time, based on property or preference settings. In particular, I'd like to be able to swap out all remote services in favor of local (dummy) services based on a single property value; or choose local over remote on a service-by-service basis. The only way I can think of to do this sort of thing in a general way would be to have some kind of boolean expression associated with a service implementation that tells HiveMind whether to use that implementation or to go on to the next available implementation. (I guess I'm thinking OGNL or something equivalent.) Any thoughts on how I could accomplish this within the current HiveMind implementation?
I've thought about this as well. The approach I'm going to explore is
a "broker" core service implementatation factory. It will be provided with descriptions
of other services and can dynamically select one.
So, you might have module.PublicService by the service id referenced in your code (or injected into
other services). Its builder will select either module.StandardService or module.DebugService at
runtime.
Would this be limited to the builder or could it be extended to include run-time dynamic service lookups too? I have on a couple of occasions had to write a simple broker to select the correct implementation at runtime - several services implement the same interface and register with the selector by injecting their meta-data into its configuration.
Now, the meta-data in these cases was very simple (for example, just an id and a service-id) and making this generic is much a bigger job but having this ability within HiveMind (and therefore not having to 'cook' a new broker for each service interface that requires it) would be great. I guess what it boils down to is that I miss the selectors in Avalon a little but that is the only thing i do miss :)
Johan
-- you too?
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
