Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

MongoDB Days Silicon Valley: Using MongoDB with Adobe AEM Communities

2,216 views

Published on

Presented by Kevin Nennig, AEM Technical Instructor, Adobe

Experience level: Introductory

In Adobe Experience Manager 6.1, a new approach has been taken for user generated content (UGC) for better security, higher availability, and ease of use for community members and administrators. The Social Resource Provider API for AEM Communities can be implemented 3 different ways to create a UGC cloud, two of which use a MongoDB backend. Utilizing MongoDB, companies can implement an on prem UGC common store with a Mongo and a Solr server. UCG is then stored and accessed from this UGC cloud. In this session we’ll explore the Social Resource Provider framework and implement the Mongo Social Resource Provider (MSRP) for AEM Communities.

Published in: Technology
  • I’ve personally never heard of companies who can produce a paper for you until word got around among my college groupmates. My professor asked me to write a research paper based on a field I have no idea about. My research skills are also very poor. So, I thought I’d give it a try. I chose a writer who matched my writing style and fulfilled every requirement I proposed. I turned my paper in and I actually got a good grade. I highly recommend ⇒ www.HelpWriting.net ⇐
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

MongoDB Days Silicon Valley: Using MongoDB with Adobe AEM Communities

  1. 1. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Using Mongo with Adobe AEM Communities Kevin Nennig | Corporate Technical Instructor
  2. 2. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. ADOBE TRAINING Adobe Media Optimizer Adobe Social Adobe Target Adobe Audience Manager Adobe Experience Manager Adobe Campaign Adobe Analytics Adobe Primetime 2 Adobe Marketing Cloud Solution
  3. 3. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. ADOBE TRAINING Adobe Media Optimizer Adobe Social Adobe Target Adobe Audience Manager Adobe Experience Manager Adobe Campaign Adobe Analytics Adobe Primetime 3 Adobe Marketing Cloud Solution
  4. 4. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. AEM Modules
  5. 5. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. AEM Modules
  6. 6. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Using Mongo in AEM Persistence of entire database User generated content only
  7. 7. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Using Mongo in AEM Persistence of entire database User generated content only
  8. 8. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Why use Mongo for AEM Communities? • Flexible JSON document model • Efficient searching with indexing • Built in replication for high availability • Scaleable • High concurrent writes • Reduces operational overhead
  9. 9. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Lets have a social opinion! • http://mongosv.kevinnennig.com • AEM Community with Mongo common store (MSRP) • “Mongo Opinions” is based upon Yahoo Answers • Sign up and give your opinion to a few questions!
  10. 10. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Communities 6.1 10 Publish farms are preferred 1 http://mongosv.kevinnennig.com
  11. 11. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Content Replication 11 AEM Publish Farm AEM Author Dispatcher
  12. 12. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Content Replication 12 AEM Publish Farm AEM Author Dispatcher • Recommended approach • Performance • Scalability on read access • Failover • What about UGC?
  13. 13. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Communities 6.1 13 Publish farms are preferred 1 Replicating UGC isn’t good enough 2 http://mongosv.kevinnennig.com
  14. 14. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. AEM Replication of UGC (earlier versions of AEM) 1 AEM Publish AEM Publish Comment, rating, forum post 2 Stored in repository and in Replication Outbox 3 Check and fetch Outbox content 4 Workflow-based moderation and spam check AEM Author Replication to all publish Internal Network DMZ 5 5
  15. 15. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. AEM Replication of UGC (earlier versions of AEM) • Everything has to go through author • UGC is not immediately available everywhere • Slow 1 AEM Publish AEM Publish Comment, rating, forum post 2 Stored in repository and in Replication Outbox 3 Check and fetch Outbox content 4 Workflow-based moderation and spam check AEM Author Replication to all publish Internal Network DMZ 5 5
  16. 16. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Communities 6.1 16 Publish farms are preferred 1 Replicating UGC isn’t good enough 2 Need to be Fast and consistent 3 http://mongosv.kevinnennig.com
  17. 17. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 17 The Solution: Common Store for UGC http://mongosv.kevinnennig.com
  18. 18. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Implementing the Common Store 18 • Social Resource Provider (SRP) • An API that abstracts the storage • Implemented three different ways • MongoMK JCR SRP (JSRP) • Adobe SRP (ASRP) • Mongo SRP (MSRP)
  19. 19. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. JSRP: JCR Social Resource Provider 19 19 19 AEM Author • Publish instances are clustered with MongoMK • Default storage mechanism • Easy to setup UGC • UGC is only available on publish instances • Publish Farm is not utilized MongoMK AEM Publish 3 AEM Publish 2 AEM Publish 1
  20. 20. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. ASRP: Adobe Social Resource Provider 20 AEM Publish Farm Adobe Social Cloud AEM Author • Recommended for managed UGC • No setup needed • Integrates with Adobe Social Analytics Pipeline and Moderation • Fast
  21. 21. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. MSRP: Mongo Social Resource Provider 21 AEM Author AEM Publish Farm • Recommended for on prem UGC • Required to setup a mongo replset and solr cloud • Fast and scaleable
  22. 22. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. What’s stored in the Common Store? 22 • Contextual • Comments • Reviews • Ratings • Votes/Likes Adobe Social Cloud MongoMK • Standalone • Forums • Calendars • File Sharing • Activities
  23. 23. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. What isn’t stored in the Common Store? 23 • External user accounts • External groups • Community website Adobe Social Cloud MongoMK
  24. 24. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. What isn’t stored in the Common Store? 24 • External user accounts • External groups • Community website Adobe Social Cloud MongoMK Replicated among publish instances but not author Replicated from the author instance to publish farm
  25. 25. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Comparing SRP 25 Adobe Social Cloud MongoMK Social Resource Provider JSRP ASRP MSRP Microkernel MongoMK TarMK TarMK Site Content Repository Publish Server Publish Server Publish Server UGC Repository Publish Server Adobe Social Cloud MongoDB When it should be Default storage. Not recommended for production, only development. Customers using the ASC or who do not Requirements of data being on prem
  26. 26. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Dispatcher 26 UGC is dynamic content. Can it work with Dispatcher? http://mongosv.kevinnennig.com
  27. 27. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Dispatcher 27 AEM Publish Farm AEM Author Dispatcher
  28. 28. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Dispatcher 28 AEM Publish Farm Dispatcher User info
  29. 29. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Performance increase using Mongo SRP 29  “Mixed transactions” test case:  Based on customer data  Reverse Replication  JSP components (deprecated in 6.0)  CRX2  2 node active/passive cluster  5 transactions per second
  30. 30. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Performance increase using Mongo SRP 30  “Mixed transactions” test case:  Based on customer data  Reverse Replication  JSP components (deprecated in 6.0)  CRX2  2 node active/passive cluster  5 transactions per second  Mongo SRP  SCF components  MSRP  4 node farm  Dispatcher  100 tps per instance
  31. 31. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 31 Setting up MSRP http://mongosv.kevinnennig.com
  32. 32. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. MSRP: Mongo Social Resource Provider 32 AEM Author 27019 2701827017 aem AEM Publish Farm
  33. 33. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. MSRP: Mongo Social Resource Provider 33 AEM Author 27019 2701827017 aem Database: msrp-communities Collection: collection1 AEM Publish Farm
  34. 34. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Starting a replset Mongo 34  Start Mongo Servers mongoServer1$ mongod --bind_ip nennig-osx.local --logpath logs/mongo.log --dbpath db --replSet aem --port 27017 mongoServer2$ mongod --bind_ip nennig-osx.local --logpath logs/mongo.log --dbpath db --replSet aem --port 27018 mongoServer3$ mongod --bind_ip nennig-osx.local --logpath logs/mongo.log --dbpath db --replSet aem --port 27019
  35. 35. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Starting a replset Mongo 35  Create the Replica Set  Connect to the mongodb you want to be Primary $ mongo nennig-osx.local:27017 >
  36. 36. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Starting a replset Mongo 36  Initialize the Replica Set > rs.initiate() { "info2" : "no configuration explicitly specified -- making one", "me" : "nennig-osx.local:27017", "info" : "Config now saved locally. Should come online in about a minute.", "ok" : 1 } aem:PRIMARY> rs.conf() { "_id" : "aem", "members" : [ { "_id" : 0, "host" : "nennig-osx.local:27017" } ] }
  37. 37. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Starting a replset Mongo 37  Initialize the Replica Set > rs.initiate() { "info2" : "no configuration explicitly specified -- making one", "me" : "nennig-osx.local:27017", "info" : "Config now saved locally. Should come online in about a minute.", "ok" : 1 } aem:PRIMARY> rs.conf() { "_id" : "aem", "members" : [ { "_id" : 0, "host" : "nennig-osx.local:27017" } ] } You can also use: rs.status() This will show the current status of each server including who’s PRIMARY/SECONDARY
  38. 38. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Starting a replset Mongo 38  Add members aem:PRIMARY> rs.add(“nennig-osx.local:27018”) { "ok" : 1 } aem:PRIMARY> rs.add(“nennig-osx.local:27019”) { "ok" : 1 }
  39. 39. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Starting a replset Mongo 39 aem:PRIMARY> rs.conf() { "_id" : "aem", "version" : 3, "members" : [ { "_id" : 0, "host" : "nennig-osx.local:27017" }, { "_id" : 1, "host" : "nennig-osx.local:27018" }, { "_id" : 2, "host" : "nennig-osx.local:27019" } ] }
  40. 40. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Start the Solr Server 40  Download config files from the AEM server  Start the Solr Server with the conf files on port 8983 solrServer$ java –jar start.jar
  41. 41. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Configure the Social Resource Provider on AEM 41
  42. 42. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 42 Demo http://mongosv.kevinnennig.com
  43. 43. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 43 Q&AKevin Nennig nennig@adobe.com Slideshare: http://www.slideshare.net/KevinNennig/aem-communities-61-mongosv-15 Community Topologies: https://docs.adobe.com/docs/en/aem/6-1/deploy/communities/topologies.html MSRP: https://docs.adobe.com/docs/en/aem/6-1/administer/communities/srp/msrp.html http://mongosv.kevinnennig.com

×