Analysis on the implementation of multi-tenant in Java platform and some PAAs

Source: Internet
Author: User
Tags resource

Multi-Tenant Overview

Multi-Tenant (Multi tenancy/tenant) is a software architecture that is defined as:

Run a single instance of an application on a server that provides services to multiple tenants.

In this architecture, the application is designed to partition its own data and configuration into virtual partitions so that each tenant feels that he or she is working on a private, customizable application instance.

Behind this is the ability to scale resources. That is, in the same hardware configuration, different tenants share the same application in the case of data separation, and as the number of tenants increases, the application expands horizontally and maintains similar performance metrics (consistent response time, etc.). This also means a rise in resource efficiency and savings in the investment of IT assets.

Achieving a balance between sharing and security is the primary focus of the multi-tenant architecture. More resource sharing is conducive to increased flexibility and overall cost reduction, but the security requirements of individual tenants require additional technical means to ensure.

Multi-tenant design involves two tiers:

Data

Applications/Platforms

The multi-tenant capability of the data tier is a big topic, mainly refers to how different tenants share or detach data, and meet security. This paper focuses on the application/platform layer of the Multi-Tenant specification and scheme.

Multi-tenant Overview of the Java PaaS

The Java platform has already provided some multi-tenant capabilities in EE. As part of Oracle's goal of delivering PaaS to the Java platform, the multi-tenant feature is reflected in many of the Java EE 7 initial specifications, as shown in table 1.

Table 1. A multi-tenant-related JSR in Java EE 7

Java EE 7 Specification for the PAAs model support: The same PAAs application in a PAAs environment can be used by multiple tenants, each tenant using a different instance of the application while sharing resources.

The PAAs specification requires that each tenant have a tenantid that is unique to all tenants of a PAAs vendor. The Sevlet container can correctly map external requests to the corresponding tenant instances and ensure that the resources used by different tenants are quarantined in all subsequent business processes using Tenantid as the basis for processing. At the same time the tenant interface can be customized.

For example, the impact to JPA will include:

Supports shared databases, detaching schemas: schema/table mappings can be reconfigured through metadata.

Supports shared databases, shared schemas: Vendors can use Tenantid to implement data row-level isolation.

Impact of the programming model: local queries and direct JDBC access will be restricted.

But on August 30, 2012, the Oracle Java EE 7 specification director, Linda Demichiel, announced in a blog that the PaaS and multi-tenant support parts will be postponed due to the immature application of cloud domain and the release pressure of the Java EE 7 release To Java EE 8 (The following translation references from InfoQ):

Although our wishes are good, the cloud-related progress in our schedule is still slow. Part of the reason is that building allocations (provisioning), multiple tenants (multi-tenancy), resiliency (elasticity), and application deployments are still immature, partly because of our conservative way of doing things, and we try to do it ' Right, but in doing so, we still lack enough industry experience in the cloud sector. Therefore, we believe that the release of Java EE 7 may be postponed to the spring of 2014 to provide complete support for standardized PaaS-based programming and multi-tenant. The time was two years later, a year later than planning. In our opinion, the time is too long.

So we proposed to the Java EE 7 Group of Experts to adjust our plan, stick to our current target release date, and postpone the PaaS and multi-tenant support part of our schedule to Java EE 8. ”

So in Java 8, the most important two features associated with the cloud are multi-tenant and modularity. Specifically, this is:

Multi-Tenant: The ability to run multiple applications securely in a Java virtual machine (JVM).

Modularity: Refers to the JDK being organized into a set of modules that are clearly defined, albeit interdependent. An alternative option for Java developers is to use OSGi.

Mark Little, from Red Hat, believes that the next Java version supports these two features, making it possible to make large-scale cloud deployments.

At the same time, Oracle's spec leader Linda Demichiel mentioned that Java EE 7 was forced to abandon the PaaS component even as cloud applications were not fully prepared for standardization, but vendors such as Oracle, Red Hat, IBM and Cloudbees Has started to provide the ability to run Java EE programs on the cloud.

Thus, the remainder of this article will attempt to elaborate on several more popular Java platform solutions involving multi-tenant.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

Tags Index: