Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

Context Aware Configuration for multi tenant site

Avatar

Level 3

Hello AEM Folks,

 

Need your suggestion whether to use Context Aware Configuration for below use case or not !

 

I have two different sites. both sites has number of configuration page i.e 1.config, 2.config and each config has different set of component containing the site specific configuration.

 

site A --> configuration Page  --> Components [1. marketo configration, 2. merchant services configuration, 3. feed configuration]

site B --> configuration Page --> Components [1. marketo configration, 2. merchant services configuration, 3. feed configuration]

please note : the configuration differs for siteA and B both.

 

Now, Do you recommend to use sling context aware configuration?

Is it advisable to use it when you have site specific configuration in large amount? Looking for your suggestion/better approach to achieve it.

 

#AEM #CAC

 

~Ravi

 

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

To deal with site specific configurations it is advisable to Context aware configuration over OSGi configurations.

OSGi configuration is runmode specific.

 

In your case , site specific configuration page is having different set of component containing the site specific configuration. If I draw a relation between configuration page and components, then it's 1:m relation. Please correct me.

 

Now my question would be, all the no components will be reading same configuration from that specific configuration page? If yes, then please create a utility context aware configuration code and it will help you to avoid code duplication.

 

 

View solution in original post

9 Replies

Avatar

Community Advisor

Yes, you can use CAC for managing configurations.

Do not flood page properties and that can have issues with content back staging.

 

Keep configurations separately. 



Arun Patidar

Avatar

Community Advisor

Hi @ravijais04 , 
Yes, Use Context aware configurations. It will give you flexibility to have separate configuration for different content hierarchy within same site. Make sure you use only configurations which not dependent on runmodes. means configurations are same for all run modes.

Avatar

Correct answer by
Employee Advisor

To deal with site specific configurations it is advisable to Context aware configuration over OSGi configurations.

OSGi configuration is runmode specific.

 

In your case , site specific configuration page is having different set of component containing the site specific configuration. If I draw a relation between configuration page and components, then it's 1:m relation. Please correct me.

 

Now my question would be, all the no components will be reading same configuration from that specific configuration page? If yes, then please create a utility context aware configuration code and it will help you to avoid code duplication.

 

 

Avatar

Level 3

Thanks Debal. 

Actually, configuration is not same when 1:M.

Components will contain different meta data/details for its corresponding site, meaning different configuration for site A and different for site B.

 

my only concern is since there are number of components. Hence, configuration data will be huge for each site under /conf/content/siteA and /conf/content/siteB.

 

I am just looking to optimize it. Do you recommend redesign the configuration/metadata into properties (key value pair), instead of having them in the component. Any insight into this?

Avatar

Employee Advisor

I was saying if you are planning to use same configurable values across multiple components with following relationship  1(configuration page):m (no. of components) for a specific site, then  create a utility context aware configuration code and it will help you to avoid code duplication.

 

Here you are having multiple configuration pages per site itself. Am I correct?

1. Could you please help me to understand the content architecture of individual site along with configuration page.

 

2. Components like marketo configration, merchant services configuration and feed configuration will be used on configuration page only. Please confirm.

 

Avatar

Level 3

Hi Debal,

 

please note the following :

 

1. component configuration is not same for both site.

2. Yes, multiple configuration pages per site.

3. site structure will be like for SiteA :

            /content/siteA/siteconfiguration/confiurationPage1

            /content/siteA/siteconfiguration/confiurationPage2

            .

            .

            /content/siteA/siteconfiguration/confiurationPage8

 

the same structure will be for siteB as well i.e.

          

            /content/siteB/siteconfiguration/confiurationPage1

            /content/siteB/siteconfiguration/confiurationPage2

            .

            .

            /content/siteB/siteconfiguration/confiurationPage8

 

4. Yes, you are right. components like marketo configrationmerchant services configuration and feed configuration will be used on configuration page only.

 

~Ravi

 

                       

Avatar

Employee Advisor

Hi @ravijais04 ,

 

Before finalize the optimize solution, I would like to ask below questions -

 

1. Who will be responsible to add configurable values on those configuration page? Will it be content authors?

 

2. You want to read those configurable values using following components  marketo configrationmerchant services configuration and feed configuration right?

Avatar

Level 3

Hi Debal - Thanks for the response !

I am good now with using context aware configuration for my use case.

Answer to your question is : Authors are gonna add the configuration to component configuration for which I will create the OSGI config classes.

 

Now, Only challenge I have is authoring the configuration. So, exploring on how I can get the CAC editor.

I have raised the query here for it  -https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/context-aware-configuration-editor/m-p/538995#M133889

 

Is there any other simple way to get WCM.IO CAC editor outside ACS Commons, just by configuring POM in addition to the solution Arun Provided.

 

~Ravi