Sunday, June 28, 2020

AEM importing contents from external systems

AEM importing contents from external systems

1. Day CQ Polling importer : Can be configured using osgi config manager. Allowed paths can be /etc or /content or /var. Imports RSS feed on intervals and saves it for use.

2. Bulk Editor : Deprecated from AEM 6.4. It allows to search for contents, bulk edit them and export them in csv file.

3. eCommerce Product Importer : Tools - > ecommerce -> product import. You can also create the products and their variants there.

4. Sling Post Servlet : CSRF and Referrer filters have to allow post action. Using this content zip can be imported. 

5. Package manager : This can also be used to migrate users from different instances. Exclude rules should be applied. Change mode in filter to merge before importing package to other instance. This will ensure the existing users are not replaced.

6. CRX3Oak migration 

7. ACS migration can be used to migrate users, groups and ACLs.



AEM workflow in brief

AEM workflow in brief

  • Workflows can help automating the aem activities. For example adding image renditions on load
  • Workflows have steps to be executed. For example activating a page or sending emails
  • Each steps can be assigned to designated users. For example reviewers, authors
  • Workflow can be triggered automatically on events. For example a node is added, a property is changed, or page is submitted for review etc
  • Workflow launch can be used to trigger the workflow on specific events
  • Workflow's performance can be monitored 
  • Workflows can be offloaded to stand by instances
  • Workflows can be configured to be transient to save disk space
  • Workflows can be purged to make more disk space
Elements of workflows :

  • Participants
  • Process steps (implements WorkflowProcess)
  • Container (sub workflows)
  • Or split/join
  • And Split/join
  • Payload
  • Life cycle




Saturday, June 27, 2020

Sling Distribution

Sling Distribution

The Sling Content Distribution module main goal is allowing distribution of content (Sling resources) among different Sling instances. The term "distribution" here means the ability of picking one or more resources on a certain Sling instance in order to copy and persist them onto another Sling instance. The Sling Content Distribution module is able to distribute content by:
  • "pushing" from Sling instance A to Sling instance B
  • "pulling" from Sling instance B to Sling instance A
  • "synchronizing" Sling instances A and B via a (third) coordinating instance C
Distribution Agents Configuration:

These are osgi configurations. These could be
  • Forward
  • Reverse
  • Queue
  • Sync
Usecases :

  1. Forward distribution : Transfers contents from author to publish instances
  2. Reverse distribution : From publish instance to author instances (UGC contents). 
  3. Sync distribution : Transfer contents to two publish instances via author instance.
  4. Queue distribution : Sending contents one by one. This is not feasible for production.
Example & scenarios :

User Synchronization in AEM using sync distribution
  • users, user profiles and user groups created on publish are not created on author
  • Sling distribution sets properties in jcr events, making it possible to act within publish-side event listeners without concern for infinite replication loops
  • Sling distribution only sends user data to non-originating publish instances, eliminating unnecessary traffic
  • ACLs set in the user node are included in the sychronization
When the topology is a publish farm and user sync has been correctly configured, the user and user profile is synchronized across the publish farm using Sling distribution.








Tuesday, June 23, 2020

AEM DevOps Tips

AEM DevOps Tips

1. Disable WebDav on Publish instance by stopping following bundles.

  • Apache sling Webdav access
  • Apache sling simple WebDav access to repositories
2. Garbage collection can be invoked using jax console com.adobe.granite%3Atype%3DRepository
  • runDataStoreGarbageCollection
3. Remove unwanted packages

4. Revision Cleanup. Please read here

5. Take backup of /content, /etc and /dam using package manager

6. No user should do changes using crxde. All changes should come from Code

7. /etc/versioning/purge.html can be used to purge the versions created while activating pages.

8. Workflows should be purged when not required. This can be done using osgi service - Adobe granite Workflow purge configuration

9. Audit log purge can be performed by configuring audit log purge service in osgi. Once the rule is created, it need to be exposed in operations dahsboard page. You can create weekly maintenance window page and configure the same at tools-operations-maintenance 

