+ All Categories
Home > Documents > AEM Communities and Sling Siddharth Palaniswami, Adobe · Siddharth Palaniswami, Adobe. Agenda...

AEM Communities and Sling Siddharth Palaniswami, Adobe · Siddharth Palaniswami, Adobe. Agenda...

Date post: 14-Aug-2020
Category:
Upload: others
View: 2 times
Download: 0 times
Share this document with a friend
31
APACHE SLING & FRIENDS TECH MEETUP BERLIN, 26-28 SEPTEMBER 2016 AEM Communities and Sling Siddharth Palaniswami, Adobe
Transcript
Page 1: AEM Communities and Sling Siddharth Palaniswami, Adobe · Siddharth Palaniswami, Adobe. Agenda adaptTo() 2016 2 § Introduction § Challenges of UGC and personalized content § Storage

APACHE SLING & FRIENDS TECH MEETUPBERLIN, 26-28 SEPTEMBER 2016

AEM Communities and SlingSiddharth Palaniswami, Adobe

Page 2: AEM Communities and Sling Siddharth Palaniswami, Adobe · Siddharth Palaniswami, Adobe. Agenda adaptTo() 2016 2 § Introduction § Challenges of UGC and personalized content § Storage

Agenda

adaptTo() 2016 2

§ Introduction§ Challenges of UGC and personalized content§ Storage Resource Provider (SRP)

§ Social Component Framework (SCF)§ Future

Page 3: AEM Communities and Sling Siddharth Palaniswami, Adobe · Siddharth Palaniswami, Adobe. Agenda adaptTo() 2016 2 § Introduction § Challenges of UGC and personalized content § Storage

adaptTo() 2016 3

What is AEM Communities

Page 4: AEM Communities and Sling Siddharth Palaniswami, Adobe · Siddharth Palaniswami, Adobe. Agenda adaptTo() 2016 2 § Introduction § Challenges of UGC and personalized content § Storage

AEM Communities

adaptTo() 2016 4

§ Create and manage online communities§ Components for users to engage and

collaborate with each other§ Large scale User Generated Content§ Rich, interactive and personalized

components

Page 5: AEM Communities and Sling Siddharth Palaniswami, Adobe · Siddharth Palaniswami, Adobe. Agenda adaptTo() 2016 2 § Introduction § Challenges of UGC and personalized content § Storage

AEM Communities – an Overview

5

AssignmentForums QnA Blogs Calendars Files NewsFeedsFunctions CatalogGroups

Learning Paths Management

Assignments ReportingEnablement

Resources Management SCORM Engine Video Analytics Progress

Reporting

Site Wizard Site Templates

Group Templates

Bulk Moderation

Member Mgmt.Administration

Responsive Design

In-Context Moderation Analytics

ASRP/Cloud StoragePlatform JSRP/JCR Storage MSRP/Mongo Storage User and Group Sync

ProfilesMembers Activities MessagesNotifications Social LoginsSocial Graph

Comments Reviews Ratings Votes TagsCommons Attachments Search Translations

Scores Badges

Page 6: AEM Communities and Sling Siddharth Palaniswami, Adobe · Siddharth Palaniswami, Adobe. Agenda adaptTo() 2016 2 § Introduction § Challenges of UGC and personalized content § Storage

adaptTo() 2016 6

Demo

Page 7: AEM Communities and Sling Siddharth Palaniswami, Adobe · Siddharth Palaniswami, Adobe. Agenda adaptTo() 2016 2 § Introduction § Challenges of UGC and personalized content § Storage

Challenges with UGC

adaptTo() 2016 7

§ Large volume of uncontrolled writes§ Content gets created on multiple publish instances and needs to be

synced§ Replication became a bottleneck§ Writes and reads need to be fast§ Search needed to scale for high volume of content

Page 8: AEM Communities and Sling Siddharth Palaniswami, Adobe · Siddharth Palaniswami, Adobe. Agenda adaptTo() 2016 2 § Introduction § Challenges of UGC and personalized content § Storage

adaptTo() 2016 8

Common Store for UGC

Page 9: AEM Communities and Sling Siddharth Palaniswami, Adobe · Siddharth Palaniswami, Adobe. Agenda adaptTo() 2016 2 § Introduction § Challenges of UGC and personalized content § Storage

SRP

Common Store

adaptTo() 2016 9

AEMPublishFarm1

AEMPublishFarm2

AEMPublishFarm3

MongoDB Solr

AEMAuthor*MSRP- showninfigure

Page 10: AEM Communities and Sling Siddharth Palaniswami, Adobe · Siddharth Palaniswami, Adobe. Agenda adaptTo() 2016 2 § Introduction § Challenges of UGC and personalized content § Storage

