On 10/5/10 13:26, Donald Whytock wrote:
Hi all...

I have an efficiency question.  I have a bundle kicking off a small
number of instances (typically one but could be more) interacting with
a larger number of bundles.  At the moment I have the large group
kicking off services with names that the small group of instances
tracks.  I'm considering more of a whiteboard pattern with the
instances launching services specifying the names of the bundles
sought, and the bundles tracking the services.  Either way, the
instances will need to track the states of the bundles.

So which is more efficient?  A large number of servicetrackers
tracking a small number of services?  Or a small number of
servicetrackers tracking a large number of services?

Not sure. Someone has to do the filtering and delivery, you are just changing where it happens, it seems.

If you were doing service queries based purely on objectClass, then it would probably be quicker to let the framework do the event filtering and delivery, since it indexes this value. However, it sounds like you are using some other "name" service property to do your filtering, so it probably doesn't matter much.

The indexing mechanism the framework uses is actually generic, so technically it is possible to have it index other service properties. I had thought about making a configuration property for this purpose, but it hasn't been a priority.

If this is something that sounds interesting to you, you could open up a JIRA issue for it. You could experiment with it by simply modifying the constructor of the org.apache.felix.framework.ServiceRegistry class to hard code the name of the service property you want indexed.

-> richard

Don

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to