10. Log level should be info

11. Search index should be created and maintained.

12. Change password of AEM and Osgi console

13. Create jenkins pipeline for AEM project.
  • configure webhook in git which triggers build when changes are merged.
  • confiure jenkins job with git repository and configure build trigger ass push event and merge.
  • provide script (buildscript.sh) to deploy aem code to author and publish servers.

Sunday, June 21, 2020

AEM Forms

AEM Forms

Types :

PDF forms : Can be filled offline and the data is sent when you're online next.

HTML forms : Can be viewed on mobile and desktop. Can be signed using scribble or esign service.

Adaptive forms : Dynamically changes as per user inputs. Reusable XML templates to create the form.

All form types support the following features:

  • Dynamic layout
  • Form field validation
  • Context-sensitive Help
  • Scripting and XML data handling
  • Accessibility design and checking
  • Ability to save forms on the server-side
  • Support for file attachments
  • Integration with HTML Workspace for Data Capture
Forms workspace can be used to save the data offline and the data can be synchronized the next time you're online.

Forms can be used for personalized communication

Forms can be created using :
  1. Form data model : RDBMS data table rr similar database system.
  2. XDP form template : If you already have XDP form, those can be converted to AEM forms easily.
  3. XSD Schema or Json : Structure of the form can be determined using xsd or json
  4. Without a form model
guideContainer is the root of the form. This component can have following nodes
  • Mobile UI
  • Thank you page
  • Submit action
  • Styling
rootpanel is the main panel inside which there can be subpanels

toolbar can be attached to the form

assets contains additional information regarding form.

Automated form conversion service helps in converting pdf forms to adaptive forms.

Interactive communication : 

Interactive Communications centralizes and manages the creation, assembly, and delivery of secure, personalized, and interactive correspondences such as business correspondence, documents, statements, marketing mails, bills, and welcome kits. Interactive Communications can be delivered using two channels: Print and Web.

Building blocks of interactive communication are data model, document fragment, templates.

Interactive communication can be created using forms console on author.

Interactive communication can be sent over email by configuring email client.

AEM forms reference collaterals : Reference site for the form.

Deployment topology for AEM Forms : 

AEM forms architectural components :
  • AEM services
  • Forms Sevices
  • Web layer for authoring, rendition creations, submissions and REST API

AEM Forms can be be on OSGI or JEE

AEM Forms authoring user interface does not support creating Document of Record (DOR), PDF Forms, and HTML5 Forms. Such assets are designed using the stand-alone Forms Designer application and uploaded individually to AEM Forms Manager.

There can be three instances for AEM forms - Author, Publish and Processing. On processing instance no user is assigned to forms manager. This ensures only processing of the forms happen on this instance. Which can be processing raw forms data arriving from a publish instance and secure storage for the forms data. Post processing and HTML workspace hosting can be there. HTML workspace hosting is used for review and approval of the forms.

Processing instance takes the data from publish using reverse replication so it is configured as author instance. It also utilizes the AEM workflows.


Please read here for 5 recommended topologies 

Choosing persistence type for for and AEM forms installation : MongoMK or RDBMK

Synchronization scheduler for assets

AEM DS Setting service configuration is required for adaptive forms when the forms are submitted from publish instance.

Adaptive forms cache can be useful to retrieve previously filled data and to reduce the loading time of a form.

AEM forms can be connected to LiveCylce and connection to microsoft sharepint happens through livecycle connector.

AEM Desktop app to connect to AEM forms. Desktop app uses webdav to connect to AEM instance.

Forms user groups - forms-user, forms-power-user, forms-submission-reviewers, template-authors, fdm-authors, workflow-editors, workflow-users, fd-administrators.

Add non supported locale for forms using following
  • Add a locale to the GuideLocalizationService service
  • Add XFA client library for a locale
  • Add adaptive form client library for a locale
  • Add locale support for the dictionary
  • Restart the server 









