Presentation is loading. Please wait.

Presentation is loading. Please wait.

Multi-tenant Table Administration Flexibility without the complications Richard Banville Software Fellow, OpenEdge Matthew Baker Principal Software Engineer,

Similar presentations


Presentation on theme: "Multi-tenant Table Administration Flexibility without the complications Richard Banville Software Fellow, OpenEdge Matthew Baker Principal Software Engineer,"— Presentation transcript:

1 Multi-tenant Table Administration Flexibility without the complications Richard Banville Software Fellow, OpenEdge Matthew Baker Principal Software Engineer, OpenEdge

2 © 2012 Progress Software Corporation. All rights reserved. 2 Agenda 1 Administration Architecture Multi-tenant Administration: How to Utility usage examples Database Admin Console Demo 2 3 4

3 © 2012 Progress Software Corporation. All rights reserved. 3 Multi-tenant Identity Definitions  Tenant “Named” group of users Share same application and data  Multi-tenancy Deployment supporting multiple tenants  Default tenant Users who do not assert tenant identity  Super tenant Tenant with ability to access/manage data of any tenant  Multi-tenant group Multiple tenants sharing data for a specific multi-tenant table

4 © 2012 Progress Software Corporation. All rights reserved. 4 Multi-tenant Allocation Definitions  Table instance Defined by a single table definition (schema) Each table instance contains –A data segment for the record data –A separate data segment for each index/lob of the table Each tenant/group has a different table instance A tenant need not instantiate every multi-tenant table  Data segment Tenant/group specific chain of data for each table/index/lob (DB object) Stored/encapsulated in its own physical data partition  Physical data partition Managed storage for each DB object of a multi-tenant table instance Do not span storage areas Name index Record Data Name index Customer Record Data Blob Data Name Index Cust-num Index

5 © 2012 Progress Software Corporation. All rights reserved. 5 Multi-tenant Administration  Tenant Administration Tenants Groups Domains Users Security/Data Access  Performance Monitoring Configuration  Data Administration Table definition Allocation Location Maintenance What needs administration?

6 © 2012 Progress Software Corporation. All rights reserved. 6

7 7 Physical Model By Tenant By Data And Datatype Data Tenancy Layer HomeDepot Lowes Default de-allocated or migrated data Shared Customers Orders Items … _file _field _tenant state … Customers Orders Items … … A7 A8 A9 A10 HD_CustOrder_Data HD_CustOrderIdxs HD_ItemData HD_ItemIdxs A11 A12 A13 A14 Lowes_CustOrder_Data Lowes_CustOrderIdxs Lowes_ItemData Lowes_ItemIdxs A15 A16 Default_Data_Area A17 A18 Shared_Data Shared_Indexes Default_Index_Area *Type II Storage Areas

8 © 2012 Progress Software Corporation. All rights reserved. 8 Physical Model By Data and Datatype Data Tenancy Layer HomeDepot Lowes Default de-allocated or migrated data Shared Customers Orders Items … _file _field _tenant state … Customers Orders Items … … Data segregation eases maintenance Area7 Area8 CustOrder Data CustOrderIdxs ItemData ItemIdxs A11 A12 Shared Data Shared Indexes Area9 Area10

9 © 2012 Progress Software Corporation. All rights reserved. 9 Example: Adding A New Tenant “AceHardware” Data Tenancy Layer AceHardware Shared Customers Orders Items … A23 A24 A25 A26 Ace_CustOrder Data Ace_CustOrderIdxs Ace_ItemData Ace_ItemIdxs Assign partition locations next Type II Storage Areas Tenant Access: Allowed, disallowed Determine physical layout 1st Create tenant w/delayed allocation

10 © 2012 Progress Software Corporation. All rights reserved. 10 New Inventory Table With Existing Tenants Data Tenancy Layer HomeDepot Lowes Customers Orders Items … Type II Storage Areas A7 A8 A9 A10 HD_CustOrder_Data HD_CustOrderIdxs HD_ItemData HD_ItemIdxs A11 A12 A13 A14 Lowes_CustOrder_Data Lowes_CustOrderIdxs Lowes_ItemData Lowes_ItemIdxs Customers Orders Items … Example: Adding an Inventory table

11 © 2012 Progress Software Corporation. All rights reserved. 11 New Inventory Table With Existing Tenants Data Tenancy Layer HomeDepot Lowes Customers Orders Items … Type II Storage Areas A7 A8 A9 A10 HD_CustOrder_Data HD_CustOrderIdxs HD_ItemData HD_ItemIdxs A11 A12 A13 A14 Lowes_CustOrder_Data Lowes_CustOrderIdxs Lowes_ItemData Lowes_ItemIdxs Customers Orders Items … A19 A20 HD_Inventory_Data HD_InventoryIdxs A21 A22 Lowes_Inventory_Data Lowes_InvIdxs Physical layout first

12 © 2012 Progress Software Corporation. All rights reserved. 12 New Inventory Table With Existing Tenants Data Tenancy Layer HomeDepot Lowes Customers Orders Items … Type II Storage Areas A7 A8 A9 A10 HD_CustOrder_Data HD_CustOrderIdxs HD_ItemData HD_ItemIdxs A11 A12 A13 A14 Lowes_CustOrder_Data Lowes_CustOrderIdxs Lowes_ItemData Lowes_ItemIdxs Customers Orders Items … Inventory A19 A20 HD_Inventory_Data HD_InventoryIdxs A21 A22 Lowes_Inventory_Data Lowes_InvIdxs Define multi-tenant table

13 © 2012 Progress Software Corporation. All rights reserved. 13 New Inventory Table With Existing Tenants Data Tenancy Layer HomeDepot Lowes Customers Orders Items … Type II Storage Areas A7 A8 A9 A10 HD_CustOrder_Data HD_CustOrderIdxs HD_ItemData HD_ItemIdxs A11 A12 A13 A14 Lowes_CustOrder_Data Lowes_CustOrderIdxs Lowes_ItemData Lowes_ItemIdxs Customers Orders Items … Inventory A19 A20 HD_Inventory_Data HD_InventoryIdxs A21 A22 Lowes_Inventory_Data Lowes_InvIdxs Tenant specific space allocation immediate or delayed

14 © 2012 Progress Software Corporation. All rights reserved. 14 Groups  Tenants have their own table instance if: Not part of a group Data Tenancy Layer HomeDepot TaxCode State Customers … Lowes TaxCode State Customers …

15 © 2012 Progress Software Corporation. All rights reserved. 15  Tenants have their own table instance if: Not part of a group  Group data Shared amongst tenants in the group Can exists with no tenants assigned Follow allocation rules already defined  Group associated with only one table instance TaxCode_Data State_Data Groups Data Tenancy Layer HomeDepot TaxCode State Customers … A30 TaxCode_Indexes State_Indexes TaxCodeGroup TaxCodes Lowes TaxCode State Customers … StateGroup States A31

16 © 2012 Progress Software Corporation. All rights reserved. 16  Tenants have their own table instance if: Not part of a group  Group data Shared amongst tenants in the group Can exists with no tenants assigned Follow allocation rules already defined  Group associated with only one table instance TaxCode_Data State_Data Groups Data Tenancy Layer HomeDepot TaxCodeGroup StateGroup Customers … A30 TaxCode_Indexes State_Indexes TaxCodeGroup TaxCodes Lowes TaxCodeGroup StateGroup Customers … StateGroup States A31

17 © 2012 Progress Software Corporation. All rights reserved. 17

18 © 2012 Progress Software Corporation. All rights reserved. 18  Administration mechanisms Multi-tenant Administration Appearance of database isolation where possible Data Dictionary SQL DDL Database Admin Console Command line tools ABL administrative APIs

19 © 2012 Progress Software Corporation. All rights reserved. 19 Multi-tenant Administration  Administration mechanisms  Database enablement (new or existing database): proutil describe: 14 Multi-tenancy Yes  Create storage areas No new syntax to database structure files (.st) Coordinate with database designers/developers Have a plan based on physical model Naming conventions can ease your pain Appearance of database isolation where possible Data Dictionary SQL DDL Database Admin Console Command line tools ABL administrative APIs proutil -C enableMultitenancy dbutil prostrct add[online].st

20 © 2012 Progress Software Corporation. All rights reserved. 20 Identify Multi-tenant Tables Users Suzi@HD_Domain Allen@HD_Domain Cat@HD_Domain Rich@HD_Domain Rich@Lowes1 John@Lowes1 Claudio@Lowes2 Louie@Lowes2 Edward Domains/Tenants NameTenant HD_DomainHomeDepot NameTenant Lowes1Lowes Lowes2Lowes NameTenant blankDefault Data Tenancy Layer HomeDepot Lowes Default de-allocated or migrated data Shared Customers Orders Items … _file _field _tenant state … … Customers Orders Items … 1 2 3 0 thru 4

21 © 2012 Progress Software Corporation. All rights reserved. 21 Object Creation Considerations w/out Tenants  Convert existing table to multi-tenant table All objects of table instance MUST reside in TII storage area One way conversion Existing data considered “Default” partition  Create new multi-tenant tables No need for default partition (optional) New multi-tenant “default index” goes in same area as table  Adding new indexes with new tables Activation state at index level, NOT tenant level –Can be changed after the fact Schema manipulation tools such as data dictionary, SQL DDL, etc

22 © 2012 Progress Software Corporation. All rights reserved. 22 Sequence Creation Considerations  Sequences Shared or tenant specific Definition database wide (max/min/cycle values) Current value tenant specific Not group specific –Avoid multi-tenant sequences for group data –Group data is shared amongst specific tenants

23 © 2012 Progress Software Corporation. All rights reserved. 23 Tenant Creation Users Suzi@HD_Domain Allen@HD_Domain Cat@HD_Domain Rich@HD_Domain Rich@Lowes1 John@Lowes1 Claudio@Lowes2 Louie@Lowes2 Edward Domains/Tenants NameTenant HD_DomainHomeDepot NameTenant Lowes1Lowes Lowes2Lowes NameTenant blankDefault Data Tenancy Layer HomeDepot Lowes Default de-allocated or migrated data Shared Customers Orders Items … _file _field _tenant state … … Customers Orders Items … 1 2 3 0 thru 4

24 © 2012 Progress Software Corporation. All rights reserved. 24 Tenant Creation Using ABL Multi-tenant APIs using OpenEdge.DataAdmin.*. define variable service as DataAdminService no-undo. service = new DataAdminService("demo"). define variable tenant as ITenant no-undo. define variable partition as IPartition no-undo. tenant = new Tenant("HomeDepot"). assign tenant:Type = "Regular" /* or super */ tenant:IsOnline = yes tenant:Description = "Describe HomeDepot" tenant:DefaultDataArea = service:GetArea("Data Area") tenant:DefaultIndexArea = service:GetArea("Index Area") tenant:DefaultLobArea = service:GetArea("Lob Area") tenant:DefaultAllocation = "Delayed". /* Immediate or None */ /* Create the tenant */ service:CreateTenant(tenant). … /* continued on next page */ using OpenEdge.DataAdmin.*. define variable service as DataAdminService no-undo. service = new DataAdminService("demo"). define variable tenant as ITenant no-undo. define variable partition as IPartition no-undo. tenant = new Tenant("HomeDepot"). assign tenant:Type = "Regular" /* or super */ tenant:IsOnline = yes tenant:Description = "Describe HomeDepot" tenant:DefaultDataArea = service:GetArea("Data Area") tenant:DefaultIndexArea = service:GetArea("Index Area") tenant:DefaultLobArea = service:GetArea("Lob Area") tenant:DefaultAllocation = "Delayed". /* Immediate or None */ /* Create the tenant */ service:CreateTenant(tenant). … /* continued on next page */

