CurrentlySAASThe platform is no stranger to everyone and truly belongs to the market.SAASThere are not many applications, but a large part of them are:ASPThe operating mode is very challenging for the company or the technical department. Last yearELearningThe project is actuallyASP,ASPThere will be many problems in the model itself. Although there are some differences with the traditional project model, the difference is not very big from the technical point of view.
GetSAASPlatform, so I have supplemented the relevant knowledge and recorded my practices and summary here. As there is no final verification yet, it is not clear how it works. I hope you can give me some comments.
Databases UsedOracle10gThis article is only from the perspective of data model design. The usage mode is shared.DatabaseIndependentSchema.
OracleImplementation Method in:
1Share a database instance for freeTenant_freeInstance, billingTenant_vipInstance, platform data usageTenant_platformInstance.
2, IndependentSchemaBy creatingTenantThe data table used by each user is initialized based on the data imported by the user. Configure the automatic data generation method. It is normal to generate tens of thousands of database users by testing an instance.1Tens of thousandsTenantThen it will develop10For all users10The scale of servers is acceptable to me.
3In the pastTenantAllocate a tablespace and define the size of the data file to implementTenantRestrictions on data space, but found through testsOracleThe number of tablespaces added200An error is reported when the maximum number of tablespaces is exceeded. It seems that this method cannot be used.
As shown in, allTenant userAll are managed in the user management library, and then the Data Access Controller passes throughTenant userInformation is automatically selectedTenantThe corresponding data structure. Maybe I think this mode isMVC, That isSAASUseMVCD(Model-View-controller-dataaccessThe data management layer is independent of the model layer and control layer for data management, and is responsible for database structure management, data access, and other functions ..
1InOracleTo use an independentDatabaseThe memory requirement for the server is too high.200 mThen,4GThe server can only support20I think no one can afford this cost, so I will not use the first simplest method.
2Select independentSchemaIs very importantProgramAnd performance will be greatly improved, and the business requires that all enterprise-related data table fields allowTenantUser-Defined, so I think it is necessary to select the second mode. There are many problems if you use reserved fields or extend tables to store them, such as the retrieval speed, field restrictions, and data redundancy. It is not intuitive for users.
3From the perspective of maintenance management, data of each database user can be independently backed up during backup, which is conducive to the deletion and recovery of invalid user data. It also ensures the security of user data.
1Requirements can be automatically implemented through ConfigurationTenant SchemaTheCrudOperation.
2Data reports and related queries must be customized and related functions must be provided.
3,APIThe interface service must provide the configuration function.