AEM Security

AEM Security

Run AEM in production ready mode. i.e. set run mode nosamplecontent. 

  • Webdav is enabled for author but disabled for publisher
  • Mapped contents and debug is disaled for script handler
  • CQ WCM edit filter is enabled to author but disabled on publisher
  • HTML Library manager is enabled for minify and gzip. Disabled for debug and timing
  • Get servlet is set to support secure configurations
Enable HTTPS

Install security hotfixes

Change default passwords for admin and osgi console admin accounts. To change osgi password go to OSGI management console in configMgr.

Implement custom error handler

Configure replication and transport users

Check the operations and security health check dashboard

No example contents should be there

CRX development bundles should be disabled
  • Adobe crx support
  • Adobe granite crx explorer
  • Adobe granite crxde lite
Sling development bundle should be disabled

Configure Referrer filter services using Sling Refeffer filter. Provide allowed hosts. This protects from cross site reference attack.

Control selectors so that only the required selectors get results and other return 404.

Prevent output of unlimited number of content nodes.

Set the depth of json rendering

Use firewall to limit the access to your instance

Disable advance search requires in WCM form chooser servlet

AssetDownloadServlet is disabled by default to prevent dos attack caused by asset downloads

Prevent click jack by providing header - X-FRAME-OPTIONS set to SAMEORIGIN


The XSS protection mechanism provided by AEM is based on the AntiSamy Java Library provided by OWASP (The Open Web Application Security Project) . The default AntiSamy configuration can be found at
/libs/cq/xssprotection/config.xml











Saturday, June 20, 2020

AEM Community

AEM Community

AEM Communities allows companies to create dedicated branded community experiences from a library of site templates. Forums, groups, blogs, file sharing, calendars, activity feeds, and extended user profiles can be integrated into your website to foster interactions between propsects, customers, and companies.

Key terms :

Social component framework : Components designed to enable community interactions
Community Functions : Pages with community based implementations like forms, questions answers etc
Community Groups : Sub community that provides hierarchy
Social Resource Provider : Persistence layer for the user generated contents.


For AEM Communities
The author environment is for

  • Development of sites, templates and components
  • Administrative and configuration tasks

The publish environment is for


  • The community experience of posting and moderating content
  • Creating community groups, members and member groups
Steps involved :

  1. Set up author and publisher instances
  2. Configure Analytics
  3. Configure emails for notifications
  4. Enable tunnel services : Helps in assigning roles to community members
  5. Create community administrator role : community administrators, community enablement managers
  6. Enable social login (requires oauth setting)
  7. Create tutorial tags
Storage resource providers (SRP):

Adobe storage resource provider (ASRP) :

The UGC is stored on adobe hosted and managed cloud storage.
Suitable for TarMK publish farm.

MongoDB storage resource provider (MSRP) :

Requires local solr
Suitable for TarMK publish farm
Suitable for MongoMK and RDBMK
Suitable when large volume of UGC expected

Relational database storage resource provider (DSRP) :

Requires local MySQL
Requires local Solr
Suitable for TarMK publish farm
Suitable for MongoMK and RDBMK
Suitable when large volume of UGC expected

JCR storage resource provider (JSRP) :

Storage is persisted only on local JCR repository.
Requires publish cluster
Not a good option for commercial deployments

UGC is never replicated

Do not assume there is JCR nodes use UGC APIs.

User related data is replicated on other publishers using sling distribution.

Dispatcher caching should be disabled for users and social json calls.

Community site can be created quickly using community site wizard.
  1. Choose site template and provide basic details like title, language, description
  2. Select site theme/design
  3. Banner image
  4. Settings like users, roles, tagging, moderation, analytics, translation etc
  5. Publish the site
  6. You can also configure default home page and modify the site as requirements
All communities contents go through anti-samy xss protection.

Attachments can be blacklisted using DefaultAttachmentTypeBlacklistService








SPA in AEM 6.5

SPA in AEM 6.5

SPA is single page application.