25 © 2012 Progress Software Corporation. All rights reserved. 25 Tenant Creation Using ABL Multi-tenant APIs using OpenEdge.DataAdmin.*. define variable service as DataAdminService no-undo. service = new DataAdminService("demo"). define variable tenant as ITenant no-undo. define variable partition as IPartition no-undo. tenant = new Tenant("HomeDepot"). assign tenant:Type = "Regular" /* or super */ tenant:IsDataEnabled = yes tenant:Description = "Describe HomeDepot" tenant:DefaultDataArea = service:GetArea("Data Area") tenant:DefaultIndexArea = service:GetArea("Index Area") tenant:DefaultLobArea = service:GetArea("Lob Area") tenant:DefaultAllocation = "Delayed". /* Immediate or None */ /* Create the tenant */ service:CreateTenant(tenant). … /* continued on next page */ using OpenEdge.DataAdmin.*. define variable service as DataAdminService no-undo. service = new DataAdminService("demo"). define variable tenant as ITenant no-undo. define variable partition as IPartition no-undo. tenant = new Tenant("HomeDepot"). assign tenant:Type = "Regular" /* or super */ tenant:IsDataEnabled = yes tenant:Description = "Describe HomeDepot" tenant:DefaultDataArea = service:GetArea("Data Area") tenant:DefaultIndexArea = service:GetArea("Index Area") tenant:DefaultLobArea = service:GetArea("Lob Area") tenant:DefaultAllocation = "Delayed". /* Immediate or None */ /* Create the tenant */ service:CreateTenant(tenant). … /* continued on next page */ Set Area Defaults Reference Interfaces, Services

26 © 2012 Progress Software Corporation. All rights reserved. 26 Partition Assignment … /* continued from previous page */ assign partition = tenant:Partitions:Get(service:GetTable("Customer")) partition:Area = service:GetArea("HD CustomerArea“) partition = tenant:Partitions:Get(service:GetTable("Order")) partition:Area = service:GetArea("HD OrderArea") partition = tenant:Partitions:Get(service:GetTable("Item")) partition:Area = service:GetArea("HD ItemArea") partition:AllocationState = “None”. /* Allocate Space */ tenant:Allocate(). /* indicate allocation of everything in delayed state */ Service:UpdateTenant(tenant). delete object service. … /* continued from previous page */ assign partition = tenant:Partitions:Get(service:GetTable("Customer")) partition:Area = service:GetArea("HD CustomerArea“) partition = tenant:Partitions:Get(service:GetTable("Order")) partition:Area = service:GetArea("HD OrderArea") partition = tenant:Partitions:Get(service:GetTable("Item")) partition:Area = service:GetArea("HD ItemArea") partition:AllocationState = “None”. /* Allocate Space */ tenant:Allocate(). /* indicate allocation of everything in delayed state */ Service:UpdateTenant(tenant). delete object service. Allocate Reassign partition location information prior to allocation. Allocation State: Delayed or None

27 © 2012 Progress Software Corporation. All rights reserved. 27 Partition Location Re-assignment  Reassign partition location after allocation Table/index move OR Dump, de-allocate, reassign via APIs/tools, reload Using table/index move utilities New de-allocate utility (bye-bye data) Binary Dump: data is tenant indifferent –Dump file: _ {T|G}_.bd[n] –Example: customer_2T_HomeDepot.bd1 proutil -C deallocate tenant proutil -C tablemove tenant proutil -C dump tenant * Utilities also support “group” based operations

28 © 2012 Progress Software Corporation. All rights reserved. 28 Partition Location Re-assignment  Reassign partition location after allocation Table/index move OR Dump, de-allocate, reassign via APIs/tools, reload Using table/index move utilities New de-allocate utility (bye-bye data) Binary Dump: data is tenant indifferent –Dump file: _ {T|G}_.bd[n] –Example: customer_2T_HomeDepot.bd1 proutil -C deallocate tenant proutil -C tablemove tenant proutil -C dump tenant * Utilities also support “group” based operations

29 © 2012 Progress Software Corporation. All rights reserved. 29 Partition Location Re-assignment  Reassign partition location after allocation Table/index move OR Dump, de-allocate, reassign via APIs/tools, reload Using table/index move utilities New de-allocate utility (bye-bye data) Binary Dump: data is tenant indifferent proutil -C deallocate tenant proutil -C tablemove tenant proutil -C dump tenant * Utilities also support “group” based operations

