A multi-tenant application architecture, multi-tenant application development method and related apparatus

By splitting user functional logic and distributed resources into two containers in a multi-tenant application architecture, and adapting middleware resources through tenant units, decoupling and isolation between tenants are achieved, solving the development difficulty problem caused by high coupling in existing technologies and simplifying the development process.

CN116074371BActive Publication Date: 2026-05-08ALIBABA (CHINA) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ALIBABA (CHINA) CO LTD
Filing Date
2023-01-16
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

The existing multi-tenant application architecture has a high degree of coupling between its various parts, which increases the difficulty of developing multi-tenant applications. In particular, the user function logic needs to be programmed to specific distributed resources, which increases the requirements and difficulty for developers.

Method used

The user functional logic and the middleware that provides distributed resources are separated into two containers (functional container and resource container). Through the tenant unit running independently in the multi-tenant module, the middleware resources corresponding to the user's identity are adapted for user requests, realizing isolation and decoupling between tenants. The middleware capabilities are exposed to developers in the form of interfaces.

Benefits of technology

It reduces the coupling of multi-tenant application architecture, simplifies the development process, and allows developers to focus on user functional logic without having to worry about specific middleware types, thus reducing the difficulty of developing multi-tenant applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116074371B_ABST
    Figure CN116074371B_ABST
Patent Text Reader

Abstract

The embodiments of the present specification provide a multi-tenant application architecture, a multi-tenant application development method and related devices, a tenant unit running in an independent runtime in a multi-tenant module is used to adapt middleware resources corresponding to a user identity for a user request, the multi-tenancy of the actual resource use process of each tenant is realized, the tenants are isolated from each other, and the decoupling of the multi-tenant capability and the user function logic is realized. Meanwhile, the multi-tenant application architecture encapsulates the user function logic for obtaining the user request and the middleware for providing the distributed resources in two different containers respectively, so that the distributed resources and the user function logic set in the resource container are decoupled, the coupling degree of the multi-tenant application architecture is reduced, in the development process, the distributed capability that can be provided by a type of middleware can be exposed to the developer in the form of an interface, the decoupling of the distributed capability and the user function logic is realized, and the development difficulty of the multi-tenant application is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments described in this specification relate to the field of computer application technology, specifically to multi-tenant application technology in the field of computer application technology, and more specifically, to a multi-tenant application architecture, a multi-tenant application development method, and related apparatus. Background Technology

[0002] Software multitenancy is a software architecture in which a single instance of software runs on a server and serves multiple tenants. Multitenant applications are also known as SaaS (Software-as-a-Service) applications. Systems designed in this way are "shared," rather than "dedicated" or "isolated."

[0003] Multi-tenant applications allow tenants to subscribe to the services they need via the internet from the application's provider, eliminating the need for servers or other hardware and reducing the hardware costs associated with building applications independently. However, the current multi-tenant application architecture suffers from high coupling between its components, making application development more challenging. Summary of the Invention

[0004] This specification provides a multi-tenant application architecture, a method for developing multi-tenant applications, and related apparatus through various embodiments, in order to reduce the coupling of the multi-tenant application architecture.

[0005] Firstly, one embodiment of this specification provides a multi-tenant application architecture, including: a functional container and a resource container; wherein,

[0006] The functional container is used to obtain the user request, which is used to request the implementation of a user function, and the user request includes user identity information;

[0007] The resource container includes a middleware module and a multi-tenancy module. The middleware module includes multiple middleware components, which are used to provide middleware resources.

[0008] The multi-tenancy module includes at least one tenant unit, which runs in an independent runtime environment. The tenant unit is used to adapt the middleware resources corresponding to the user identity information for the user request based on the user identity information.

[0009] Secondly, one embodiment of this specification provides a method for developing a multi-tenant application, applied to the multi-tenant application architecture described above. The client of the multi-tenant application architecture includes a first interface unit, which includes multiple test interfaces. Each test interface is used to provide a communication interface of a type of middleware to the client.

[0010] The development method for the multi-tenant application includes:

[0011] Based on the user functions required and the middleware types that the first interface unit can provide, obtain the multi-tenant application;

[0012] The multi-tenant application is deployed on a cloud server of the multi-tenant application architecture.

[0013] Thirdly, one embodiment of this specification provides a development apparatus for a multi-tenant application, applied to the multi-tenant application architecture described above. The client of the multi-tenant application architecture includes a first interface unit, which includes multiple test interfaces. Each test interface is used to provide a communication interface of a type of middleware to the client.

[0014] The development apparatus for the multi-tenant application includes:

[0015] The application development module is used to obtain multi-tenant applications based on the user functions to be implemented and the middleware types that the first interface unit can provide.

[0016] The application deployment module is used to deploy the multi-tenant application on the cloud server of the multi-tenant application architecture.

[0017] Fourthly, one embodiment of this specification provides an electronic device, including: a processor and a memory;

[0018] The memory is connected to the processor and is used to store computer programs;

[0019] The processor is configured to implement the multi-tenant application development method described above by running computer programs stored in the memory.

[0020] Fifthly, one embodiment of this specification provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the development method for a multi-tenant application as described above.

[0021] Sixthly, one embodiment of this specification provides a computer program product or computer program, the computer program product including a computer program stored in a computer-readable storage medium; a processor of the computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program to implement the steps of the above-described development method for multi-tenant applications.

[0022] The various implementation methods provided in this specification achieve multi-tenancy of the actual resource usage process for each tenant by adapting middleware resources corresponding to the user's identity to user requests through tenant units running independently in the multi-tenancy module. This isolates tenants from each other and decouples multi-tenancy capabilities from user functional logic. Simultaneously, the multi-tenant application architecture encapsulates the user functional logic used to obtain user requests and the middleware providing distributed resources into two different containers (i.e., a functional container and a resource container). This decouples the distributed resources set in the resource container from the user functional logic, reducing the coupling of the multi-tenant application architecture. During development, the distributed capabilities provided by a type of middleware can be exposed to developers in the form of interfaces, achieving decoupling of distributed capabilities from user functional logic and reducing the development difficulty of multi-tenant applications. Attached Figure Description

[0023] Figure 1 This is a schematic diagram illustrating the development process of multi-tenant application architecture in existing technologies.

[0024] Figure 2 This specification provides a feasible application scenario for a multi-tenant application architecture as one embodiment of the present invention.

[0025] Figure 3 A schematic diagram of a multi-tenant application architecture provided for one embodiment of this specification;

[0026] Figure 4 A schematic diagram of a multi-tenant application architecture is provided for another embodiment of this specification;

[0027] Figure 5 A signaling interaction diagram of a multi-tenant application architecture provided for one embodiment of this specification;

[0028] Figure 6 A schematic diagram of a multi-tenant application architecture provided as another embodiment of this specification;

[0029] Figure 7 A flowchart illustrating a method for developing a multi-tenant application, provided as one embodiment of this specification;

[0030] Figure 8A schematic diagram of a development apparatus for a multi-tenant application provided for one embodiment of this specification;

[0031] Figure 9 This is a schematic diagram of an electronic device provided for one embodiment of this specification. Detailed Implementation

[0032] Unless otherwise defined, the technical or scientific terms used in the embodiments of this specification shall have the ordinary meaning understood by one of ordinary skill in the art to which this specification pertains. The terms "first," "second," and similar terms used in the embodiments of this specification do not indicate any order, quantity, or importance, but are merely used to avoid confusion of constituent elements.

[0033] Unless the context otherwise requires, throughout this specification, "a plurality of" means "at least two," and "including" is interpreted as open-ended or encompassing, that is, "including, but not limited to." In the description of this specification, terms such as "one embodiment," "some embodiments," "exemplary embodiment," "example," "specific example," or "some examples" are intended to indicate that a particular feature, structure, material, or characteristic associated with that embodiment or example is included in at least one embodiment or example of this specification. The illustrative representations of the above terms do not necessarily refer to the same embodiment or example.

[0034] The technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this specification.

[0035] Overview

[0036] Traditional software sales typically involve software developers selling software as installers, licenses, and source code after development. Users purchase the software, install and run it on their local machines, and then use its features. Multi-tenant applications, however, change this traditional sales model. They allow users to enjoy services over the network, paying only as needed. This "rent-to-own" approach allows users to meet their specific application needs. Therefore, in the multi-tenant application relationship, users can also be considered tenants.