Rendering is done using JavaScript and AJAX.

AEM SPA editor allows front end developers to create SPAs that can be integrated with AEM allowing authors to edit the contents as easily as other aem contents.

In a traditional, sequential webpage, only the data needed for the immediate page is loaded. This means that when the visitor moves to another page, the server is called for the additional resources. Additinoal calls might be necessary as the visitor interacts with elements on the page. These multiple calls can give a sense of lag or delay as the page has to catch up with the visitor's requests.

By rendering on the client side, page element react faster, and interactions with the page by the visitor are immediate. Any additional data that might be needed is called asynchronously to maximize the speed of the page.

React script is primarily responsible for retrieving the components and showing the pages.

AEM SPA editor leverages AEM Content services to deliver the entire content of the page as json model.

The front end developer creates the components and owns the page structures but relies on AEM for content structure of the site.

SPA Developing principles :


  • Portability
  • AEM drives the site structure
  • Dynamic rendering
  • Dynamic routing
Steps :
  1. Make your js component modular
  2. Use AEM page and paragraph system to put the components on screen
  3. Create AEM component for each js component as AEM component defines dialog and json.
  4. Component mapping module should be included in NPM. This helps in mapping front end components with AEM resource type
  5. Following dependencies required in package.json
    1. @adobe/cq-react-editable-components
    2. @adobe/cq-spa-component-mapping
    3. @adobe/cq-spa-page-model-manager
  6. Application entry point page component to be defined
  7. Create mappedComponents.js and add it in index.js. mappedComponents.js will have details of the all js components those map with AEM components.
  8. In all SPA component, import MapTo from @adobe/dq-react-editable-components and add MapTo in the end of the component.
  9. this.props.propertyname will give you the value of property configured in dialog.
  10. Create appropriate AEM components with SlingModel (with json exporter). 
Tutorials :

You can find tutorials here.









AEM Oak queries and indexing

AEM Oak queries and indexing

Oak doesn't index contents by default.

Indexes are configured as nodes in repository under oak:index node with the type oak:queryIndexDefinition.

Property Index :

1. Go to crxde, under oak:index create a new node with name PropertyIndex and type oak:queryIndexDefinition
2. Set properties - type:property and propertyNames:propertynames of the node

Ordered Index :

Deprecated. Lucene index is to be used instead.

Lucene Full Index :

Index is update asynchronously by background thread.

1. Go to crxde, under oak:index create a new node with name LuceneIndex and type oak:queryIndexDefinition
2. Set properties - type:lucene and async:async of the node

Lucene Property Index :

1. Go to crxde, under oak:index create a new node with name LucenePropertyIndex and type oak:queryIndexDefinition
2. Set properties - type:lucene, async:async, fulltextEnabled:false, includePropertyNames:Nameofproperties of the node

You can provide custom analysed for lucene. Analyser can have tokenizer, tokenfilters and charfilters.

Solr can also be used. It can either be a embedded solr configuration or external solr server.

You can debug the AEM queries using query debugging or MBean output  -

http://serveraddress:port/system/console/jmx


Best Practices :

Explain query tool can be used.
Traversal or prefetching results should be preferred over queries in components
Indexes should be in place
Instead of large queries, break down the queries in small and then combine the results as and when possible.
Set limits of the queries execution
  • -Doak.queryLimitInMemory=500000
  • -Doak.queryLimitReads=100000
Use lucene indexes wherever possible
Solr should be used when the server capacity is limited.
External solr should be used only when required as it introduces letency
Optimize indexes so that queries can run faster. Like using evaluatePathRestrictions, sorting, only put required contents in the indexes, define rules for node types in indexes, indexes for the paths where queries would run
If your nodestore is at a different place, do copyonread
Oak indexes should not be reindexed until oak index configuration has changed or binary is missing/corrupted.

Text Pre-Extraction of Binaries

Process of extracting and processing texts from binaries directly from data stores via an isolated process.

