#2 - Using the Cloud for Multi Tenancy How would Jim do this today on premises? Browser Web Tier B/L Tier Database Customer #1 Browser Web Tier B/L Tier Database Customer #2 Browser Web Tier B/L Tier Database Customer #3
Gets expensive pretty quickly
#2 - Using the Cloud for Multi Tenancy Browser Customer #1 Browser Web Tier B/L Tier Database Customer #2 Browser Customer #3
Schema Customizations UI Customizations
Schema Customizations UI Customizations
3 options for data in multi tenant environment
#2 - Using the Cloud for Multi Tenancy Browser Fixed Schema Customer #1 Browser Web Tier B/L Tier Database Customer #2 Browser Option 1 : Everyone Uses the Same Database/Schema Customer #3 Pros: Simplest approach, easy to maintain/upgrade. Cons: No customizations. Restoring of tenant data.
#2 - Using the Cloud for Multi Tenancy Browser Database Customer #1 Customer #1 Browser Web Tier B/L Tier Database Customer #2 Customer #2 Database Browser Customer #3 Customer #3 Option 2: Give Each Customer Their Own Database/Schema Pros: Flexible. Tenant restore is easier . High Isolation. Cons: Can be costly. Difficult to upgrade db schemas.
#2 - Using the Cloud for Multi Tenancy Fixed Schema Browser with Customizations Customer #1 Browser Web Tier B/L Tier Database Customer #2 Browser Option 3: Fixed Database/Schema, with customizations Customer #3 Pros: Customers can add their own custom fields Cons: Non standard way of customizing the schema. Tenant restore is difficult.
#2 - Using the Cloud for Multi Tenancy Tenant * 1 int TenantID nvarchar TenantName * * Type Employee TypeID int int EmployeeId nvarchar nvarchar Name FirstName nvarchar nvarchar CLRType LastName 1 1 Customization int * * CustomizationID nvarchar Value
#2 - Using the Cloud for Multi Tenancy Tenant * 1 1 TenantID UK Branch TenantName * * Type Employee TypeID 1 1 EmployeeId PostalCode Gordon Name FirstName string Brown CLRType LastName 1 1 Customization 1 * * CustomizationID SW1 A 2AA Value
#2 - Using the Cloud for Multi Tenancy Tenant * 1 2 TenantID US Branch TenantName * * Type Employee TypeID 2 2 EmployeeId ZipCode Barack Name FirstName string Obama CLRType LastName 1 1 Customization 2 * * CustomizationID 20500 Value
#2 - Using the Cloud for Multi Tenancy Tenant * 1 2 TenantID Fixed Schema Applies to All Could be both US Branch TenantName * * Tenants Type Employee TypeID 2 2 EmployeeId Customizable ZipCode Barack Name FirstName Tenant by Tenant Basis string Obama CLRType LastName 1 1 Customization 2 * * CustomizationID 20500 Value
Schema Customizations UI Customizations
#2 - Using the Cloud for Multi Tenancy Browser Customer #1 Browser Web Tier B/L Tier Database Customer #2 Browser Customer #3
URL Handing
Routing using MVC approach
#2 - Using the Cloud for Multi Tenancy http://hr .contoso.co.uk Browser Customer #1 http://employeedata.cloudapp.net Browser Web Tier B/L Tier Database Customer #2 Browser Customer #3 http://hr .fabrikam.com
#2 - Using the Cloud for Multi Tenancy http://hr .contoso.co.uk -> CNAME (employeedata.cloudapp.net) Browser Customer #1 http://employeedata.cloudapp.net Browser Web Tier B/L Tier Database Customer #2 Browser Customer #3 http://hr .fabrikam.com -> CNAME (employeedata.cloudapp.net)
#2 - Using the Cloud for Multi Tenancy http://hr .contoso.co.uk -> CNAME (employeedata.cloudapp.net) Browser Customer #1 http://employeedata.cloudapp.net Browser Web Tier B/L Tier Database Customer #2 Use custom route to controller mapping Browser Customer #3 http://hr .fabrikam.com -> CNAME (employeedata.cloudapp.net)
Demo: Multi Tenant Schema and UI
Patterns for Cloud Computing Takeaways Always consider Multi Tenancy first, even if only one customer Design considerations must include both data and UI Many other considerations, such as identity – p&p guidance
Patterns for Moving to the Cloud #3 - Using the Cloud for Compute
Patterns for Cloud Computing Jim sees how cloud computing supports scaling up/down nodes
Patterns for Cloud Computing “Can I use all of these nodes in parallel?”
Patterns for Cloud Computing “I’ve got this complex calculation I would like to share across these multiple nodes…”
#3 - Using the Cloud for Compute Data Worker Data Data Worker Client Master Data Worker
#3 - Using the Cloud for Compute Result Worker Result Worker Client Master Result Worker Result
Popularized by the term “MapReduce”* * 2004 OSDI paper by Jeff Dean and Sanjay Ghemawat (Google)
#3 - Using the Cloud for Compute How many ”e”’ s in “The quick brown fox jumps over the lazy dog”? M<k,v> Worker Data M<k,v> Worker Client Master M<k.v> Worker “Map” M<“the quick brown”.”e”> M<“fox jumps over”.”e”> M<“the lazy dog”.”e”>
#3 - Using the Cloud for Compute L<k,v> Worker L<k,v> Worker Client Master Result Worker L<k,v> 3 x ”e”s found “Reduce” L<”e”,”1 ”> L<”e”,”1 ”> L<”e”,”1 ”>
And it’ s definitely popular ...
#3 - Using the Cloud for Compute Google 20pb of data analyzed every day using MapReduce Yahoo! 1 0k+ cores, 4pb of data using MapReduce Facebook 2500+ cores, 1 pb of data using MapReduce
Recommend
More recommend