MT Internals (enabling multi-tenant SaaS “ in the cloud ” )
description
Transcript of MT Internals (enabling multi-tenant SaaS “ in the cloud ” )
![Page 1: MT Internals (enabling multi-tenant SaaS “ in the cloud ” )](https://reader036.fdocuments.in/reader036/viewer/2022062315/56815b1b550346895dc8cb8c/html5/thumbnails/1.jpg)
MT Internals(enabling multi-tenant SaaS “in the cloud”)
Jan Vonka
Core Repository - Cloud / Hybrid Services
![Page 2: MT Internals (enabling multi-tenant SaaS “ in the cloud ” )](https://reader036.fdocuments.in/reader036/viewer/2022062315/56815b1b550346895dc8cb8c/html5/thumbnails/2.jpg)
Agenda
• Multi-Tenant (MT) Overview
• MT Core
• MT 4.x and “in the cloud”• What’s new in Alfresco 4.x ?• How does Alfresco “in the cloud” differ ?
• Summary and Feedback (Q & A)
![Page 3: MT Internals (enabling multi-tenant SaaS “ in the cloud ” )](https://reader036.fdocuments.in/reader036/viewer/2022062315/56815b1b550346895dc8cb8c/html5/thumbnails/3.jpg)
MT Overview
![Page 4: MT Internals (enabling multi-tenant SaaS “ in the cloud ” )](https://reader036.fdocuments.in/reader036/viewer/2022062315/56815b1b550346895dc8cb8c/html5/thumbnails/4.jpg)
MT Overview4.x instance – example 1
DB Content(Shared F/S)
Search (Solr)
Share
Repository (including Transforms)
APIs / Protocols(CMIS, REST, WebDAV,
…)
![Page 5: MT Internals (enabling multi-tenant SaaS “ in the cloud ” )](https://reader036.fdocuments.in/reader036/viewer/2022062315/56815b1b550346895dc8cb8c/html5/thumbnails/5.jpg)
MT Overview4.x instance – example 2
DBDB2DB1
Content(Shared F/S)
Search nodesSolr2Solr1 Solr3
Share nodesSh2Sh1 Sh3
Repository ClusterR2R1 R3
Transformer nodesT2T1 T3
APIs / Protocols(CMIS, REST, WebDAV,
…)
![Page 6: MT Internals (enabling multi-tenant SaaS “ in the cloud ” )](https://reader036.fdocuments.in/reader036/viewer/2022062315/56815b1b550346895dc8cb8c/html5/thumbnails/6.jpg)
MT Overview
ContentDB Search Index
Alfresco
Alfresco “vanilla” – single-tenant (single instance)
![Page 7: MT Internals (enabling multi-tenant SaaS “ in the cloud ” )](https://reader036.fdocuments.in/reader036/viewer/2022062315/56815b1b550346895dc8cb8c/html5/thumbnails/7.jpg)
Alfresco – single-tenant (multi-instance)
MT Overview
ContentDB Search Index
Alfresco Cluster
ContentDB Search Index
AlfrescoCluster
ContentDB Search Index
AlfrescoCluster
ContentDB Search Index
Alfresco Cluster
T1 T2
T3 T4
![Page 8: MT Internals (enabling multi-tenant SaaS “ in the cloud ” )](https://reader036.fdocuments.in/reader036/viewer/2022062315/56815b1b550346895dc8cb8c/html5/thumbnails/8.jpg)
Alfresco MT – multi-tenant (single instance)MT Overview
ContentDB Search Index
Alfresco Cluster
T1
T2
T3
T4
![Page 9: MT Internals (enabling multi-tenant SaaS “ in the cloud ” )](https://reader036.fdocuments.in/reader036/viewer/2022062315/56815b1b550346895dc8cb8c/html5/thumbnails/9.jpg)
MT Overview
Why use MT ?
•Economies of scale• Lower licensing / TCO
•Easier to manage• Less administrative overhead, easier upgrades
•Scale• Cloud – multi-tenant SaaS (Software as a Service)
•New use-cases• Cloud – eg. B2B collaboration
![Page 10: MT Internals (enabling multi-tenant SaaS “ in the cloud ” )](https://reader036.fdocuments.in/reader036/viewer/2022062315/56815b1b550346895dc8cb8c/html5/thumbnails/10.jpg)
MT Overview
Alfresco has provided multi-tenant option since v3
•Single instance / multiple tenants
•Each tenant can access logical repo
•Full partitioning (isolated tenants)
•UIs + APIs / Protocols
•Dynamic Models
![Page 11: MT Internals (enabling multi-tenant SaaS “ in the cloud ” )](https://reader036.fdocuments.in/reader036/viewer/2022062315/56815b1b550346895dc8cb8c/html5/thumbnails/11.jpg)
MT Core
![Page 12: MT Internals (enabling multi-tenant SaaS “ in the cloud ” )](https://reader036.fdocuments.in/reader036/viewer/2022062315/56815b1b550346895dc8cb8c/html5/thumbnails/12.jpg)
MT Core
MT implementation – tenant context
• Auth (Security) ctx => fully qualified userid• minimise impact on APIs + support standard
protocols• myuser@mytenant
• Internally partitioned by Alfresco “store”• workspace://SpacesStore
• workspace://@@mytenant@@SpacesStore
![Page 13: MT Internals (enabling multi-tenant SaaS “ in the cloud ” )](https://reader036.fdocuments.in/reader036/viewer/2022062315/56815b1b550346895dc8cb8c/html5/thumbnails/13.jpg)
MT Core
MT implementation – tenant context (cont’)
• workspace://@@acme.com@@SpacesStore• Company Home
• Sites• Site1, Site2, …
• User Homes• [email protected], [email protected], …
• workspace://@@ano.co.uk@@SpacesStore• Company Home
• Sites• Site1, Site2, …
• User Homes• [email protected], [email protected]
![Page 14: MT Internals (enabling multi-tenant SaaS “ in the cloud ” )](https://reader036.fdocuments.in/reader036/viewer/2022062315/56815b1b550346895dc8cb8c/html5/thumbnails/14.jpg)
MT Core
MT implementation – create tenant
• When creating a tenant, we “bootstrap” the data …
• create tenant-specific stores (x5)• Live store (workspace://SpacesStore)• Version2 store• Archive store• User store• System store
• add to “alf_tenant” table• Tenant Domain, Enabled/Disabled, Content Root (if not co-
mingled)
![Page 15: MT Internals (enabling multi-tenant SaaS “ in the cloud ” )](https://reader036.fdocuments.in/reader036/viewer/2022062315/56815b1b550346895dc8cb8c/html5/thumbnails/15.jpg)
MT Core
MT implementation – Services vs DAOs
•Services / APIs• “always” accessed in tenant ctx • notable exception is QuickShare service
• public/shared links => no login required
•Persistence DAOs • direct use• in some cases, apply to multiple / all (?) tenants
• eg. system-wide patches / jobs etc
![Page 16: MT Internals (enabling multi-tenant SaaS “ in the cloud ” )](https://reader036.fdocuments.in/reader036/viewer/2022062315/56815b1b550346895dc8cb8c/html5/thumbnails/16.jpg)
MT Core
Quick reference … something to review later
• MultiTServiceImpl TenantService• Provides name mangling – injected in various
services
• MultiTAdminServiceImpl TenantAdminService• Manage tenants – create, disable / enable, delete
• MultiTNodeServiceInterceptor• example that wraps (intercepts) generic
NodeService• instead of injecting TenantService (or extending)
![Page 17: MT Internals (enabling multi-tenant SaaS “ in the cloud ” )](https://reader036.fdocuments.in/reader036/viewer/2022062315/56815b1b550346895dc8cb8c/html5/thumbnails/17.jpg)
MT CoreSee: node-services-context.xml
<bean id="multiTNodeServiceInterceptor" class="org.alfresco.repo.tenant.MultiTNodeServiceInterceptor"> <property name="tenantService"> <ref bean="tenantService" /> </property></bean>
<bean id="mtAwareNodeService" class="org.springframework.aop.framework.ProxyFactoryBean" > <property name="targetName"> <value>dbNodeService</value> </property> <property name="proxyInterfaces"> <list> <value>org.alfresco.service.cmr.repository.NodeService</value> </list> </property> <property name="interceptorNames"> <list> <value>multiTNodeServiceInterceptor</value> </list> </property></bean>
<bean id="dbNodeService" class="org.alfresco.repo.node.db.DbNodeServiceImpl" init-method="init" > <!-- … more here … -></bean>
![Page 18: MT Internals (enabling multi-tenant SaaS “ in the cloud ” )](https://reader036.fdocuments.in/reader036/viewer/2022062315/56815b1b550346895dc8cb8c/html5/thumbnails/18.jpg)
MT Core
Other examples …
• Core Services, eg.• NodeService -> FileFolderService• ContentService• SearchService• WorkflowService (JBPM + Activiti since v4)• … etc
• APIs & Protocols, eg.• WebScripts• CMIS• WebDAV
![Page 19: MT Internals (enabling multi-tenant SaaS “ in the cloud ” )](https://reader036.fdocuments.in/reader036/viewer/2022062315/56815b1b550346895dc8cb8c/html5/thumbnails/19.jpg)
What’s new in Alfresco v4.x ?
![Page 20: MT Internals (enabling multi-tenant SaaS “ in the cloud ” )](https://reader036.fdocuments.in/reader036/viewer/2022062315/56815b1b550346895dc8cb8c/html5/thumbnails/20.jpg)
What’s new in Alfresco v4
Changes include:• Activiti support for MT
• in addition to JBPM
• Solr support for MT• “core” tracking, tenant ctx filter, …
• MT pre-configured (enable w/ 1st tenant)• note: since Enterprise 4.0.2 / Community 4.2.a
![Page 21: MT Internals (enabling multi-tenant SaaS “ in the cloud ” )](https://reader036.fdocuments.in/reader036/viewer/2022062315/56815b1b550346895dc8cb8c/html5/thumbnails/21.jpg)
What’s new in Alfresco v4
Changes include:
• Alf_Tenant table• replaces attribute list
• Common implementation• eg. for (tenant-based) caches
• Various bug fixes & other related improvements• from Cloud release + customer feedback
![Page 22: MT Internals (enabling multi-tenant SaaS “ in the cloud ” )](https://reader036.fdocuments.in/reader036/viewer/2022062315/56815b1b550346895dc8cb8c/html5/thumbnails/22.jpg)
How does Alfresco “in the cloud” differ ?
![Page 23: MT Internals (enabling multi-tenant SaaS “ in the cloud ” )](https://reader036.fdocuments.in/reader036/viewer/2022062315/56815b1b550346895dc8cb8c/html5/thumbnails/23.jpg)
How does Alfresco “in the cloud” differ ?
MT Core 4.x except hosted on AWS and …
Search Index (Solr)
DB (RDS) Content (S3)
Alfresco Cluster
![Page 24: MT Internals (enabling multi-tenant SaaS “ in the cloud ” )](https://reader036.fdocuments.in/reader036/viewer/2022062315/56815b1b550346895dc8cb8c/html5/thumbnails/24.jpg)
How does Alfresco “in the cloud” differ ?
… with Tenant (aka. Network switching)• Unlike MT core, cloud allows Tenant switching
• User has primary tenant• Can be invited to secondary tenants
• We split Tenant ctx from Auth ctx (see TenantUtil)
• Share + APIs support tenant switching• via cloud extensions for:
• Share / Surf• WebDAV protocol• SharePoint protocol• Core Repo APIs – including the new “public API”
![Page 25: MT Internals (enabling multi-tenant SaaS “ in the cloud ” )](https://reader036.fdocuments.in/reader036/viewer/2022062315/56815b1b550346895dc8cb8c/html5/thumbnails/25.jpg)
How does Alfresco “in the cloud” differ ?Scaling – networks, users, sites, documents, …
•Hosted Core MT might be “100s” of tenants
•Cloud supports “100s of thousands” of tenants• eg. 15000 companies signed up in first 3 months
•Generic improvements get pushed back to core code
![Page 26: MT Internals (enabling multi-tenant SaaS “ in the cloud ” )](https://reader036.fdocuments.in/reader036/viewer/2022062315/56815b1b550346895dc8cb8c/html5/thumbnails/26.jpg)
Futures
![Page 27: MT Internals (enabling multi-tenant SaaS “ in the cloud ” )](https://reader036.fdocuments.in/reader036/viewer/2022062315/56815b1b550346895dc8cb8c/html5/thumbnails/27.jpg)
Futures
Health warning – this slide is speculative
• Driven by both Enterprise and Cloud use-cases
• Scaling – scale & partition tiers, as needed• SharePoint Protocol• Refactor of MT dynamic models (+ CMIS 1.1)• More dynamic Share / platform (per-tenant overrides)• Public / Private / Hybrid – MT vs ST• …
• What would you like to see on the list ?
![Page 28: MT Internals (enabling multi-tenant SaaS “ in the cloud ” )](https://reader036.fdocuments.in/reader036/viewer/2022062315/56815b1b550346895dc8cb8c/html5/thumbnails/28.jpg)
Summary
![Page 29: MT Internals (enabling multi-tenant SaaS “ in the cloud ” )](https://reader036.fdocuments.in/reader036/viewer/2022062315/56815b1b550346895dc8cb8c/html5/thumbnails/29.jpg)
Summary
• MT Core• Fully partitioned by tenant context
• What’s new in Alfresco 4.x ?• Activiti, Solr, … + improvements & bug fixes
• How does Alfresco “in the cloud” differ ?• Network switching
• Please try it out• Download latest Community 4.2 …• http://wiki.alfresco.com/wiki/Multi-Tenancy
![Page 30: MT Internals (enabling multi-tenant SaaS “ in the cloud ” )](https://reader036.fdocuments.in/reader036/viewer/2022062315/56815b1b550346895dc8cb8c/html5/thumbnails/30.jpg)
Thank you
… Questions & Feedback ?
Photo credits: http://www.stonebalancing.com/