Useful when Lucene reindexing is done for the large volume of binaries with readable texts like pdfs, docs etc when full text search is expected.

Useful when supporting the new Lucene indexing.













Assets Monitoring

Assets Monitoring:

Following tools can be used for assets monitoring in AEM.

1. Virtual VM : JVM memory monitor

2. TOP : A command that opens dashboard

3. HTop : Provides information on CPU and memory usage.

4. IOtop : for disk IO usage

5. IFTop : ethernet/network usage

6. workflow console

7. MXBeans

8. AEM Monitoring

  • Replication agents : 
    • /system/console/jmx/com.adobe.granite.replication:type=agent,id=”<AGENT_NAME>”
  • Session counter :
    • /system/console/jmx/org.apache.jackrabbit.oak:id=7,name="OakRepository Statistics",type ="RepositoryStats"
  • System check :
    • /system/console/jmx/org.apache.sling.healthcheck:name=systemchecks,type=HealthCheck
  • Replication Queue :
    • /system/console/jmx/org.apache.sling.healthcheck:name=replicationQueue,type=HealthCheck
  • Response performance :
    • /system/console/jmx/org.apache.sling.healthcheck:name=requestsStatus,type=HealthCheck
  • Query performance :
    • /system/console/jmx/org.apache.sling.healthcheck:name= queriesStatus,type=HealthCheck
  • Active bundles :
    • /system/console/jmx/org.apache.sling.healthcheck:name=inactiveBundles,type=HealthCheck
  • Log errors :
    • /system/console/jmx/org.apache.sling.healthcheck:name=logErrorHealthCheck,type=HealthCheck
Run TarMK compcction often
Check out of memory logs
Look for unindexed queries and tree traversals 
Use workflow console
Upsize AEM Server



Wednesday, June 17, 2020

AEM eCommerce Integration

AEM eCommerce Integration

Refer these slides


Audience Manager

Audience Manager

Adobe Audience Manager. A data management platform that helps you build unique audience profiles so you can identify your most valuable segments and use them across any digital channel. Understand your audiences - get a complete view of your audience by combining all of your data sources in one place.

It is a data management platform (DMP)

Three functions of Audience manager are :

  • Data in : AAM collects data from different channels using Analytics, CRM, device data etc)
  • Audience creation and identity management
  • Data out : Activates audience segments for demand side platforms (dsps), campaign management systems and marketing platforms
Features :

Data collection and centralization
Segmentation and management of data
Targeting and optimization


Supported integration methods in AEM :

  • Real time 
  • Batch (server to server)






Adobe Analytics

Adobe Analytics

Tool to perform web analytics services used in the measurement, collection, analysis and reporting of web data for purposes of understanding and optimizing web usage.

Web analytics provides information about the number of visitors to a website and the number of page views. It helps gauge traffic and popularity trends which are useful for market research.

Analytics helps in creating better customer experience and subsequent benefits to the business.

Analytics can provide following types of variables.

TRAFFIC VARIABLES (PROPS / S.PROPS): Traffic variables count the number of times each value is sent to Analytics. Example: When a visitor opens are page , a prop can be used to increment the existing count.
EVENTS: Events are completed visitor actions on your website. Examples of custom events might be login, registration, and signup.
CONVERSION VARIABLES ( EVARS) are used to identify how well specific attributes or actions contribute to success events on your site. Example: When a visitor clicks on the internal promotion, an eVar can be used to store a unique identifier for that promotion.

There are several analytics tools that can be leveraged with AEM.

Analysis workspace/launch
Report and analytics
Adhoc Analysis
Report Builder (From Microsoft)
Data warehouse
Data workbench

Deployment Scenarios for adobe analytics :

  • Using dynamic tag management
  • Mobile deployment
  • Video deployment using video heartbeat
  • Global report suites and individual report suits
  • Using launch


Use AEM integration with Analytics and target for following benefits :


  • Optimizing landing page to promote different services
  • Increase revenue and customer satisfaction
  • Increase online sales
  • Increase new visitors
  • Customer focused campaigns
  • Measure shopping cart abandonment
  • Generate leads
  • Advertising
