>-----Original Message----- >From: Carsten Ziegeler [mailto:cziege...@apache.org] >Sent: Tuesday, September 12, 2017 7:41 PM >To: dev@sling.apache.org; Stefan Seifert >Subject: Re: [RT] Context-Aware Services - Multitenancy for SPI >implementations
>If I understand correctly, you do the matching based on the path which >avoids the need of introducing an explicit concept of a tenant. On the >other it requires you to have a corresponding resource or request. I >assume for most of the use cases this works as they are request bound >anyway. And even for background tasks you should have at least some >resource. I guess this should be sufficient. yes. in an earlier implementation for the same use cases i had something like a "tenant" concept which defined the path mapping (or even custom logic to select the tenant) centrally, and the service implementations were only mapped to the tenant. but i had the feeling this was already too complicated and simplified it as described in this post. >I'm a little bit worried about the reliability, for example if a bundle >providing a specifc SPI interface is currently not active, you get >(temporarily) a different result. This might be fine as well. in our experience this is ok. for most SPIs there is a "catch-all" default implementation with the lowest service ranking providing a sensible default implementation which would step in here. stefan