Amazon Ads

Monday, July 26, 2010

Multi-Tenant Architecture - First thoughts...

A Multi-Tenant Architecture:


Definition: A single instance of the application being able to serve various companies or tenants at once, providing the customized end-user experience, without having to write custom code for each tenant is said to be a multi-tenant architecture.

Benefits & Attributes:
  1. Highly Scalable
  2. Configurable
  3. Cost-effective or high ROI
  4. Multi-tenant efficient  
The Challenges:

  1. To be able to configure the application for a new tenant without incurring extra operational costs or development costs for each new set up
  2. Customization of the application can be in any of the following:
  • User Interface – Native language, time zone, keyboard input styles, UI validation rules, Truncation of strings
  • Storage of data in various languages – support Unicode character sets through all the layers of the application till data persistence
  • Business rules and workflow patterns
  • Authorization and security policies with compliance needs
  • Extensions to data models based on custom requirements of tenants
3. Providing data isolation and security between the tenants’ data


 Solution:


 “It has to be a highly METADATA driven architecture”

The solution has to consider the following aspects while being designed:

1. Data Management
  • a. Partitioning
  • b. Availability 
2. Tenant Management
  • a. Data Model
  • b. Subscription Management
  • c. Identity Management
  • d. Delegated administration
  • e. Identity Federation
3. Tenant Customization
  • a. Meta data services
  • b. Extending application data model
  • c. UI customization
  • d. Business process customization
4. Application and Data Security
  • a. Common authentication schemes
  • b. Single sign-on
  • c. Securing data transfer
  • d. Authorizations
  • e. Data isolation schemes
5. Instrumentation & Monitoring
  • a. Health
  • b. Availability
  • c. Business performance
6. Metering
  • a. Usage Models
  • b. Data model for metering
  • c. Usage tracking architectur
7. Configuration Management
8. Infrastructure Security
  • a. Provisioning (Infrastructure, Application, Tenants)
  • b. Disaster Recovery
  • c. Billing
  • d. Network operations
9. Programmable software Services
  • a. Software service lifecycle
  • b. Service versioning
  • c. Service certification, registration & publication

Thursday, June 3, 2010

Blogger Comment Notification

Hi,
Here was a small tip for which I browsed a lot but could not find help. So, finally when i discovered this tiny titbit, felt like sharing.
If you want to change the email address to which comments on your blog are to be notified ( assuming you are using blogspot), then, go to dashboard, settings, comments tab and towards the end you have a place to tell which email id should receive your comments. Type it in there or change it there  and you are done.

This may be trivial but of some help :)

Wednesday, April 14, 2010

JSF, JBoss Seam and EJB3

I just happened to explore this combination of technologies recently as it was required for a project. The first impression is that it is a providing a very impressive standards-based alternative to other frameworks which have become the de-facto standard in the Java World – Hibernate and spring.

The learnings of the community from various previous not-so-successful frameworks and some good frameworks which have been adopted by many have all been put together.

Also, there has been some out-of-the-box thinking w.r.t the way the layering has been handled. Standard JEE applications have been used to writing a lot of “glue” code for communication across the layers – presentation, business & data apart from others like integration etc. Some of the JEE patterns have been subtly built-in while some of them become redundant in this context – like a DAO or DTO or Business Delegate.

To put it crisply, here are the advantages of this combination of technologies and frameworks:

1. Provides a unified component model centered around EJB3

2. No tedious glue code to copy data back and forth between the layers

3. Supports dependency bijection – this is one of the main points that help us do away with glue code

4. Annotation driven data binding

5. Seam support JSF in such a seamless way that we do not have to have an extra layer of backing beans / managed beans – session beans itself can play the same role

6. Seam integrates hibernate validators even if we do not use Hibernate at the persistence layer. This allows for annotation-based integrated validation of data across the layers. Infact, this can do the front-end validation directly by annotating at the entity bean

7. Supports JPA lazy loading in JSF (open session in view) by default

8. Supports the use of JSF EL within EJB-QL. This makes it very clean and convenient

9. Seam support a lot many scopes as against the standard session scope. To name a few, it has – event, page, conversation, session, application, business process. This expands the horizon of how to manage state within an application and yet not have too many memory issues

10. Using Facelets as the View technology instead of JSP is the best thing that has happened. There have been many problems using JSP with JSF. Please read this article on Improving JSF by dumping JSP

11. Facelets provide templating, re-use and ease of development which have been some concerns with JSF.