Solution Architecture :

Inputs (how data can be sent to Analytics) :

1. Javascript Tags : place analytics javascripts code within the pages, which in turn sends data to analytics. DTM tobe used to manage the js files. 
2. AppMeasurement libraries :useful when javascripts are not compatible to the device like mobile apps.
3.  Data sources : Used to upload offline metrics. When javascripts are disabled. 

Outputs :

1. Adobe DMS interface : To see the data on various devices.
2. Data reports : To be sent out to different business users.
3. Excel integration : To pull data directly into Excel.
4. Reporting API
5. Live stream : provides data in 30-90 seconds. Live streaming.
6. Data warehouse reports : Adhoc data reports


Analytics can connect third party tools like Gigya, Kampyle, tracking first, lyric, hybris, tableau

Analytics + AEM can achieve :
  • easy and automatic deploy of analytics on all digital managed properties
  • have best analytics practices 
  • in-context analytics for content authors
Analytics + Target can achieve :
  • leverage analytics data collection to enrich customer experience and target campaigns.
  • deeper segmentation and behavioral breakdown
  • optimize target results


Tuesday, June 16, 2020

AEM Performance Optimization Tips

AEM Performance Optimization Tips


  • 10% of the project efforts should be allocated to performance.
  • Performance optimization is ongoing activity and should have more preference after the go live where the real load comes into the picture
  • Simulate real scenarios
  • Establish solid goals
  • Take one bottle neck at a time
  • Guidelines 
    • 70% of the pages should take 100ms
    • 25% of the pages should take 100-300ms
    • 4% pages should take 300-500ms
    • 1% of the page should take 500-1000ms
    • No page should take more than 1000ms
  • Focus on dispatcher caching efficiency
  •  use of queries
  • No of child node should not exceed 1000 nodes
  • use java profiler
  • use performance monitor
    • collect as much information as possible before making optimization decisions
    • try to replicate
    • observe changes in code
    • check if the issue occurs only during certain time
  • monitor search request timing
  • limit the concurrent workflow processing
  • configure maximum parallel jobs
  • Do error scenario tests
  • Endurance tests
  • Dispatcher Tuning 
    • Calculate the dispatcher cache ratio : Pages served from cache vs page served from publisher
    • Consistent page encoding
    • Avoid url parameters because pages with parameters do not get cached. Use selectors instead.
    • Put title image file in the same location as page so that it can be invalidated when the page is updated.
    • Same way invalidate the image files used as navigation texts
    • Avoid free customization of pages and provide say a definite number of customized pages so that they can be cached.
    • Use sticky connections if possible.
  • Read here for backup performance in detail
  • set queue.maxparellel to 50% of your CPU capacity
  • create indexes for the queries most frequently searched
  • set -Doak.queryLimitMemory
  • set -Doa.queryLimitReads 
  • set -Dupdate.Limit
  • set -Doak.fastQuerySize = true
  • For Lucene Indexes set enable copyOnRead, copyOnWrite, Prefetch Index Files
  • While using file data store set the value of cacheSizeInMB and maxCacheBinarySize
  • Use offline compaction for TarMK
  • Allow all css and js to combine into clientlib.css and clientlib.js respectively
  • minify the files
  • Use MongoMK on author only and only if high load of concurrent users expected. E.g. 1000 users or more

Monday, June 15, 2020

AEM Personalization

AEM Personalization :

AEM OOTB personalization is the feature that allows you to display different experiences based on the audience as per the content of their interest.

ContextHub is a framework for storing and retrieving client-side data. It provides a JavaScript API that enables the manipulation of the ContextHub. A ContextHub store is a place where you can persist and access data.

Following steps are needed to create AEM Personalization experience :