[0037] In a multi-tenant application architecture, the application typically runs on a cloud server. Tenants can log in to the cloud server via URL (Uniform Resource Locator), mini-programs, or other methods to use the application. A multi-tenant application can serve a large number of different tenants who share basic business needs but may also have their own customized requirements. The cloud server identifies tenants based on user identity information such as AK / SK (Access Key ID / Secret Access Key) and domain name. Based on the identification results, it provides customized functions and resources to different tenants.

[0038] In current multi-tenant application architectures, the operator provides the basic functionality of the application, while each tenant's customized user functional logic (or business logic) is developed by the tenant or a third-party developer. Once developed, this logic is deployed within the multi-tenant application architecture, allowing tenants to implement their customized needs. However, because the resources required for user functional logic are diverse, and in current multi-tenant application architectures, user functional logic is coupled with distributed resources, it requires programming to specific distributed resources (i.e., implementation-specific programming), significantly increasing the development difficulty.

[0039] refer to Figure 1 , Figure 1 This diagram illustrates the current development process of user function logic. For example, when user function logic requires storage capabilities during implementation, it needs to find an underlying component that can provide that storage capability. For instance, database A can provide distributed state storage capabilities. After selecting a specific component (e.g., database A), programming development is required for that component. A typical process involves importing the component's client SDK (Software Development Kit) and then implementing the required distributed capabilities, such as caching, state management, locking, and message communication, based on these SDKs. This requires developers of user function logic to be familiar with the specific components that provide various distributed capabilities (e.g., database A, database B, distributed task scheduling platform A, etc.), undoubtedly increasing the demands on developers and the development difficulty of user function logic.

[0040] To reduce the coupling of multi-tenant application architecture, the inventors separated user functional logic and middleware providing distributed resources into two containers (a functional container and a resource container). Through tenant units running independently within the multi-tenant module, middleware resources corresponding to user identities are adapted to user requests, achieving multi-tenancy in the actual resource usage process for each tenant. This isolates tenants from each other and decouples multi-tenant capabilities from user functional logic. Simultaneously, the multi-tenant application architecture encapsulates the user functional logic for obtaining user requests and the middleware providing distributed resources into two different containers (i.e., the functional container and the resource container). This decouples the distributed resources set in the resource container from the user functional logic, reducing the coupling of the multi-tenant application architecture. During development, the distributed capabilities provided by a type of middleware can be exposed to developers in the form of interfaces. This allows tenants to focus on user functionality development without needing to concern themselves with the specific middleware types in the resource container, thus reducing the development difficulty of multi-tenant applications.

[0041] Before providing an exemplary description of the multi-tenant application architecture provided in the embodiments of this specification in conjunction with the accompanying drawings, the terminology and possible application scenarios that may be involved in the embodiments of this specification will first be explained.

[0042] API (Application Programming Interface) is a set of predefined functions designed to provide applications and developers with the ability to access a set of processes based on certain software or hardware.

[0043] The REST API (Representational State Transfer API) is an API that performs state transformations on the specific presentation of resources. The REST API can be used for front-end and back-end separation in application frameworks and represents a set of standards or specifications for development.

[0044] An SDK (Software Development Kit) is a collection of documentation, demonstrations, and tools that assist in developing a specific type of software. The purpose of developing SDKs is to reduce the workload of developers. For example, a company develops a specific function of software, packages it into an SDK (e.g., a data analysis SDK, which enables data analysis), and sells it to other companies that need it. This significantly reduces the workload of developing applications.

[0045] AK / SK (Access Key Id / Secret Access Key), where AK identifies the user and SK is the key used by the user to encrypt and verify the authentication string. SK must be kept secret. The sender's identity can be verified using AK / SK encryption.

[0046] Distributed capabilities refer to the basic capabilities required by distributed applications (such as multi-tenant applications), mainly including the capabilities provided by traditional middleware, such as database capabilities, caching capabilities, and message notification capabilities.

[0047] Middleware is software that connects system software and user application software, facilitating communication between different software components, especially the centralized logic of application software to system software. It is an independent system software or service program that enables distributed application software to share resources across different technologies. Traditional types of middleware can include databases, message queues, etc.

[0048] Distributed resources refer to the specific resources used in distributed applications; various types of middleware can be considered distributed resources.

[0049] Multi-tenancy capability refers to the ability to isolate different tenants in a multi-tenant application architecture, enabling different tenants to access their corresponding resources, data, and user functional logic.

