CN109800224A - The system and method for multi-tenant software is realized by master-slave database - Google Patents

The system and method for multi-tenant software is realized by master-slave database Download PDF

Info

Publication number
CN109800224A
CN109800224A CN201811555248.9A CN201811555248A CN109800224A CN 109800224 A CN109800224 A CN 109800224A CN 201811555248 A CN201811555248 A CN 201811555248A CN 109800224 A CN109800224 A CN 109800224A
Authority
CN
China
Prior art keywords
tenant
data source
master
information
database
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201811555248.9A
Other languages
Chinese (zh)
Inventor
王峥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BEIJING AEROSPACE FUDAO HIGH-TECH CO LTD
Original Assignee
BEIJING AEROSPACE FUDAO HIGH-TECH CO LTD
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by BEIJING AEROSPACE FUDAO HIGH-TECH CO LTD filed Critical BEIJING AEROSPACE FUDAO HIGH-TECH CO LTD
Priority to CN201811555248.9A priority Critical patent/CN109800224A/en
Publication of CN109800224A publication Critical patent/CN109800224A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention relates to a kind of system and methods that multi-tenant software is realized by master-slave database, to overcome the problems, such as application intelligent Service traditional in the prior art in single tenant, it is a kind of that multi-tenant software systems are realized by master-slave database, it is characterized in that, it include: database module, operation module and data processing module, wherein, database module, for the data source information of tenant and the synchronizing information of configuration database to be arranged, operation module, for logon operation and exit operation, data processing module, for searching information and feedback information.After client logs in, the subsequent all operations of client can automatically switch corresponding tenant data source according to tenant's information of login in server end.

Description