30 © 2012 Progress Software Corporation. All rights reserved. 30 Using Domains Users Suzi@HD_Domain Allen@HD_Domain Cat@HD_Domain Rich@HD_Domain Rich@Lowes1 John@Lowes1 Claudio@Lowes2 Louie@Lowes2 Edward Domains/Tenants NameTenant HD_DomainHomeDepot NameTenant Lowes1Lowes Lowes2Lowes NameTenant blankDefault Data Tenancy Layer HomeDepot Lowes Default de-allocated or migrated data Shared Customers Orders Items … _file _field _tenant state … … Customers Orders Items … 1 2 3 0 thru 4

31 © 2012 Progress Software Corporation. All rights reserved. 31 Domain Creation  Domain  Tenant: Domains ALWAYS associated w/tenants (default, regular named tenant, super tenant) NOTE:  Renaming a tenant “cascades” the rename to the domains  Renaming a domain “cascades” the rename to the users define variable domain as IDomain no-undo. define variable cAccessCode as character init “secret-code" no-undo. domain = new Domain("HD_Domain") assign domain:DomainType = service:GetDomainType("_oeusertable") domain:AccessCode = cAccessCode domain:Tenant = service:GetTenant("HomeDepot") domain:IsEnabled = yes domain:Description = "HomeDepot security domain". service:CreateDomain(domain). define variable domain as IDomain no-undo. define variable cAccessCode as character init “secret-code" no-undo. domain = new Domain("HD_Domain") assign domain:DomainType = service:GetDomainType("_oeusertable") domain:AccessCode = cAccessCode domain:Tenant = service:GetTenant("HomeDepot") domain:IsEnabled = yes domain:Description = "HomeDepot security domain". service:CreateDomain(domain).

32 © 2012 Progress Software Corporation. All rights reserved. 32 Adding Users Users Suzi@HD_Domain Allen@HD_Domain Cat@HD_Domain Rich@HD_Domain Rich@Lowes1 John@Lowes1 Claudio@Lowes2 Louie@Lowes2 Edward Domains/Tenants NameTenant HD_DomainHomeDepot NameTenant Lowes1Lowes Lowes2Lowes NameTenant blankDefault Data Tenancy Layer HomeDepot Lowes Default de-allocated or migrated data Shared Customers Orders Items … _file _field _tenant state … … Customers Orders Items … 1 2 3 0 thru 4

33 © 2012 Progress Software Corporation. All rights reserved. 33 User Creation  Users  Domain  Tenant (Adding users is optional) Setting user establishes tenant identity determining data access define variable domain as IDomain no-undo. define variable auser as IUser no-undo. auser = new User(“fblake"). assign auser:GivenName = “Frank“ auser:SurName = “Blake" auser:Password = “HD_CEO". domain = service:GetDomain("HD_Domain"). domain:Users:Add(auser). service:UpdateDomain(domain). define variable domain as IDomain no-undo. define variable auser as IUser no-undo. auser = new User(“fblake"). assign auser:GivenName = “Frank“ auser:SurName = “Blake" auser:Password = “HD_CEO". domain = service:GetDomain("HD_Domain"). domain:Users:Add(auser). service:UpdateDomain(domain). User Id: Password: fblake HD_CEO *** Userid/Password is incorrect. Nothing new here

34 © 2012 Progress Software Corporation. All rights reserved. 34 User Creation  Users  Domain  Tenant (Adding users is optional) Setting user establishes tenant identity determining data access  NOTE: “Can” permissions extended to tenant qualified userid define variable domain as IDomain no-undo. define variable auser as IUser no-undo. auser = new User(“fblake"). assign auser:GivenName = “Frank“ auser:SurName = “Blake" auser:Password = “HD_CEO". domain = service:GetDomain("HD_Domain"). domain:Users:Add(auser). service:UpdateDomain(domain). define variable domain as IDomain no-undo. define variable auser as IUser no-undo. auser = new User(“fblake"). assign auser:GivenName = “Frank“ auser:SurName = “Blake" auser:Password = “HD_CEO". domain = service:GetDomain("HD_Domain"). domain:Users:Add(auser). service:UpdateDomain(domain). User Id: Password: fblake@HD_Domain HD_CEO Nothing new here