[0050] Proxy mechanisms are categorized into remote proxies, virtual proxies, protection proxies, and smart proxies. Remote proxies control access to remote objects (in different address spaces), encoding requests and their parameters and sending the encoded requests to objects in different address spaces. Virtual proxies create expensive objects as needed, caching additional information about entities to delay access. For example, when loading a large image on a website, a virtual proxy can cache the image size and generate a temporary image instead of the original. Protection proxies control object access based on permissions, checking if the caller has the necessary access rights to fulfill a request. Smart proxies replace simple pointers, performing additional operations when accessing objects: recording the object's reference count; loading an object into memory the first time it is referenced; and checking if an actual object is locked before accessing it to ensure other objects cannot modify it.

[0051] A sidecar is a process that splits functionalities that would otherwise belong to an application into a separate process. Within a microservices architecture, microservice functionalities integrated into the application are offloaded to the sidecar. The sidecar provides features such as microservice discovery, registration, service invocation, application authentication, and rate limiting.

[0052] Runtime describes the software / instructions executed when a program runs, and can include all the code libraries, frameworks, and platforms required for a computer program to run.

[0053] A primitive is typically composed of several instructions used to perform a specific operation. Its function is achieved through an indivisible or uninterruptible program.

[0054] Scenario Example

[0055] The following describes feasible application scenarios of the multi-tenant application architecture provided in the embodiments of this specification, with reference to... Figure 2 , Figure 2 This diagram illustrates a multi-tenant application architecture used as an e-commerce platform. The cloud server of this architecture is operated by the multi-tenant application architecture operator, while the client applications are developed for each tenant. During development, tenants can customize specific user functional logic (such as the e-commerce platform's page display functions, shopping cart addition logic, etc.) and deploy it to the cloud server. Subsequently, tenants can access the multi-tenant application on the cloud server to use the corresponding user functions. Tenants can also act as operators of the e-commerce platform, making their customized user functions available to their users. For example… Figure 2 A multi-tenant application runs on a cloud server. Tenants A, B, and C customize user function logic to meet their individual application needs. This customized user function logic is deployed on the cloud server. Tenants A, B, and C can access the cloud server via URLs or mini-programs. Each tenant's user (e.g., ...) can access the cloud server. Figure 2 Users of tenant A (tenant A user 1, tenant A user 2) and users of tenant B (tenant B user 1, tenant B user 2, and tenant B user 3, etc.) can also use the customized user function logic of each tenant by accessing the cloud server.

[0056] Of course, this multi-tenant application architecture can also be used as a cloud computing platform, etc., and this manual does not limit it to this.

[0057] Exemplary Architecture

[0058] The multi-tenant application architecture provided in the embodiments of this specification will be described exemplarily below with reference to the accompanying drawings. Figure 3 , Figure 3 A feasible structure for a multi-tenant application architecture is illustrated, which includes: a functional container 110 and a resource container 120; wherein,

[0059] The functional container 110 is used to obtain the user request, which is used to request the implementation of a user function, and the user request includes user identity information.

[0060] The resource container 120 includes a middleware module 122 and a multi-tenancy module 121. The middleware module 122 includes multiple middleware 1221, which are used to provide resources for the middleware 1221.

[0061] The multi-tenancy module 121 includes at least one tenant unit 1211, which runs in an independent runtime environment. The tenant unit 1211 is used to adapt the middleware 1221 resources corresponding to the user identity information for the user request based on the user identity information.

[0062] The user identity information can be AK / SK or a domain name, and this specification does not limit it.

[0063] The multi-tenant application architecture provided in this embodiment adapts middleware 1221 resources corresponding to user identities for user requests through tenant units 1211 running independently. This achieves multi-tenancy of the actual resource usage process for each tenant, isolating tenants from each other and decoupling multi-tenant capabilities from user functional logic. Simultaneously, the multi-tenant application architecture encapsulates the user functional logic used to obtain user requests and the middleware 1221 that provides distributed resources into two different containers (i.e., functional container 110 and resource container 120). This decouples the distributed resources set in resource container 120 from the user functional logic, reducing the coupling degree of the multi-tenant application architecture. During development, the middleware 1221 can be exposed to developers in the form of an interface, achieving decoupling of distributed capabilities from user functional logic and reducing the development difficulty of multi-tenant applications.

[0064] Optionally, the middleware 1221 can be a database (e.g., ...). Figure 3 This includes databases A and B, caching, distributed task scheduling platforms, message middleware, and distributed transactions.

[0065] To further simplify the development process of user function logic, in one embodiment of this specification, reference is made to... Figure 4 and Figure 5 , Figure 4 A schematic diagram of a multi-tenant application architecture is shown. Figure 5The signaling flowchart between client 200 and cloud server 100 is shown. The functional container 110 and the resource container 120 are set on cloud server 100. The client 200 of the multi-tenant application architecture includes a first interface unit 210.

[0066] The first interface unit 210 includes multiple test interfaces, each of which is used to provide a communication interface of a type of middleware 1221 to the client 200. The first interface unit 210 is used to provide the test interface to the client 200 and to proxy test requests to the cloud server 100.

[0067] The functional container 110 is also used to receive the test request and send the test request to the resource container 120.

[0068] The resource container 120 is also used to adapt the middleware 1221 resources corresponding to the identity information of the test user in the test request.

[0069] In this embodiment, in order to simplify the development process, the distributed capabilities provided by the middleware 1221 are abstracted into test interfaces and encapsulated in the first interface unit 210. This allows the client 200 to develop user function logic based on the abstract distributed capabilities, rather than on the specific middleware 1221, which helps to simplify the development difficulty of user function logic.

[0070] like Figure 5 As shown, developers can develop user functional logic in client 200 using distributed capabilities (such as caching, database, and distributed task scheduling) abstracted from the test interface. After development, the user functional logic is deployed as service module 111 of cloud server 100. Then, the cloud server 100 obtains the identity information of the restricted test user. Based on the developed user functional logic and the test user's identity information, a test request is generated. This request is proxied to cloud server 100 through the first interface unit 210, allowing cloud server 100 to receive the test request and, based on the test user's identity information, adapt the middleware 1221 resource corresponding to that identity information. Cloud server 100 returns the test result of the test request based on the adapted middleware 1221 resource, enabling developers to determine if the user functional logic is normal. If the user functional logic is normal, developers deploy it to cloud server 100 as service module 111 in a multi-tenant application architecture. If the user functional logic is abnormal, it is corrected, and the test is repeated.

[0071] In this embodiment, by issuing restricted test user identity information to the local client 200, and also using a unified distributed capability primitive for proxying, business requests and middleware 1221 requests are directly forwarded to the cloud test environment (i.e., cloud server 100), eliminating the need for separate test environment maintenance. Thanks to the multi-tenant architecture, the cost of test tenants is negligible.

[0072] Still referencing Figure 4 In one exemplary embodiment of this specification, the functional container 110 includes a testing module 112 and a service module 111; the resource container 120 further includes a tenant testing unit 123; wherein,

[0073] The service module 111 is used to obtain the user request and send the user request to the resource container 120.

[0074] The test module 112 includes a distribution unit 1121, which is used to obtain the test request and send the test request to the tenant test unit 123.

[0075] The tenant testing unit 123 is used to adapt the middleware 1221 resources corresponding to the identity information of the test user in the test request through the interface unit.

[0076] In this embodiment, a separate test module 112 and a tenant test unit 123 are set up for the development and testing process of user functional logic. On the one hand, there is no need to set up and maintain a separate test environment, which reduces the development and testing costs. On the other hand, the test and usage modules are separated in the cloud server 100, which helps to avoid mutual interference between the production and testing processes.

[0077] In one exemplary embodiment of this specification, a feasible structure for a tenant test unit 123 is provided, with reference to... Figure 6 The resource container 120 includes a plurality of tenant units 1211; at least one of the plurality of tenant units 1211 serves as the tenant test unit 123; the tenant unit 1211 includes a second interface unit 1231 and an adapter 1232.

[0078] The second interface unit 1231 includes a plurality of middleware 1221 interfaces, each of the middleware 1221 interfaces corresponding to a type of middleware 1221, and the middleware 1221 interface is used to provide a communication interface for the middleware 1221 of the type corresponding to the middleware 1221 interface.

[0079] The second interface unit 1231 is used to receive the user request or the test request, and request the middleware 1221 resources from the adapter 1232 through the middleware 1221 interface.

[0080] The adapter 1232 is configured to adjust the user request or the test request according to the user identity information, so that the scope of the middleware 1221 resources requested by the user request or the test request corresponds to the user identity information or the identity information of the test user, and return the middleware 1221 resources requested by the user request according to the adjusted user request.

[0081] In this embodiment, a communication interface between the tenant unit 1211 and the middleware 1221 is provided through the second interface unit 1231, and isolation between tenants is achieved through the adapter 1232. Furthermore, the tenant unit 1211 and the tenant testing unit 123 have the same structure, which helps to simplify the structural complexity of the resource container 120.

[0082] Optionally, in one embodiment of this specification, the interface unit is encapsulated as a software development kit (SDK). The test interface can be an API interface, and the middleware 1221 interface can be a REST API interface. The tenant unit 1211 can be represented as a sidecar. Encapsulating the interface unit as a SSD facilitates the provision of the interface unit to the client 200 by operators of multi-tenant application architectures.

[0083] Example method

[0084] One embodiment of this specification provides a method for developing a multi-tenant application. This method can be applied to the multi-tenant application architecture described in any of the above embodiments. The client of the multi-tenant application architecture includes a first interface unit, which includes multiple test interfaces. Each test interface is used to provide the client with a communication interface for a type of middleware, such as... Figure 7 As shown, the development method of the multi-tenant application may include the following steps.

[0085] S101: Obtain the user function logic according to the user functions to be implemented and the middleware types that the first interface unit can provide. In this embodiment, the specific user function logic that the tenant wants to implement can be customized. Since the multi-tenant application architecture abstracts distributed capabilities into multiple test interfaces in the first interface unit, developers can develop user function logic based on distributed capabilities without having to face specific distributed resources. This eliminates the need for developers to master the development rules of various specific distributed resources, which helps to reduce the difficulty of developing user function logic.

[0086] S102: Deploy the user function logic on the cloud server of the multi-tenant application architecture.

[0087] Once the user functionality logic is developed, it can be deployed on a cloud server, allowing tenants to access the multi-tenant application without relying on a client.

[0088] Optionally, the first interface unit is further configured to proxy the test request to the cloud server.

[0089] The step of deploying the multi-tenant application on the cloud server of the multi-tenant application architecture also includes:

[0090] Obtain the identity information of the test user.

[0091] A test request is generated based on the identity information of the test user.

[0092] The test request is proxied to the cloud server through the first interface unit, and the test request is used to request middleware resources from the cloud server.

[0093] This implementation provides a method for testing user functional logic; the specific process can be found in [reference needed]. Figure 5 And the relevant description above.

[0094] Optionally, deploying the user function logic on the cloud server of the multi-tenant application architecture includes:

[0095] The user function logic is deployed in a function container in the cloud server in a way that allows it to run independently.

[0096] Deploying user functional logic in a function container on a cloud server in an independent runtime manner allows the multi-tenant application architecture to run as a multi-runtime microservice architecture, which helps reduce the coupling between different parts of the system.

[0097] The development method for multi-tenant applications provided in the embodiments of this specification belongs to the same inventive concept as the multi-tenant application architecture provided in the embodiments of this specification above. Technical details not described in detail in this embodiment can be found in the specific processing content of the multi-tenant application architecture provided in the embodiments of this specification above, and will not be repeated here.

[0098] Example devices, electronic devices, storage media, and software

[0099] One embodiment of this specification also provides a development apparatus for a multi-tenant application, applied to the multi-tenant application architecture described in any of the above embodiments. The client of the multi-tenant application architecture includes a first interface unit, which includes multiple test interfaces. Each test interface is used to provide the client with a communication interface for a type of middleware, such as... Figure 8 As shown, the development apparatus for the multi-tenant application includes:

[0100] Application development module A10 is used to obtain multi-tenant applications based on the user functions to be implemented and the middleware types that the first interface unit can provide.

[0101] Application deployment module A20 is used to deploy the multi-tenant application on the cloud server of the multi-tenant application architecture.

[0102] The multi-tenant application development apparatus provided in this embodiment belongs to the same application concept as the multi-tenant application development method provided in the above embodiments of this specification. It can execute the multi-tenant application development method provided in any of the above embodiments of this specification and has the corresponding functional modules and beneficial effects for executing the multi-tenant application development method. Technical details not described in detail in this embodiment can be found in the specific processing content of the multi-tenant application development method provided in the above embodiments of this specification, and will not be repeated here.

[0103] Exemplary electronic devices

[0104] Another embodiment of this application also provides an electronic device, see [link to relevant documentation] Figure 9 As shown, an exemplary embodiment of this specification also provides an electronic device, including: a memory and a processor, the memory storing a computer program, the processor executing the computer program to perform steps in the development method of a multi-tenant application according to various embodiments of this specification as described in the foregoing embodiments.

[0105] The internal structure of the electronic device can be as follows: Figure 9 As shown, the electronic device includes a processor, memory, network interface, and input device connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it follows the steps of the multi-tenant application development method according to various embodiments of this specification described in the above embodiments.

[0106] The processor may include the main processor, as well as baseband chips, modems, etc.

[0107] The memory stores a computer program that executes the technical solution of this invention, and may also store an operating system and other key business functions. Specifically, the computer program may include program code, which includes computer operation instructions. More specifically, the memory may include read-only memory (ROM), other types of static storage devices capable of storing static information and instructions, random access memory (RAM), other types of dynamic storage devices capable of storing information and instructions, disk storage, flash memory, etc.

[0108] The processor can be a general-purpose processor, such as a general-purpose central processing unit (CPU), a microprocessor, etc., or an application-specific integrated circuit (ASIC), or one or more integrated circuits used to control the execution of the program of the present invention. It can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0109] Input devices may include devices that receive data and information input by the user, such as keyboards, mice, cameras, scanners, light pens, voice input devices, touch screens, pedometers, or gravity sensors.