Storage Resource Provider

adaptTo() 2016 10

§ Implements various Sling Resource Provider APIs

§ Provides read, write and search APIs for UGC§ Multiple implementations for various storage options§ Supports atomic increments and pagination§ Search is provided by integrating with Solr

https://docs.adobe.com/docs/en/aem/6-2/develop/communities/essentials/srp.html

Page 11: AEM Communities and Sling Siddharth Palaniswami, Adobe · Siddharth Palaniswami, Adobe. Agenda adaptTo() 2016 2 § Introduction § Challenges of UGC and personalized content § Storage

Storage Options

adaptTo() 2016 11

§ JSRP – UGC stored in local JCR repository§ Low volume

§ ASRP – data is stored via Adobe hosted cloud service§ Medium volume, managed by Adobe

§ MSRP – UGC is sent to a MongoDB setup dedicated for UGC. Solr is used to support search§ High volume, self managed

Page 12: AEM Communities and Sling Siddharth Palaniswami, Adobe · Siddharth Palaniswami, Adobe. Agenda adaptTo() 2016 2 § Introduction § Challenges of UGC and personalized content § Storage

Example usage of SRP

adaptTo() 2016 12

§ Write to a SRP

Page 13: AEM Communities and Sling Siddharth Palaniswami, Adobe · Siddharth Palaniswami, Adobe. Agenda adaptTo() 2016 2 § Introduction § Challenges of UGC and personalized content § Storage

Search using SRP

adaptTo() 2016 13

Page 14: AEM Communities and Sling Siddharth Palaniswami, Adobe · Siddharth Palaniswami, Adobe. Agenda adaptTo() 2016 2 § Introduction § Challenges of UGC and personalized content § Storage

adaptTo() 2016 14

Social Component Framework

Page 15: AEM Communities and Sling Siddharth Palaniswami, Adobe · Siddharth Palaniswami, Adobe. Agenda adaptTo() 2016 2 § Introduction § Challenges of UGC and personalized content § Storage

Why did we build a framework

adaptTo() 2016 15

§ Need for dynamic, rich and interactive components § User generated content needs to be cached but still personalized§ Search engine friendly – community content discovery is largely via search engines

§ Reduce complexity and time to customize and extend components§ Customizing OOTB components to fit customer’s design should be easy§ Extending functionality should not mean large projects§ Should be very easy to customize look and feel and UX§ Need for re-usability

§ Integrate with legacy systems or other custom applications§ Inherently support a HTTP API

Page 16: AEM Communities and Sling Siddharth Palaniswami, Adobe · Siddharth Palaniswami, Adobe. Agenda adaptTo() 2016 2 § Introduction § Challenges of UGC and personalized content § Storage

What does our component framework do?

adaptTo() 2016 16

Provides a collection of services, APIs and patterns that enable developers to create dynamic components.

Components built using the framework are easy to customize, extend and reuse.

SEO Friendly Client Side RenderingDynamic Content

Skinnable

Client Side Extensibility

Server Side ExtensibilitySimple/Reusable Templates HTTP API

Page 17: AEM Communities and Sling Siddharth Palaniswami, Adobe · Siddharth Palaniswami, Adobe. Agenda adaptTo() 2016 2 § Introduction § Challenges of UGC and personalized content § Storage

9/26/16 17

Demo

Page 18: AEM Communities and Sling Siddharth Palaniswami, Adobe · Siddharth Palaniswami, Adobe. Agenda adaptTo() 2016 2 § Introduction § Challenges of UGC and personalized content § Storage

Code Example

adaptTo() 2016 18

Illustrates how to build a SocialComponent that reads/writes/searches UGC using the SRP

storage options

https://github.com/Adobe-Marketing-Cloud/aem-communities-todomvc-sample

Page 19: AEM Communities and Sling Siddharth Palaniswami, Adobe · Siddharth Palaniswami, Adobe. Agenda adaptTo() 2016 2 § Introduction § Challenges of UGC and personalized content § Storage

HandlebarsScriptingEngine

19

SCFJSComponents

CSS

Sling

SlingResourceAPI

HandlebarsTemplates[HTML]+[Handlebars

Expressions]

HTML

GETHTML

SocialComponent

Storage

GET Request

Page 20: AEM Communities and Sling Siddharth Palaniswami, Adobe · Siddharth Palaniswami, Adobe. Agenda adaptTo() 2016 2 § Introduction § Challenges of UGC and personalized content § Storage

Example SocialComponent

adaptTo() 2016 20

SocialComponent