35 © 2012 Progress Software Corporation. All rights reserved. 35 All Done Users Suzi@HD_Domain Allen@HD_Domain Cat@HD_Domain Rich@HD_Domain Rich@Lowes1 John@Lowes1 Claudio@Lowes2 Louie@Lowes2 Edward Domains/Tenants NameTenant HD_DomainHomeDepot NameTenant Lowes1Lowes Lowes2Lowes NameTenant blankDefault Data Tenancy Layer HomeDepot Lowes Default de-allocated or migrated data Shared Customers Orders Items … _file _field _tenant state … … Customers Orders Items … 1 2 3 0 thru 4

36 © 2012 Progress Software Corporation. All rights reserved. 36 Group Creation Data Tenancy Layer HomeDepot_NH1 Customers … CreditCheckGroup Credit HomeDepot_NH2 Customers … Credit Data A300 Credit Indexes A301 HD #2 Data Area A200 HD #2 index Area A201 HD #1 Data Area A100 HD #1 index Area A101 Type II Storage Areas

37 © 2012 Progress Software Corporation. All rights reserved. 37 Group Creation Data Tenancy Layer HomeDepot_NH1 CreditCheckGroup Customers … CreditCheckGroup Credit HomeDepot_NH2 CreditCheckGroup Customers … Credit Data A300 Credit Indexes A301 HD #2 Data Area A200 HD #2 index Area A201 HD #1 Data Area A100 HD #1 index Area A101 Type II Storage Areas

38 © 2012 Progress Software Corporation. All rights reserved. 38 Group Creation Data Tenancy Layer HomeDepot_NH1 CreditCheckGroup HD_ItemsGroup Customers … CreditCheckGroup Credit HomeDepot_NH2 CreditCheckGroup HD_ItemsGroup Customers … HD_ItemsGroup Items Credit Data HD Item Data A300 Credit Indexes HD Item Indexes A301 HD #2 Data Area A200 HD #2 index Area A201 HD #1 Data Area A100 HD #1 index Area A101 Type II Storage Areas Multiple Home Depot tenants sharing same item list, same credit check data.

39 © 2012 Progress Software Corporation. All rights reserved. 39 Adding Tenants To Groups  Tenant’s table instance allocated? It’s a bit more difficult. Move or remove data from tenant’s table instance –Dump/load, buffer copy/delete via super tenant, etc De-allocate tenant’s table instance (bye-bye data) Add tenant as member of the group for that table –See previous slide proutil -C deallocate [ tenant | group ]

40 © 2012 Progress Software Corporation. All rights reserved. 40 Adding More Multi-tenant Tables Users Suzi@HD_Domain Allen@HD_Domain Cat@HD_Domain Rich@HD_Domain Rich@Lowes1 John@Lowes1 Claudio@Lowes2 Louie@Lowes2 Edward Domains/Tenants NameTenant HD_DomainHomeDepot NameTenant Lowes1Lowes Lowes2Lowes NameTenant blankDefault Data Tenancy Layer HomeDepot Lowes Default de-allocated or migrated data Shared Customers Orders Items … _file _field _tenant state … … Customers Orders Items … 1 2 3 0 thru 4

41 © 2012 Progress Software Corporation. All rights reserved. 41 Adding A New Multi-tenant Table  Use favorite tool DB admin tool, navigator, load.df  Default allocation state (per tenant/group): Immediate –Creates new storage partition for each object of the table instance –Allocation performed for each tenant/group Delayed or None –Will not allocate any storage –Allows non-default area assignment Once tenants exist…

42 © 2012 Progress Software Corporation. All rights reserved. 42 Adding indexes to existing tables  Activate at creation Index wide, not tenant specific Can be slow to activate immediately (off-line)  Index activate online Concurrent for different tables of same tenant Concurrent for same or different table between tenants  R-code dependencies Existing static queries maintain but don’t use newly activated index Tenant “mixed” activation with updated r-code –Index name is inactive and cannot be referenced. (995) proutil -C idxactivate [ tenant | group ]