The system and method for multi-tenant software is realized by master-slave database
Technical field
The present invention relates to a kind of computer application technologies, more particularly to one kind to realize multi-tenant by master-slave database The system and method for software.
Background technique
Traditional application only serves single tenant, and database is deployed in Intranet environment more, for data For owner, these data are oneself " privately owned ", it meets whole safety standards defined in oneself.
With the development of internet technology with the maturation of application software, innovated completely in one kind that 21 century starts to rise Software application mode;It and " on-demandsoftware " (on-demand software), theapplicationserviceprovider (ASP, application service provider), hostedsoftware (Hosted Software) have similar meaning, it is that one kind passes through Internet provides the mode of software, and by application software unified plan on the server of oneself, client can be according to certainly for manufacturer Own actual demand orders required application software service to manufacturer by internet, by the service ordered is how many and length of time Expense is paid to manufacturer, and the service that manufacturer provides is obtained by internet.For many small business, SaaS is to use The preferred approach of advanced technology, it eliminates the needs of enterprise's purchase, building and maintenance infrastructure and application program.
In SaaS implementation process, there is one significantly to consider a little, be how that application data is designed, to support Multi-tenant, and the thinking of this design are to obtain balance between the shared of data, security isolation and performance.
Each tenant is associated with the difference of the same database using shared data bank, independent Schema by this system Schema, logic is invisible each other for data between tenant, and the realization of upper level applications is simple as self contained data base.
Since the information of each tenant is independently stored in different Schema, system needs dynamically to be cut according to tenant's information Change to corresponding tenant Schema.
To sum up, following problems exist in the prior art: traditional application intelligent Service is in single tenant.
Summary of the invention
For this purpose, the present invention provides a kind of system and method for realizing multi-tenant software by master-slave database, to overcome Traditional application intelligent Service is in the single tenant the problem of in the prior art.It is a kind of that multi-tenant software is realized by master-slave database System characterized by comprising database module, operation module and data processing module;Wherein, database module, for setting Set the data source information of tenant and the synchronizing information of configuration database;Operation module for logon operation and exits operation;Data Processing module, for searching information and feedback information.
Further, the data source information of tenant, in the data source information of data source configuration picture setting tenant.
Further, the synchronizing information of configuration database configures the synchronizing information of master-slave database.
Further, logon operation is executed according to user name, password and tenant in primary database when client logs in Register.
Further, operation is exited, is carried out exiting operation according to prompt.
Further, information, the corresponding tenant data source of switching at runtime are searched.
Further, feedback information does not find the data source of corresponding tenant, and it is abnormal just to generate the switching of tenant data source And return to client.
Further, kind by master-slave database realization multi-tenant software method, method the following steps are included:
The first step, client execute register in primary database according to user name, password and tenant;
Second step after logining successfully, searches data source in tenant's information;
Third step, if finding the data source of corresponding tenant, with regard to the corresponding tenant data source of switching at runtime
4th step just generates tenant data source switching exception and returns if not finding the data source of corresponding tenant To client;
5th step exits operation, executes in primary database.
Compared with prior art, after being logged in the beneficial effects of the present invention are, client, the subsequent all operations of client It can automatically switch corresponding tenant data source according to tenant's information of login in server end.
Detailed description of the invention
Fig. 1 is the system body composition figure that the present invention realizes multi-tenant software by master-slave database;
Fig. 2 is the main flow chart that the present invention realizes multi-tenant software approach by master-slave database.
Specific embodiment
Below in conjunction with attached drawing, the forgoing and additional technical features and advantages are described in more detail.
The preferred embodiment of the present invention described with reference to the accompanying drawings.It will be apparent to a skilled person that this A little embodiments are used only for explaining technical principle of the invention, are not limiting the scope of the invention.
It should be noted that in the description of the present invention, the instruction such as term " on ", "lower", "left", "right", "inner", "outside" Direction or the term of positional relationship be direction based on the figure or positional relationship, this is intended merely to facilitate description, and It is not that indication or suggestion described device or element must have a particular orientation, be constructed and operated in a specific orientation, therefore not It can be interpreted as limitation of the present invention.
In addition it is also necessary to explanation, in the description of the present invention unless specifically defined or limited otherwise, term " peace Dress ", " connected ", " connection " shall be understood in a broad sense, for example, it may be being fixedly connected, may be a detachable connection, or integrally Connection;It can be mechanical connection, be also possible to be electrically connected;Can be directly connected, can also indirectly connected through an intermediary, It can be the connection inside two elements.To those skilled in the art, it can understand that above-mentioned term exists as the case may be Concrete meaning in the present invention.
As shown in Figure 1, it realizes that the system body of multi-tenant software constitutes figure by master-slave database for the present invention;Entirely System includes client, software server, database server, and client is equipped with the relevant client software of business, is serviced Device is equipped with the software of switching at runtime data source, and database server is equipped with master-slave database.
Client includes: main login page calling module, for calling and showing main login interface;Scheduler module is logged in, For being dispatched to corresponding navigation interface according to login result.
Server end includes: login authentication module, according to the user name that client is transmitted, password and tenant's information, and verifying Register, and return result to client.
After client logs in, the subsequent all operations of client server end can according to tenant's information of login, Automatically switch corresponding tenant data source.
As shown in Fig. 2, it realizes the main flow chart of multi-tenant software approach for the present invention by master-slave database, implementing The method for the server end that multi-tenant software systems are realized by master-slave database that example provides, comprising:
(1) in the data source information of data source configuration picture setting tenant.
(2) synchronizing information of master-slave database is configured.
(3) register is executed in primary database according to user name, password and tenant when client logs in.
(4) after logining successfully, removing logs off method other than primary database execution, and other all operations are all according to behaviour The tenant's information for making (3) searches data source in operation (1).
(5) it if not finding the data source of corresponding tenant, just generates tenant data source switching exception and returns to visitor Family end.
(6) if finding the data source of corresponding tenant, with regard to the corresponding tenant data source of switching at runtime.
(7) realize that each tenant can be using the system of independent database and switching at runtime by above-mentioned processing.
In above-described embodiment, by the method for tenant's information switching at runtime data source, answering for tenant's management is greatly reduced Polygamy, in newly-increased tenant, as long as newdata library can largely be rented simultaneously with the binding of tenant's information with short time Quick Extended Family.It is also easier for each tenant's Backup Data, it, only need to be to entire Schema because they are stored in different tables of data It is backed up.
So far, it has been combined preferred embodiment shown in the drawings and describes technical solution of the present invention, still, this field Technical staff is it is easily understood that protection scope of the present invention is expressly not limited to these specific embodiments.Without departing from this Under the premise of the principle of invention, those skilled in the art can make equivalent change or replacement to the relevant technologies feature, these Technical solution after change or replacement will fall within the scope of protection of the present invention.

Claims (8)

1. a kind of realize multi-tenant software systems by master-slave database characterized by comprising database module, operation mould Block and data processing module;Wherein,
The database module, for the data source information of tenant and the synchronizing information of configuration database to be arranged;
The operation module for logon operation and exits operation;
The data processing module, for searching information and feedback information.
2. realizing multi-tenant software systems by master-slave database according to claim 1, which is characterized in that the tenant's Data source information, in the data source information of data source configuration picture setting tenant.
3. realizing multi-tenant software systems by master-slave database according to claim 1, which is characterized in that the configuration number According to the synchronizing information in library, the synchronizing information of master-slave database is configured.
4. realizing multi-tenant software systems by master-slave database according to claim 1, which is characterized in that described to log in behaviour Make, register is executed in primary database according to user name, password and tenant when client logs in.
5. realizing multi-tenant software systems by master-slave database according to claim 1, which is characterized in that described to exit behaviour Make, is carried out exiting operation according to prompt.
6. realizing multi-tenant software systems by master-slave database according to claim 1, which is characterized in that the lookup letter Breath, the corresponding tenant data source of switching at runtime.
7. realizing multi-tenant software systems by master-slave database according to claim 1, which is characterized in that the feedback letter Breath, does not find the data source of corresponding tenant, just generates tenant data source switching exception and returns to client.
8. a kind of method for realizing multi-tenant software by master-slave database, which is characterized in that the described method comprises the following steps:
The first step, client execute register in primary database according to user name, password and tenant;
Second step after logining successfully, searches data source in tenant's information;
Third step, if finding the data source of corresponding tenant, with regard to the corresponding tenant data source of switching at runtime
4th step just generates tenant data source switching exception and returns to visitor if not finding the data source of corresponding tenant Family end;
5th step exits operation, executes in primary database.
CN201811555248.9A 2018-12-18 2018-12-18 The system and method for multi-tenant software is realized by master-slave database Pending CN109800224A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811555248.9A CN109800224A (en) 2018-12-18 2018-12-18 The system and method for multi-tenant software is realized by master-slave database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811555248.9A CN109800224A (en) 2018-12-18 2018-12-18 The system and method for multi-tenant software is realized by master-slave database