Page 21: AEM Communities and Sling Siddharth Palaniswami, Adobe · Siddharth Palaniswami, Adobe. Agenda adaptTo() 2016 2 § Introduction § Challenges of UGC and personalized content § Storage

Registering a SocialComponent

adaptTo() 2016 21

SocialComponent

SocialComponentFactory

sling:resourceType

Page 22: AEM Communities and Sling Siddharth Palaniswami, Adobe · Siddharth Palaniswami, Adobe. Agenda adaptTo() 2016 2 § Introduction § Challenges of UGC and personalized content § Storage

Handlebars Template

adaptTo() 2016 22

HandlebarsScriptingEngineHandlebarsTemplates

SocialComponent

HTML

Page 23: AEM Communities and Sling Siddharth Palaniswami, Adobe · Siddharth Palaniswami, Adobe. Agenda adaptTo() 2016 2 § Introduction § Challenges of UGC and personalized content § Storage

OperationService

23

SocialComponent

SlingPostOperation

SlingResourceAPIPOST

Storage

OperationExtensions

JSON

POST Request

Page 24: AEM Communities and Sling Siddharth Palaniswami, Adobe · Siddharth Palaniswami, Adobe. Agenda adaptTo() 2016 2 § Introduction § Challenges of UGC and personalized content § Storage

SocialComponents as RESTful endpoints

adaptTo() 2016 24

SocialComponentDefaultSocialGETServletSlingRequest

JSON

Page 25: AEM Communities and Sling Siddharth Palaniswami, Adobe · Siddharth Palaniswami, Adobe. Agenda adaptTo() 2016 2 § Introduction § Challenges of UGC and personalized content § Storage

• Skinning• Only need to change the CSS

• Look and Feel and UX • Change template, CSS and extend/override JavaScript Models and Views

• Make more/less information available to the template or to the GET endpoint • Extend the OOTB SocialComponent(only need to add/subtract what you need)• Register custom SocialComponent for component resourceType

• Add some custom processing during operations • Write an OperationExtension

• Listen for OSGi events

• Add a new custom operation • Create new Sling Post Operation• Use existing Operation Services as needed

• Integrating with 3rd party services• Use HTTP endpoints for Create/Edit/Delete• Use /path/to/resource.social.json to read and present resources

25

Customizing/Extending OOTB Components

Page 26: AEM Communities and Sling Siddharth Palaniswami, Adobe · Siddharth Palaniswami, Adobe. Agenda adaptTo() 2016 2 § Introduction § Challenges of UGC and personalized content § Storage

adaptTo() 2016 26

Caching and Dynamic Content

Page 27: AEM Communities and Sling Siddharth Palaniswami, Adobe · Siddharth Palaniswami, Adobe. Agenda adaptTo() 2016 2 § Introduction § Challenges of UGC and personalized content § Storage

Caching and Personalizing views

adaptTo() 2016 27

§ Server rendered component is cached for anonymous users

§ Components re-rendered on client side after side loading user specific information

§ Caches are flushed by listening for OSGievents that update UGC

Page 28: AEM Communities and Sling Siddharth Palaniswami, Adobe · Siddharth Palaniswami, Adobe. Agenda adaptTo() 2016 2 § Introduction § Challenges of UGC and personalized content § Storage

SCF+SRP Performance

adaptTo() 2016 28

§ JCR with Replication + Fully server rendered components (JSP)§ CRX2§ 2 node active/passive cluster§ 5 transactions per second

§ SRP - SCF for components + MSRP (Mongo + Solr) for UGC§ OAK (for content and component nodes)§ 4 node publish farm§ Dispatcher§ 100 transactions per second

Page 29: AEM Communities and Sling Siddharth Palaniswami, Adobe · Siddharth Palaniswami, Adobe. Agenda adaptTo() 2016 2 § Introduction § Challenges of UGC and personalized content § Storage

adaptTo() 2016 29

What’s next?

Page 30: AEM Communities and Sling Siddharth Palaniswami, Adobe · Siddharth Palaniswami, Adobe. Agenda adaptTo() 2016 2 § Introduction § Challenges of UGC and personalized content § Storage

What’s next?

adaptTo() 2016 30

§ SCF and SlingModels§ resourceType to SlingModel binding - SLING-5992§ “export” JSON serialization of SlingModel (.export.json)

§ SCF Next § Extend SlingModels§ Optimized JSON views§ Opensource SCF?

Page 31: AEM Communities and Sling Siddharth Palaniswami, Adobe · Siddharth Palaniswami, Adobe. Agenda adaptTo() 2016 2 § Introduction § Challenges of UGC and personalized content § Storage

adaptTo() 2016 31

Thank You


Recommended