1. Configure context hub
2. Configure audience (A user will belong to one or the other audience)
3. Configure brand and activity
3.1 Create brand
3.2 Create activity (mapping experience to audience)
4. Start targetting. I.e. in edit mode you'll need to select target and change contents according to the audience. For that contexthub will have to be added on your page component.
5. Adobe Target can be used for targetting instead of contexthub
6. Contexthub includes HTML5's Geolocation API as it's capabilities.
7. Geolocation can be obtained using adobe target/audiece manager as well.


There are three main elements involved in personalization:
1. user
2. content
3. rule

Jargons :

Client context : Mechanism that provides you detail about current page and visitor of the page. It has

1. Session stores : Client context can have various session stores with different user data. there are two types of session stores. cq analytics session store, cq analytics persisted session store.

2. Context store components : These are context stores. These can be added to client cotext.

3. UI to display user data : This one is used for view the client context data.

4. JavaScrip API : Used to initialze the session store data.



Read this for more detailed understanding





AEM assets performance tuning

AEM assets performance tuning :

TarMK should be used preferably.

TarMK workflow offloading should be used to improve workflow task processing power.


Platform :

To improve asset upload times, use high performance storage for the Java temporary directory. On Linux and Windows, a RAM drive or SSD could be used. In cloud-based environments, an equivalent high speed storage type could be used. For example in Amazon EC2, an ephemeral drive drive can be used for the temporary folder.


JAVA :

Set following parameters :

-XX:+UseConcMarkSweepGC : Used for tenured generation collection. Does concurrent collection with the execution of application.
-Doak.queryLimitInMemory =500000 : limits query execution in tern limits to memory used  by query execution
-Doak.queryLimitReads =100000 : Limits the queries that traverse many nodes.
-Dupdate.limit =250000
-Doak.fastQuerySize =true

Data store and Memory configuration :

Separate data store from segment store.
Configure the values of maxCachedBinarySize and cacheSizeInMB.
Configure CQBufferedImageCache at  https://host:port/system/console/configMgr/com.day.cq.dam.core.impl.cache.CQBufferedImageCache

Using shared data store :

Implenenting s3 or shared file datastore

Network Optimization :

Wired connections preferred for large sizes of assets
Create network sizing spreadsheet
Ensure sufficient bandwidth
If it is hosted on AWS, you can use versatile scaling policy
Use https

Workflows :

Use transient workflow
If you have non transient workflow - use acs tool to remove the workflows when no needed
Set half of the number of processors to do the workflow jobs parallely.
avoid rendition generation at ingestion time, instead use run time rendition generation using servlets or alternatively use scene7.
If you're using imagemagik, modify policy file so that all available diskspace is not occupied.
xmp write back should be disabled if not required

Replication :

When replication large number of assets to number of publishers, chain replication should be used. i.e. Author replicates to single publisher and then publisher replicates to other publisher and so on.

Indexing :

Please read here






Thursday, June 11, 2020

AEM Newsletter

AEM Newsletter

AEM Newsletter can be created to distribute the product information/ related details using email. For example, consider a digital marketer that wants to promote events around a specific product. By creating an AEM newsletter, they can raise awareness of the product. Newsletter can have images, texts, links (to videos). This newsletter can be used as part of Adobe campaign as email campaign.

You can create newsletter using existing contents as well as provide new contents.

AEM allows you to manage newsletters, archive them and view the statistics.

In order to configure newsletter, you need to configure email notifications via osgi. Email service can be configured by configuring - Day CQ mailservice. SMTP server port, SMTP server host and from address must not be blank. Configure from email by providing config for com.day.cq.wcm.notification.email.impl.EmailChannel.

You can also personalize the newsletter by providing different variables like username, firstname, lastname, email, salutation, registration date, last visit, interests, city etc.

You can use different mail clients to send the emails like yahoo, gmail, hotmail, thunderbird.

One can also subscribe to the newsletter.

How to create newsletter :

Refer this link

AEM Default Search vs. Solr Search

AEM Default Search vs. Solr Search

AEM Oak Lucene Search :

This is Oak indexing.

