https://adobecq5onlinetraining.blogspot.com/2015/10/adobe-cq-5-interview-questions-part-2.html
6) What is Reverse Replication?
Reverse replication is used to
get user content generated on a publish instance back to the author instance. To
do this you need a reverse replication agent in the author environment. This
act as the active component to collect information from the outbox in the
publish environment.
7) How is resource resolution
done in Sling?
The below images tells us how a
URL is resolved and mapped to a resource.
https://adobecq5interviewquestions.files.wordpress.com/2013/11/sling.gif?w=640
Consider the URL
GET-http://www.mywebsite.com/products/product1.printable.a4.html/a/b?x=12
Using these principles:
- the mapping uses the content
path extracted from the request to locate the resource
- when the appropriate resource
is located, the sling resource type is extracted, and used to locate the script
to be used for rendering the content
The request is broken down and
the necessary information extracted. The repository is searched for the
requested resource (content node):
- first Sling checks whether a
node exists at the location specified in the request; e.g. ../
- content/corporate/jobs/developer.html
- if no node is found, the
extension is dropped and the search repeated; e.g. ../content/
- corporate/jobs/developer
- if no node is found then Sling
will return the http code 404 (Not Found).
8) What is OSGi? What is the
benefit of OSGi? What is Felix?
OSGi is a framework which allows
modular development of applications using java.
A large application can be
constructed using small reusable
components(called bundles in terms of OSGi) each of which can be independently
started, stopped, and also can be configured dynamically while running without
requiring a restart.
Consider a scenario where you
have a large application which uses a logging framework. This logging framework
can be deployed as an OSGi Bundle, which can be managed independently.
Therefore, it can be started when required by our application and can be
stopped when not in use. Also the OSGi container makes these bundles available
as services, which can be subsribed by other parts of application.
The main advantages of using OSGi
:
1) reduces the complexity of the system.
2) Makes the components loosely couples and
easy to manage.
3) Increases the performance of the system,
since parts of application which are not in use,need not to be loaded in the
memory(although there is not a drastic change in performance and also some
people argue that running an OSGi container itself takes huge memory).
9) What is the role of Dispatcher in CQ5?
Dispatcher is a CQ5 tool for
caching and load-balancing. It has 2 responsibilities.
1) Caching – To cache as much content as
possible, so that it doesnt need to access layout engine frequently for
generating content dynamically.
2) Load-balancing – To increase the
performance by load-balancing.
10) What is Replication in CQ5?
1) Publish (activate) content from author to
publish environment.
2) Explicitly flush content from the
dispatcher cache.
3) Return user input from the publish
environment to the author environment.
REPLICATION PROCESS:
1) First, the author requests that certain
content to be published (activated).
2) The request is passed to the appropriate
default replication agent.
3) Replication agent packages the content and
places it in the replication queue.
4) the content is lifted from the queue and
transported to the publish environment using the configured protocol.
5) a servlet in the publish environment receives
the request and publishes the received content, the default servlet is
http://localhost:4502/bin/receive.