[0110] Output devices may include devices that allow information to be output to the user, such as displays, printers, speakers, etc.

[0111] The communication interface may include any transceiver-like device for communicating with other devices or communication networks, such as Ethernet, Radio Access Network (RAN), Wireless Local Area Network (WLAN), etc.

[0112] The processor executes computer programs stored in memory and calls other devices, which can be used to implement the various steps of any of the multi-tenant application development methods provided in the above embodiments of this application.

[0113] The electronic device may also include a display component and a voice component. The display component may be a liquid crystal display screen or an e-ink display screen. The input device of the electronic device may be a touch layer covering the display component, or a button, trackball or touchpad set on the casing of the electronic device, or an external keyboard, touchpad or mouse, etc.

[0114] Those skilled in the art will understand that Figure 9The structures shown are merely block diagrams of a portion of the structure related to the scheme described in this specification, and do not constitute a limitation on the electronic devices to which the scheme described in this specification is applied. Specific electronic devices may include more or fewer components than those shown in the figures, or may combine certain components, or may have different component arrangements.

[0115] Exemplary computer program products and computer-readable storage media

[0116] In addition to the methods and devices described above, the development method for multi-tenant applications provided in the embodiments of this specification can also be a computer program product, which includes a computer program that, when run by a processor, causes the processor to perform the steps in the development method for multi-tenant applications according to various embodiments of this specification as described in the "Exemplary Methods" section above.

[0117] The computer program product described herein can be written in any combination of one or more programming languages ​​to perform the operations of the embodiments described herein. These programming languages ​​include object-oriented programming languages ​​such as Java and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0118] Furthermore, embodiments of this specification also provide a computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor of the steps in the development method of a multi-tenant application according to various embodiments of this specification as described in the "Exemplary Methods" section above.

[0119] It is understood that the specific examples in this document are only intended to help those skilled in the art better understand the implementation methods of this specification, and are not intended to limit the scope of this specification.

[0120] It is understood that in the various embodiments described in this specification, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments described in this specification.

[0121] It is understood that the various implementation methods described in this specification can be implemented individually or in combination, and the implementation methods in this specification are not limited in this respect.

[0122] Unless otherwise stated, all technical and scientific terms used in the embodiments of this specification have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of this specification. The term "and / or" as used in this specification includes any and all combinations of one or more of the associated listed items. The singular forms "a," "the," and "the" as used in the embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.

[0123] It is understood that the processor in the embodiments of this specification can be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method embodiments can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this specification. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this specification can be directly implemented by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory; the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above methods.

[0124] It is understood that the memory in the embodiments of this specification may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may be random access memory (RAM). It should be noted that the memory in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0125] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this specification.

[0126] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the aforementioned method implementations, and will not be repeated here.