Since this is inbuilt search, the indexing happens on AEM itself, which can grow to a large number as per the content repository size. Also index binaries take a lot of space.

Queries can not be cached efficiently here.

In case of e-commerce sites, the contents might be stored on the e-commerce engine. Those will have to be loaded in AEM to use AEM search with them. This will also increase the space requirement.

It doesn't support Natural Language search, keywords indexing, sponsored search, Geo-spatial search and query suggestions/spelling check.

Solr Search :

Reliable, scalabe and fault tolerant

Supports distributed environments which means, there can be cluster of solr instances those can work together to make the most efficient indexing and searching.

Automated failover and recovery

Query caching

You do not have to import the e-commerce contents on AEM for indexing

Advanced Full-Text Search Capabilities, Optimized for High Volume Traffic, Highly Scalable and Fault Tolerant, Near Real-Time Indexing, Faceted Search and Filtering, Geospatial Search, Highly Configurable and User Extensible Caching, Query Suggestions, Spelling Rich Document Parsing.


There are two ways of integrating solr with AEM :

i. Rest integration. Search can be performed using rest api.

ii. It can be configured along with AEM Oak index to optimize the jcr query search.

Scenario :

The out-of-the-box AEM searching feature works well and is a good fit for small applications looking to reduce overall costs and simplify implementations. It requires no extra development time/effort to implement it. It can also be configured and optimized to overcome some of its limitations.

On the other hand, integrating AEM with Solr requires design and development, as well as hosting and managing the Solr environments. This would increase costs and overall project timeline, but the reward is a wide variety of advanced searching features, blazing fast search performance, and a reduced footprint in AEM's environments.




Wednesday, June 10, 2020

Content Fragments Vs Experience Fragment

Content Fragments Vs Experience Fragment

Content Fragment :

- Presentation Agnostic i.e. they can be used in any type of presentation layer. This is achieved using exposing the content fragments in the form of JSON.
- They're of dam:asset type
- Can have several versions like mobile version, tablet version, third party version etc
- Can be created using Content Fragment Model
- Content centric i.e. contents matter not the presentation
- They're composed of form elements like text, date, text area etc
- Can be exported as JSON
- Content fragment model has to be enabled to create content fragment for a site
- Can be created dynamically and used on any channel
- Not meant for larger sizes of content paragraphs
- Advanced version of sling reference component
- It is about reusing the contents

Create content fragment model -> Author content fragment in assets -> Define content services template using editable templates (Empty template) -> Use components like text, image, content fragment or content fragment list -> Author content service page using the content fragment page template created in previous step -> Publish -> View json page the page by putting pagename.model.json.

- Content fragment can be used by third party

Scenario :

i. When dynamic changes in the contents are required frequently. For example events page, vacations planning page, service catalog page, small scale product information catalogs
ii. Multichannel sites
iii. News websites
iv. Legal disclaimers on different channels


Experience Fragment :

- Presentation Centric  : Look and feel matters
- They're of cq:Page type
- Can have several variations based on the channel. Can also have social media specific form which can be created using social post
- Can be created using editable templates
- Can also be created using layout container on a page
- Not necessarily has to be a page, it can be collection of components inside layout container.
- They're composed of components like text component, list component, image component or combination of all
- Can be exported as HTML
- Can be different variation on different channels
- Live copies can be created
- Building blocks
- Experience fragment is about reusing the whole experience across different channels

Create experience fragment template using editable templates (xfpage type) -> go to sites and create experience fragment and select the template -> Ensure experience template policy allows the components you want to use on experience template -> define experience fragment -> Publish

- Experience fragment can be used by third party as simple html pages.

Scenario :
i. Emails
ii. Omnichannel experience
iii. Sites with personalized experiences (by integrating with target)
iv. Embedded on different sites as web component like RSS feed (like detached experiences)

Some more AEM 6 Interview Questions for Architects

 Some more AEM 6 Interview Questions for Architects 1. Consider you have a workflow with two steps. One step is to transfer the asset from s...