43 © 2012 Progress Software Corporation. All rights reserved. 43

44 © 2012 Progress Software Corporation. All rights reserved. 44 Various Data Definition Files  Data dump files (.d) Output directory change only: /.d  Binary dump files (.bd) File name format change only -.bd[n] becomes: _ T_.bd[n] OR _ G_.bd[n] customer_5T_HomeDepot.bd1 OR state_2G_itemGroup.bd1  Bulkload file definition (.fd) No change  Data definition files (.df) ADD TABLE “Customer” MULTITENANT yes AREA "Customer/Order Area” Flexibility with compatibility

45 © 2012 Progress Software Corporation. All rights reserved. 45 Maintenance Utilities  Area and object utilities now support tenant/group keyword  Database wide utilities remain unchanged Roll forward Truncate bi Backup/restore Auditing* Increase startup parameters to Move schema Set/display create/toss limits Index move/table move Binary dump/load Index check Index rebuild Index fix Index compact Index activate proutil -C dbanalys [ area ] [ shared | tenant | group ]

46 © 2012 Progress Software Corporation. All rights reserved. 46 Analysis Tools Report By Tenant/Group RECORD BLOCK SUMMARY FOR SHARED OBJECTS: -Record Size (B)- Table Records Size Min Max Mean PUB.state 51 1.8K 31 42 36 ---------------------------------- Subtotals: 51 1.8K 31 42 36 RECORD BLOCK SUMMARY FOR GROUP HD_ItemGroup: -14 -Record Size (B)- Table Records Size Min Max Mean PUB.item 51 2.2K 37 49 44 ----------------------------------- Subtotals: 51 2.2K 37 49 44 RECORD BLOCK SUMMARY FOR TENANT HomeDepot_NH1: 1 -Record Size (B)- Table Records Size Min Max Mean PUB.customer 4 280.0B 64 73 70 PUB.order 9 312.0B 34 35 34 PUB.order-line 31 1.0K 33 34 33 --------------------------------- Subtotals: 44 593.0K 33 73 46 RECORD BLOCK SUMMARY FOR SHARED OBJECTS: -Record Size (B)- Table Records Size Min Max Mean PUB.state 51 1.8K 31 42 36 ---------------------------------- Subtotals: 51 1.8K 31 42 36 RECORD BLOCK SUMMARY FOR GROUP HD_ItemGroup: -14 -Record Size (B)- Table Records Size Min Max Mean PUB.item 51 2.2K 37 49 44 ----------------------------------- Subtotals: 51 2.2K 37 49 44 RECORD BLOCK SUMMARY FOR TENANT HomeDepot_NH1: 1 -Record Size (B)- Table Records Size Min Max Mean PUB.customer 4 280.0B 64 73 70 PUB.order 9 312.0B 34 35 34 PUB.order-line 31 1.0K 33 34 33 --------------------------------- Subtotals: 44 593.0K 33 73 46 dbutil -C dbanalys area [ tenant | group ]

47 © 2012 Progress Software Corporation. All rights reserved. 47 Promon: Tenant Identity, Sorting And Filtering  M. Modify Defaults S. Sort user lists : by user Id OR tenant Id T. Tenant filter for user lists : one OR range User Control: by user number Usr:Ten Name Type 0:0 richbBROK 5:2 u2@t2SELF/ABL 6:1 u1@t1SELF/ABL 7:0 richbSELF/ABL User Control: by user number Usr:Ten Name Type 0:0 richbBROK 5:2 u2@t2SELF/ABL 6:1 u1@t1SELF/ABL 7:0 richbSELF/ABL Currently Connected Tenants Tenant Id Name User Count 0 Default 3 1 t1 1 2 t2 1 Currently Connected Tenants Tenant Id Name User Count 0 Default 3 1 t1 1 2 t2 1 User Control: by tenant Id Usr:Ten Name Type 0:0 richbBROK 7:0 richbSELF/ABL 6:1 u1@t1SELF/ABL 5:2 u2@t2SELF/ABL User Control: by tenant Id Usr:Ten Name Type 0:0 richbBROK 7:0 richbSELF/ABL 6:1 u1@t1SELF/ABL 5:2 u2@t2SELF/ABL

