Wednesday, June 14, 2017

Complete AEM description

How to distribute AEM,how does AEM get deployed?
The entire AEM comes as jar file, this has two methods:
AEM is used to build a web application.To build a web application we need a web server to starts.
———————————————————————————————————————————————————
The first kind of module less is the standalone instance:
we get a jar and license file.
——————————————————————————————
There is a naming convention for this Adobe:
————————————————————————————————
The AEM can run in two ways:
It can run in author and it can run as publish.
————————————————————————————————————
This Author is the edit mode, that means it will help to build the website, in which the pages consists of components ,that is reusable components.These are the components when you start the server.These are most of them are reusable components to reduce the efforts.
—————————————————————————————————————————————
To create components we want some stacks to create them.
———————————————————————————————————
Geometrixx sites are very good starting points to start the Adobe,These are created by Adobe.
It consists of Geometrixx demo sites, which helps us to create the interactive components for the site.
—————————————————————————————————————————
what is meant by  Run mode?
AEM can run in two modes:
1)Author
2)Publish
—————————————————————————————————————————
Author is an Editable mode
Publish instance is the read only mode.
Serving naming:
Cq-<Run-Mode>-p<portnumber>.jar
Cq-author-p4502.jar
Author instances run on even number ports(4504,4506,4508)
It is possible to have multiple instances running on a single machine.
An Author instances requires approximately  close to 3 GB to  8 GB RAMS recommended.

To access any url in AEM:
http://<servername>:<portnumber>/- Login page
————————————————————
Prequisties for AEM startup:

1)JDK 1.7 or higher running - SET JAVA_HOME and path variables 
2)4 gb of ram
——————————————————————————————————————————————————————
The run mode for the publish instance:

Cq-publish-p4503.jar 
———————————————————————————————————————————
3 ways of starting server

1)First way of starting server —  Double click the jar file
 CRX-quick start folder gets generated.
 - Jetty webserver
(jetty is more optimized)

When I start the instance,jetty is starting.We can deploy the AEM on top of any application servers.for example on top of the Jboss/Apache.

For you to deploy the AEM on the existing app server, for that you would a war file.
(What ever the jar file which is AEM distribution we can get it as a war file)

If your client insists us, we already have the app server or to deploy on the existing app server:

Its also possible to deploy AEM on top of an existing APP server.

It is also possible to deploy AEM on a running application server like Boss
AEM distribution - WAR file

For that, we need to get war file


Installing AEM with an Application server:

if we select Jboss 7.1 we need to select this, we need to setup them and install them




What is the backend happened when you start the web server?

5.6.1 and older versions  uses CQSE(Cq servlet engine


2)Second way of starting server -During the startup the, if you want to allocate the heap memory 

To extract the jar by command line.

Note:Inorder to extract any jar file, we need to give the command:

Java -jar  name of the jar file

java-jar  cq-author-p4502.jar

while extracting if you get any out of memory issues:
-Xms or -XmX (Minimum and Maximum  heap size)

In java we have another kind of memory is called Permanent kind  of generation:This permanent generation holds the memory of all the classes, methods  in your JVM class loader.

java -XX:MaxPermSize=256m -Xmx1024M -jar cq-author-p4502.jar

In production it differs, it depends upon the volume of the content and volume of the pages.

———————————————————————————————————————————
To maintain the AEM infrastructure:
There are two ways:
1)On premise - admin, the job of the admin,intial setup,Deploy,monitor the production env
2)when the client does not have the possibility of administrators, we just go in to this approach :
AMS(Adobe managed services):Everything it take cares like Setting up the dispatcher instance and monitoring the production service.
——————————————————————————————

My AEM is starting because there are 400 odd OSGI bundles that get added into  container and these bundles go into the active state.

Trouble shooting the instance:

http://localhost:4502/system/console - Felix -Ensure all bundles in active state

First time server start up takes time - 3mins

2)go to  crx-quickstart/logs and inspect error.logs,stderr.logs and  Stdout.logs

To view the bundless

——————————————————————————
third way of starting the server:

