java多租户架构,SaaS的 - 在Java中多租户单独的数据库模型的实现

I am architecting a software project and I want to achieve a SAAS (Software As a service) model. I want to design a web application compatible to multi tenancy with separate database per tenant.

How can i design Multi tenant UI in Java environment(UI should be tenant configurable in nature)?

How can I design data access layer for separate database per tenant(Single application instance for multiple tenant database)?

And also suggest me to choose technology stack in Java environment.

Thanks in advance.

解决方案

This post has details on the database architecture for multitenancy.

How can i design Multi tenant UI in Java ...

This depends on the requirement. If the tenants views are completely different, different pages, layout, flow etc, then you can have a page per tenant. Usually the pages are similar except that the data view is different. In that case, same ui can be used across tenants and the view driven by tenant configuration. The view should be metadata driven. The view can be configurable by having a configuration mapping/db where each tenants configuration is stored. The tenant can choose what can be displayed during configuration.

How can I design data access layer for separate database per

tenant....

This is controlled by the data source. You need to essentially differentiate the data connections and connection pools based on the tenant identifier. This can be achieved using a custom data access object where you instantiate the data source for different tenants. Hibernate provides support for multitenancy http://docs.jboss.org/hibernate/orm/4.1/devguide/en-US/html/ch16.html

suggest me to choose technology stack in

This is very broad question. I have some suggestions, take a look at this

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值