Hi everybody.
My today’s issue is regarding an architectural decision that our team had to make having two option in front (maybe you guys see more…so please advice).
To start from the beginning, we had develop an AEM project (with Java backend and Angular frontend) and deployed it in one Author instance. So we had a .core, a .apps and a content Java projects in Eclipse (standard projects for AEM) and we used Maven to build and deploy them into AEM. The Angular code was making Ajax calls to Sling Servlets, which in turn were calling other classes where all the business logic was stored. The project was only a demo, so we didn’t pay attention to everything that a production ready application may require. Everything worked like a charm. La vita e bella.
Now, we need to enhance the demo version and make it good enough to be deployed in production, live. The challenge we are facing now refers to the fact that we need to use multiple Publish instances and an Author instance (so not only an Author like in demo). Therefore we need to think of a way to split the entire code we have among those instances. So we thought that Publish should be as light as possible, but can’t avoid 100% to not have any of our code deployed to it. We thought that is best to keep the Angular code deployed only on Publish instances and then establish how to split the Java code too. So, for the Java part we thought to have only few services (maybe even only one) deployed on Publish instances, which would not do any business logic. And the rest of Java services to be deployed on Author. The idea was to have the Java code from Publish instances only routing requests coming from browser (from Angular) to Java code from Author. But the main problem is that we can’t decide for best approach to achieve this routing, this communication.
For simplicity lets assume we have service A deployed on Publish and service B deployed on Author (when I say service I don’t necessary mean service in AEM, but as a general concept).
So basically we thought of two ways:
1. We make REST calls from Publish instances to Author, but do not know if it is right to do so. We do not know if Adobe will block the REST calls from Publish instances to Author or if it can allow it.
2. We use Reverse Replication, which Adobe is recommending. But as far as I know this refers to data exchange while we need to achieve a communication via network. So in order for a A to be able to make B run I think we must some how simulate a normal network communication protocol but this time making use of AEM data and Reverse Replication functionality. Some how adding content to Publish outbox and having the Reverse Replication Agents (on Publish and on Author) configured would be equivalent to sending a HTTP request via network. Because Reverse Replication Agent will take care to move data from Publish on Author. Then we could have a Listener on data on Author that could invoke service B once data was updated.
A real life scenario:
We have a field in web page , where user can enter a value. That value must be uniquely chosen among users (like an account id for example). For that our Angular app is doing a real time Ajax call to service A. Service A has to find out from service B if that value is unique. Service B has to lookup among the values he has in memory. The list of values must be on Author, not on Publish.
So, questions time (prepare yourself):
1. We had several thoughts and assumptions, until we got to the point were decided to split the code. Are they right? Should we have followed an entirely other logic path?
2. Is it that bad to use REST calls between Publish and Author? Are there any AEM configs that we need to take care of?
3. Did we understood well how to use Reverse Replication for our needs? Is it suitable to use it?
4. Is there anything else that slips our attention or we should take into account?
5. Are there any other possible solutions/approaches?
6. How is in general a project achieving that? (because it strikes me that I didn’t found any articles on this trivial, at least at first sight, topic on the internet)
Thank you very much for having the patience to read this and I really hope you can give me some directions
Solved! Go to Solution.
Props for the detailed explanation.
I will try to answer the questions. But first I have to advise you to start thinking about code and content when working with AEM. Since both reside in the same repository, it can get confusing.
1. The project structure looks good. If it works in the demo author, that's great news. You may even want to split your core bundle into multiple bundles (osgi jars) based on business features to make it modular. Maven makes doing this easy.
2. Don't use business calls between publish and author. Deploy your full code on both author and publish. Author server is content producer's playground. You don't want to stress it out further with production load. For performance, add as many publishers (and dispatchers - AEM's caching layer) and have a load balancer in front of them. Remember, publish is the guy serving your website in production.
3. If your application has user generated content, that is where reverse replication comes into picture. And yes, reverse replication (as well as forward replication) are HTTP calls between AEM author and publish servers. AEM provides these out of the box through replication agents.
4, 5, 6 are general questions. Try exploring on the points I listed and come back with further questions. And make sure you attend that architecture session.
These questions are the reason why we have next weeks session of Ask the AEM Communikty Experts. I recommend that you sign up for this session:
Comparative Architecture Analysis of large scale Experience Manager Installations -- Oct Version of Ask the AEM Community Experts
This session of Ask the AEM Community Experts will share large scale architectures from the author's experiences with various companies like Cisco and Symantec and compare and contrast the architecture across: Infrastructure Architecture Scaling
Ecommerce integrations and migration approach from legacy into Adobe Experience Manager, Digital Marketing Cloud Integrations such as personalization, analytics, and DMP.
Presented by: Anshul Chhabra with Symantec, and Anil Kalbag with Cisco Systems.
You do not want to miss this one. To sign up, click:
Hi Scott.
Tks for your response I will try to attend. I tried to use the URL you gave me, but is says that page is not found. Do you have an up to date one?
Meanwhile, if it is not to much to ask, do you have any tips for my challenge ? I can provide any additional info if needed.
Tks a lot.
Views
Replies
Total Likes
Props for the detailed explanation.
I will try to answer the questions. But first I have to advise you to start thinking about code and content when working with AEM. Since both reside in the same repository, it can get confusing.
1. The project structure looks good. If it works in the demo author, that's great news. You may even want to split your core bundle into multiple bundles (osgi jars) based on business features to make it modular. Maven makes doing this easy.
2. Don't use business calls between publish and author. Deploy your full code on both author and publish. Author server is content producer's playground. You don't want to stress it out further with production load. For performance, add as many publishers (and dispatchers - AEM's caching layer) and have a load balancer in front of them. Remember, publish is the guy serving your website in production.
3. If your application has user generated content, that is where reverse replication comes into picture. And yes, reverse replication (as well as forward replication) are HTTP calls between AEM author and publish servers. AEM provides these out of the box through replication agents.
4, 5, 6 are general questions. Try exploring on the points I listed and come back with further questions. And make sure you attend that architecture session.
Hi,
I don't really understand, why you want your users to work on author and publish simultaneously. You should definitly know why you have authors and publishs, and which part of your users should work on which system. Author and publish instances serve different roles in the play, and you should use them wisely.
The splitting of the application is ok.
Jörg
Views
Likes
Replies
Views
Likes
Replies