48 © 2012 Progress Software Corporation. All rights reserved. 48

49 © 2012 Progress Software Corporation. All rights reserved. 49 Summary  Administration Architecture  Create tenant related stuff Self provisioning API  Various utility usage  Multi-tenant Configuration Tool demo

50 © 2012 Progress Software Corporation. All rights reserved. 50 Questions ?

51

52 © 2012 Progress Software Corporation. All rights reserved. 52 Physical Model By Tenant Data Tenancy Layer HomeDepot Lowes Default de-allocated or migrated data Shared Customers Orders Items … _file _field _tenant state … Customers Orders Items … … Type II Storage Areas Area 7 HD CustOrder Data HD CustOrderIdxs HD ItemData HD ItemIdxs Area 8 Lowes CustOrder Data Lowes CustOrderIdxs Lowes ItemData Lowes ItemIdxs Area 9 Default Data Area Default Index A10 A11 Shared Data Shared Indexes

53 © 2012 Progress Software Corporation. All rights reserved. 53 Group Creation  Create the group define variable partitiongroup as IPartitionGroup no-undo. partitiongroup = new PartitionGroup("HD_ItemsGroup“). assign partitiongroup:Table = service:GetTable("Item") partitiongroup:DefaultDataArea = service:GetArea(“A300") partitiongroup:DefaultIndexArea = service:GetArea(“A301") partitiongroup:DefaultLobArea = service:GetArea(“A300") partitiongroup:DefaultAllocation = "Immediate“ /* or delayed */ partitiongroup:Description = "Home Depot Items". service:CreatePartitionGroup(partitiongroup). define variable partitiongroup as IPartitionGroup no-undo. partitiongroup = new PartitionGroup("HD_ItemsGroup“). assign partitiongroup:Table = service:GetTable("Item") partitiongroup:DefaultDataArea = service:GetArea(“A300") partitiongroup:DefaultIndexArea = service:GetArea(“A301") partitiongroup:DefaultLobArea = service:GetArea(“A300") partitiongroup:DefaultAllocation = "Immediate“ /* or delayed */ partitiongroup:Description = "Home Depot Items". service:CreatePartitionGroup(partitiongroup). Set Area Defaults

54 © 2012 Progress Software Corporation. All rights reserved. 54 Adding Tenants To Groups  Table allocation state: None Simply add tenant as member of the group for that table  NOTE: Tenant allocation state must be “None” to join a group define variable partitiongroup as IPartitionGroup no-undo. assign partitiongroup = service:GetPartitionGroup("HD_ItemGroup"). partitiongroup:Tenants:Add(service:GetTenant("HomeDepot_NH1")). partitiongroup:Tenants:Add(service:GetTenant("HomeDepot_NH2")). service:UpdatePartitionGroup(partitiongroup). define variable partitiongroup as IPartitionGroup no-undo. assign partitiongroup = service:GetPartitionGroup("HD_ItemGroup"). partitiongroup:Tenants:Add(service:GetTenant("HomeDepot_NH1")). partitiongroup:Tenants:Add(service:GetTenant("HomeDepot_NH2")). service:UpdatePartitionGroup(partitiongroup).

55 © 2012 Progress Software Corporation. All rights reserved. 55 Multi-tenant Model Users Suzi@HD_Domain Allen@HD_Domain Cat@HD_Domain Rich@HD_Domain Rich@Lowes1 John@Lowes1 Claudio@Lowes2 Louie@Lowes2 Edward Domains/Tenants NameTenant HD_DomainHomeDepot NameTenant Lowes1Lowes Lowes2Lowes NameTenant blankDefault Data Tenancy Layer HomeDepot Lowes Default de-allocated or migrated data Shared Customers Orders Items … _file _field _tenant state … … Customers Orders Items … 1 2 3 0 thru 4


Download ppt "Multi-tenant Table Administration Flexibility without the complications Richard Banville Software Fellow, OpenEdge Matthew Baker Principal Software Engineer,"

Similar presentations


Ads by Google