Publications (1)

Publication Number Publication Date
CN109800224A true CN109800224A (en) 2019-05-24

Family

ID=66557269

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811555248.9A Pending CN109800224A (en) 2018-12-18 2018-12-18 The system and method for multi-tenant software is realized by master-slave database

Country Status (1)

Country Link
CN (1) CN109800224A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI781409B (en) * 2019-05-29 2022-10-21 印度商塔塔顧問服務有限公司 System and method of provisioning, upgrading and tracking solutions in a multi tenanted platform

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101777047A (en) * 2009-01-08 2010-07-14 国际商业机器公司 System, equipment and method for accessing database under multiple-tenant environment
CN102456028A (en) * 2010-10-27 2012-05-16 金蝶软件(中国)有限公司 Multi-tenant-oriented data acquisition method, device and system
CN103036856A (en) * 2011-10-09 2013-04-10 镇江金软计算机科技有限责任公司 Multi-tenant system achievement based on software as a service (SAAS) application
US20130304697A1 (en) * 2012-05-09 2013-11-14 Salesforce.Com, Inc. System and method for cross-platform synchronization of data objects in a multi-tenant environment
CN106529331A (en) * 2016-10-31 2017-03-22 用友网络科技股份有限公司 Multi-tenant data isolation scheme applied to PaaS (Platform-as-a-Service) platform
CN107122364A (en) * 2016-02-25 2017-09-01 华为技术有限公司 Data manipulation method and data management server

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101777047A (en) * 2009-01-08 2010-07-14 国际商业机器公司 System, equipment and method for accessing database under multiple-tenant environment
CN102456028A (en) * 2010-10-27 2012-05-16 金蝶软件(中国)有限公司 Multi-tenant-oriented data acquisition method, device and system
CN103036856A (en) * 2011-10-09 2013-04-10 镇江金软计算机科技有限责任公司 Multi-tenant system achievement based on software as a service (SAAS) application
US20130304697A1 (en) * 2012-05-09 2013-11-14 Salesforce.Com, Inc. System and method for cross-platform synchronization of data objects in a multi-tenant environment
CN107122364A (en) * 2016-02-25 2017-09-01 华为技术有限公司 Data manipulation method and data management server
CN106529331A (en) * 2016-10-31 2017-03-22 用友网络科技股份有限公司 Multi-tenant data isolation scheme applied to PaaS (Platform-as-a-Service) platform

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI781409B (en) * 2019-05-29 2022-10-21 印度商塔塔顧問服務有限公司 System and method of provisioning, upgrading and tracking solutions in a multi tenanted platform

Similar Documents

Publication Publication Date Title
US11425059B2 (en) Chatbot support platform
US20190227786A1 (en) Efficient application patching in heterogeneous computing environments
CN101331461B (en) Remote performance monitor in a virtual data center complex
US11729174B2 (en) Triggering and controlling workflows across applications and services used in cloud computing systems
US7065746B2 (en) Integration integrity manager
US20180137032A1 (en) Systems and methods for testing source code
US20160180255A1 (en) Method and system for managing airport baggage
EP3177997A2 (en) Policy based resource management and allocation system
US20140289243A1 (en) Method and system for centralized issue tracking
EP1955235A2 (en) System and method of managing data protection resources
CN105610819B (en) The method and apparatus of the query service of server info are provided
US20110219019A1 (en) System And Method For Providing Network-Based Services To Users With High Availability
US20220417093A1 (en) Techniques for migrating worker nodes to a new manager instance
US9639411B2 (en) Impact notification system
US11799839B2 (en) Cross-regional replication of keys
US20200125948A1 (en) Machine learning from the integration flow metadata
US10033737B2 (en) System and method for cross-cloud identity matching
CN112231568A (en) Hotel label automatic configuration method and device, electronic equipment and storage medium
CN109800224A (en) The system and method for multi-tenant software is realized by master-slave database
US20150347113A1 (en) Software installation and configuration
US11068487B2 (en) Event-stream searching using compiled rule patterns
US20140143782A1 (en) Computerized infrastructure management system and method
CN109739724B (en) Data monitoring method, system, electronic device and storage medium
US9389883B2 (en) Common system services for managing configuration and other runtime settings of applications
Silva Souza et al. Designing an adaptive computer‐aided ambulance dispatch system with Zanshin: an experience report

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination