In our “ Technology Enablers for SaaS ” series, we highlighted Sharding in the last digest. This week we will focus on Aspect Oriented Programming (AOP) and Service Oriented Data Architecture (SODA), two more technology concepts that can be used effectively when building a SaaS product.
AOP: Code related to cross-cutting concerns like transaction, security and logging are usually common across a product. If any of these needs to be modified, large parts of the code base are impacted. This increases the complexity of a product and makes product evolution difficult.
Speaking in the context of SaaS, AOP attempts to solve the above problem by allowing cross-cutting concerns to be expressed in terms of stand-alone modules called Aspects. This is hard to do in case of Object Oriented Programming. For example, a security module can include ‘advice’ that performs a security check before accessing a bank account. The point cut defines the instances (join points) when a bank account can be accessed. Using AOP, we can link advices and join-points during runtime, thus giving flexibility to link both dynamically.
SODA entails that the databases are partitioned according to well-defined and logical service boundaries. At a logical level, a database service exposes a well-documented interface to data. This is not a general database interface for reading and writing data, instead it provides very specific functionality. For example, an inventory database service might expose methods for checking inventory levels, reserving inventory, removing products from inventory, etc.
While this may sound similar to stored procedures, what is different is that access to data under the control of one database service is completely isolated from that of a different database service. Moreover, requests to database services are exposed as Web services (instead of a database connection).
We will cover more technologies and tools for enabling SaaS in our upcoming digests.