simplify multi-tenant queries in orm frameworks
DESCRIPTION
介紹ORM Frameworks中的多租戶功能的發展TRANSCRIPT
#JCConf
薛元揆 (Study Hsueh)[email protected]
•
•
•
•
•
•
Application
Tenant#1 Tenant#N
Tenant#1
Application
Tenant#2 Tenant#N
Application Application
ServerWAR WAR WAR
Tenant#1
Application
Tenant#2 Tenant#N
ServerWAR
•
•
•
•
•
•
Server
Web Layer
Service Layer
Persistence Layer
2. pass tenant-id to service layer
3. pass tenant-id to persistence layer
Client
1. assign tenant-id when user login, and then make a tenant-related request
•
Service Layer
Web Layer
Persistence Layer
•
Service Layer
Web Layer
Persistence Layer
•
Persistence Layer
•
Persistence Layer
•
Model
•
Model
•
•
• Application
Tenant#1 Tenant#N
Application
Tenant#1 Tenant#NTenant#2
DB#1 DB#2 DB#N
Application
Tenant#1 Tenant#NTenant#2
DB
Application
Tenant#1 Tenant#NTenant#2
DB
Performance Management Backup Scalable API Cost
Separate Database
Separate Schema
Discriminator Column
JPA 2.1 Hibernate 4.3.6 Final EclipseLink 2.5.2
Separate database supported supported supported
Separate schema
no (candidate in JEE 8)
supported supported
Discriminator column
no (candidate in JEE 8)
no (will support in 5.0)
supported
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
••
••
••
••