this particular folder will get generated when i started the instance (go to crx-quickstart > go to bin folder > we can see start and stop scripts
(AEM CAN RUN ON WINDOWS MACHINE/LINUX MACHINE).(AEM BUILD AND MADE UP OF JAVA)
Inorder to make AEM  run on windows machine, please go to bin folder and click on the start button.

the server will get started and it will register some bundles there.

How to troubleshoot this:

Just go to OSGI console  > we will refresh the page and test the siteadmin it will show the error,
then  we need to make sure that all the bundles are in active state ,otherwise server cannot able to start.

when you refresh the page of site admin, the page display startup in progress.

the first level of troubleshooting is OSGI bundles ,make sure all the bundles are in active state, if not refresh for couple times and make sure every bundle is in active state.then the server is displayed.
————————————————————————————————————————————————
let us think I am deploying linux server for my production instance.

we know that  window start bash script  will won’t work on the linux machines.
there will be start and that is the file for the linux machines.

if you want to change the port number we need to go to the bin folder and we will start scripts and change the port  number in the script.
and if you want to change the run mode also we can change in the start bash script.for example like author and publish.

If we want to allocate more memory to the heap we can modify in the  bin folder and start bash script.
NOTE: Inorder to stop the server we should not close the command prompt directly, we need to go to bin folder and click on the stop bash script.which helps us to stop the AEM instance.

The best way to start the server is through the command line, because we can the memory of the heap size.
the limitation with the third approach is :
when you will get the bin folder it is from the crx-quickstart folder ,when the crx-quickstart will be generated, that particular folder will be created when we double click on the server.  
——————————————————————————————————————————————————
AEM uses log 4 framework for logging
  • log4j- WARN,INFO,ERROR,DEBUG.
  • ————————————————————————————————————————
  • AEM architecture:
  • [General scenario
  • Before we that we will go through the Java J2ee applications 
  • which consists of RDS (Relational database which consists of tables)
  • for example if you take one JSP and it is planning  to communicate with  RDS(i.e Database),that means servlet is going to communicate with the tables it is connected with the help of JDBC connector]
  • No concept of database in AEM.
  • How is the data getting stored?
  • AEM uses some hierarchical model for storage  similar to the linux machines.
  • which is nothing parent-child model.
   we have a Root node (/)
                     child node
JCR —> Java content repository. (Specification)it is a interface every spec has a version  - JSR283(has set of rules)  for example JDBS is a specification in the Java.
In the Java content repository ,data is stored  in the form of nodes and  properties.
(what is meant by node —— A node is the unit for the storage).
How we can map the node to my database??
every node is associated to the properties.
what is meant by property??
Property is the simple key value pair — has a datatype

Which implementation of JCR does AEM uses??
It uses the open source technologies like Apache Jackrabit OAK and  
Adobe’s implementation of JCR  IS CRX (content  repository extreme)

How to view nodes in the properties??

How do i explore my repository??

 OR

Everything is the node in the JCR ,that means the folder structure you see at  the corner is considered to be the node in the JCR.
————————————————————————————————————
If you view the page carefully ,we can see the term called cf is called content finder, which its at the left side of the component building page that is nothing but  the content finder.
localhost:4502/content/#cf geometric/en.html
this is nothing it is pointing to the digital assets .
—————————————————————————————————————————————————————

My entire website is based on the nodes and properties.
if you change the property, then you can see the change in page.
—————————————————————————————————
so in the general scenarios you can see that  JDBC connector will help as a  connector for the webpage.
But in AEM for the JCR w e have the Apache sling.
is a rest based  protocol  to access the JCR,whatever stored in the backend it has to be viewed by the user for that we use apache sling in the AEM.
Basically sling is a layer to access the JCR over the web.
It is used to webify the content
these are the two layers they are the JCR is one layer and sling is the another layer.
———————————————————————————————————————————————————
just having the data and viewing in the web is not the criteria, when we approach the big one.
we can upstream and downstream systems.
If you want java code in AEM,it is not possible directly.

JAVA CODE:
  This comes in to picture ——> OSGI  (Open service gateway initiative).
   OSGI is a modular programming approach. ————> Specification.
    
My application can be divided in to modules or this bundles are also called Bundles.

What is a bundle??

JAR (Java archive ——> it is the collection of compiled classes, interfaces and soon) + additional (metadata).

Apache felix is an implementation  of OSGI.

What is the benefit of the osgi??
to trouble shoot the instance, the access for the apache felix console:

syntax: http://<ServerName>:<Portnumber>/


—————————————————————————————————————————————————————

Advantage of using the AEM:

For an instance, if we use the tomcat, if we plan to modify the any part of script we need to redeploy the entire application.

But in AEM,it is a modular concept,if the line/script is changed ,we can just deploy the particular module.that is the beauty in the AEM.

In techical:
Every bundle has its own lifecycle (it has its own class loader)
this is what enables every bundle to be started/stopped.
OSGI SUPPORTS THE MULTIPLE VERSIONS OF THE BUNDLE.
——————————————————————————————————————————————
There are two types of views in AEM:
1)Classic UI (Legacy view) - Non responsive (Light green background).
From this page, you can navigate to any page.

Classic UI is based on the EXT JS framework (Sencha javascript framework).

2)TOUCH UI - 5.6.1 onwards
http://localhost:4502/projects.html  (this has the black background)
responsive framework for author
if the authors want  to use the mobile devices, then they can use the TOUCH UI.

CORAL UI 

The speciality of the TOUCH UI is when you change the size of the screen automatically you see changes in the adjustment in the screen.that is the specialty of the TOUCH UI view.

A common look and feel  across all the Adobe marketing cloud solutions.

Adobe marketing cloud has 6 solutions:
Adobe analytics
Adobe target
Adobe experience manager and couple of other solutions.


No comments:

Post a Comment