[0127] In the several embodiments provided in this specification, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0128] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0129] In addition, the functional units in the various embodiments of this specification can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0130] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of this specification, in essence, or the parts that contribute to the prior art, or parts of the technical solutions, can be embodied in the form of software products. These computer software products are stored in a storage medium and include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this specification. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0131] The above description is merely a specific embodiment of this specification, but the scope of protection of this specification is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this specification should be included within the scope of protection of this specification. Therefore, the scope of protection of this specification should be determined by the scope of the claims.

Claims

1. A multi-tenant application architecture, characterized in that, include: Functional containers and resource containers; among them, The functional container is used to obtain user requests, which are used to request the implementation of user functions, and the user requests include user identity information. The resource container includes a middleware module and a multi-tenancy module. The middleware module includes multiple middleware components. The middleware components are used to provide middleware resources. The middleware components include at least one of a database, a cache, a distributed task scheduling platform, a message middleware, and a distributed transaction. The multi-tenancy module includes at least one tenant unit, which runs in an independent runtime environment. The tenant unit is used to adapt the middleware resources corresponding to the user identity information for the user request based on the user identity information.

2. The multi-tenant application architecture according to claim 1, characterized in that, The functional container and the resource container are set on a cloud server, and the client of the multi-tenant application architecture includes a first interface unit; The first interface unit includes multiple test interfaces, each of which is used to provide a type of middleware communication interface to the client. The first interface unit is used to provide the test interface to the client and to proxy test requests to the cloud server. The functional container is also used to receive the test request and send the test request to the resource container; The resource container is also used to adapt the middleware resources corresponding to the identity information of the test user in the test request.

3. The multi-tenant application architecture according to claim 2, characterized in that, The functional container includes a testing module and a service module; the resource container also includes a tenant testing unit; wherein... The service module is used to obtain the user request and send the user request to the resource container; The testing module includes a distribution unit, which is used to obtain the test request and send the test request to the tenant testing unit; The tenant testing unit is used to adapt the middleware resources corresponding to the test user's identity information in the test request through the interface unit.

4. The multi-tenant application architecture according to claim 3, characterized in that, The resource container includes multiple tenant units; at least one of the multiple tenant units serves as the tenant testing unit; the tenant unit includes a second interface unit and an adapter; The second interface unit includes multiple middleware interfaces, each middleware interface corresponding to a type of middleware, and the middleware interface is used to provide a communication interface with the middleware of the type corresponding to the middleware interface; The second interface unit is used to receive the user request or the test request, and request the middleware resources from the adapter through the middleware interface; The adapter is configured to adjust the user request or the test request according to the user identity information, so that the scope of the middleware resources requested by the user request or the test request corresponds to the user identity information or the identity information of the test user, and return the middleware resources requested by the user request according to the adjusted user request.

5. The multi-tenant application architecture according to claim 2, characterized in that, The interface unit is encapsulated as a software development kit.

6. A method for developing multi-tenant applications, characterized in that, Applied to the multi-tenant application architecture according to any one of claims 1 to 5, the client of the multi-tenant application architecture includes a first interface unit, the first interface unit includes a plurality of test interfaces, each of the test interfaces being used to provide the client with a communication interface of a type of middleware; The development method for the multi-tenant application includes: Based on the user functions required and the middleware types that the first interface unit can provide, obtain the user function logic; The user function logic is deployed on the cloud server of the multi-tenant application architecture.

7. The method according to claim 6, characterized in that, The first interface unit is also used to proxy the test request to the cloud server; The step of deploying the multi-tenant application on the cloud server of the multi-tenant application architecture also includes: Obtain the identity information of the test user; A test request is generated based on the identity information of the test user; The test request is proxied to the cloud server through the first interface unit, and the test request is used to request middleware resources from the cloud server.

8. The method according to claim 6, characterized in that, The step of deploying the user function logic on the cloud server of the multi-tenant application architecture includes: The user function logic is deployed in a function container in the cloud server in a way that allows it to run independently.

9. An electronic device, characterized in that, include: Processor and memory; The memory is connected to the processor and is used to store computer programs; The processor is configured to implement the method for developing a multi-tenant application as described in any one of claims 6 to 8 by running a computer program stored in the memory.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the method for developing a multi-tenant application as described in any one of claims 6 to 8.

Citation Information

Patent Citations

  • Multi-tenant infrastructure

    US20130145006A1