Ever since Oracle acquired MySQL, there is a lingering question in the minds of SaaS companies that had relied heavily on MySQL and the analysts who follow the space closely. It is about the impact of this acquisition on the SaaS providers. While thinking about the impact of any adverse move by Oracle on SaaS vendors, I had a chance to listen to a podcast called The Cloud Computing Show by Gary Orenstein. One of the episodes had a discussion between Gary and Damien Katz, co-founder of CouchDB. It piqued my interest on CouchDB and brought them under my radar. Fortunately, I had a chance to talk to Damien and asked him about some of the questions I had in my mind. I am now entirely convinced that CouchDB offers a good alternative to many SaaS vendors, especially to those who offer Office Suites, Wikis or similar document based applications and are worried about the state of MySQL. In this post, I will discuss why I think it is a good alternative.
One of the biggest reasons for the success of SaaS is their low cost. Many SaaS vendors could offer the services at a low cost because they used open source stacks for their backend needs. On the database side, many SaaS vendors, especially the smaller ones, used MySQL extensively. After Oracle got MySQL, SaaS vendors are worried about the potential threats to their business from Oracle’s plans for MySQL. With Oracle keeping mum on the plans, SaaS vendors are basically clueless on Oracle’s intentions. Many are desperately hoping that Oracle doesn’t mess around much with MySQL.
However, there is a problem related to MySQL’s licensing and it has the potential to blow up on the face of SaaS vendors. This issue was highlighted by many free software people, including FSF’s Richard Stallman, when they were fighting to stop Oracle from getting its hand on MySQL. Even though I didn’t agree with them on their assertion that EU should stop Oracle from acquiring MySQL, the point they were highlighting were still valid. The problem lies with how GPL asserts the copyright (well, copyleft). Even though it was designed with an intention to ensure the users’ freedom to tinker with the free software, it has the nasty side effect of centralizing the power with the original author of the software. In the case of MySQL, now Oracle has the right to control the entire fate of MySQL. The very nature of GPL restricts others from building a viable business strategy around a MySQL fork similar to how it can be done on top of more permissive licenses like BSD, Apache, etc.. As Richard Stallman himself argued with the EU regulator, this restriction offered by GPL will ensure that none of the forks can be as successful as MySQL. This is a big threat to all MySQL users, especially to SaaS providers.
CouchDB to the rescue
Even though SaaS providers can easily move to one of the forks available in the market, they are hesitant to take that route because
- Many are still paranoid about potential threats to these forks from Oracle. The confusion around the Java lawsuits only increased their worries
- Some of the forks are smaller projects and SaaS vendors are worried about the longevity of these products. Most of the SaaS vendors are not in a position to continue the development of the MySQL fork if the project stalls
- Not every fork has a solid support service available if any SaaS vendors needs it in case of any trouble on the database sideIn short, SaaS vendors are not ready to go along with a MySQL fork as yet
In short, SaaS vendors are not ready to go along with a MySQL fork yet. The other option is moving to PostgreSQL. The pros and cons of using PostgreSQL is for a separate post by itself and, also, it is not the focus of this post.
However, PostgreSQL or a MySQL fork are not the only options. Some of the SaaS vendors can also rely on NoSQL options. CouchDB is one such option and it can be very useful for SaaS applications that relies on the document model for their data store needs. For eg: SaaS office applications, wikis, technical documentation, etc. are right candidates for CouchDB.
What is CouchDB?
- a document oriented database. Primary format is JSON but supports binary attachment so that images can be stored.
- schema-free database without the restrictions of RDBMS ones. Falls into the NoSQL category
- a distributed database system. Any number of devices (servers, desktops, tablets, smartphones, etc.) can have independent replica copies of the same database and the changes are replicated bidirectionally
What makes CouchDB attractive for SaaS?
As we enter an era dominated by smartphones and tablets, mobile computing is gaining more and more traction not just on the consumer side but also on the enterprise side. Any credible SaaS player is expected to have a strong mobile strategy, either in the form of mobile web apps or native apps. We are also seeing a trend where mobile web app is packaged in a native shell and offered as an app with features comparable to native apps. I can even safely claim that any SaaS provider without a mobile strategy is bound to fail. Mobile computing, thus, becomes an important arsenal in the SaaS providers toolkit.
CouchDB, by its very nature, is a great option for mobile computing. The reasons are
- CouchDB is also an HTTP server. This lets browsers talk directly to CouchDB. This makes mobile app development easy with CouchDB
- CouchDB can run on multiple devices and can sync with each other and the cloud whenever there is an internet connection. This offline use and syncing is one of the unique features of CouchDB. CouchDB uses a built in conflict management system and it easily helps solve any conflict that may occur in collaborative SaaS applications
- The file format of CouchDB is a tail-end format. All changes are added to the end of the database file, thereby, ensuring that database is never in an inconsistent state. For example, if a mobile app gets killed for any reason, you are safe
- Memory footprint is very low. In a very active state, the database consumes only 7 MB of RAM and less during other times. This makes CouchDB very suitable for mobile devices which usually carry lower memory
- Geospatial Index – very useful in the case of location aware apps
These powerful mobile features along with the fact that the company behind CouchDB is aiming to put CouchDB on all browsers much like SQL-lite, all mobile devices and other lifestyle devices like television, makes CouchDB a serious contender for SaaS.
How is CouchDB different from MySQL?
CouchDB is also an open source software like MySQL. However, unlike MySQL, CouchDB uses a very liberal Apache license and it is hosted as an Apache project. These two factors are good enough reasons to place a bet on CouchDB. Moreover, the company behind CouchDB has a sustainable business model based on hosting CouchDB (a new kind of monetization option for open source companies) and they also plan to offer some enterprise tools like what MySQL did. Plus, they are planning to offer support services for CouchDB on all these devices. In short, they have a very sustainable business model to support their core developers, thereby, ensuring the longevity of the project. The very fact that it is an Apache project and not a single vendor product makes it attractive for volunteer developers. This ensures that CouchDB is a viable option for businesses to consider.
MySQL is not going away immediately but it is important for the SaaS providers to explore alternatives because no one is sure about Oracle’s long term plans for MySQL. The very economics of SaaS model restricts the service providers to rely on Open Source stack for the backend needs. CouchDB is an attractive alternative for some categories of the SaaS applications. Since mobile is in the very DNA of CouchDB, it is even more attractive for the SaaS providers. If you are a SaaS startup, I strongly urge you to take a look at CouchDB for your database needs.
- CouchDB and CouchOne – Brief Notes (enterpriseirregulars.com)
- Distributed Video Editing with CouchDB and Novacut (readwriteweb.com)
- A powerful replicable mobilized database: CouchDB (building43.com)